Stefan Dösinger
7109bebd02
wined3d: Move volume DXTn handling to apply_format_fixups.
2015-04-27 15:07:42 +09:00
Matteo Bruni
978fe23218
wined3d: Don't use the builtin FFP uniforms for the material.
2015-04-27 15:07:11 +09:00
Matteo Bruni
6984ca7f46
wined3d: Don't use the builtin FFP uniforms for texture transformation matrices.
2015-04-27 15:07:06 +09:00
Matteo Bruni
84ca0203bf
wined3d: Introduce a scratch string buffers framework.
2015-04-27 15:07:03 +09:00
Matteo Bruni
54b4df6731
wined3d: Reduce initial wined3d_string_buffer buffer size to 32.
...
Also try to avoid unnecessary HeapReAlloc() + vsnprintf() loops when we
know the required size of the buffer.
2015-04-27 15:06:58 +09:00
Matteo Bruni
64463b81df
wined3d: Rename struct wined3d_shader_buffer to wined3d_string_buffer.
...
Also rename the shader_buffer_(clear|init|free) functions.
2015-04-27 15:06:55 +09:00
Stefan Dösinger
072e1a3fb2
wined3d: Move the EXT_texture3D check to init_format_texture_info.
2015-04-24 19:08:45 +09:00
Stefan Dösinger
9def5ff409
wined3d: Query info for each resource type from ARB_internalformat_query2.
2015-04-24 19:08:41 +09:00
Stefan Dösinger
e4e1e7d8d3
wined3d: Read flags of the right resource type in check_device_format.
2015-04-24 19:08:39 +09:00
Stefan Dösinger
3c0ed9ce0a
wined3d: Introduce resource-type specific format flags.
2015-04-24 19:08:35 +09:00
Matteo Bruni
53ff2a9d22
wined3d: Drop the ARB_SHADER_OBJECTS extension flag.
...
The flag is currently unused and also unnecessary since both
ARB_vertex_shader and ARB_fragment_shader specs require
ARB_shader_objects support.
2015-04-24 19:08:15 +09:00
Matteo Bruni
7928ffaca5
wined3d: Drop glPrioritizeTextures() call.
...
It's not supported on core profiles and I doubt it matters anyway.
For the records, the default value is 1 so this was actually lowering
the priority for DEFAULT pool textures.
2015-04-24 19:08:10 +09:00
Matteo Bruni
d6db6c7295
wined3d: Fix specular lighting for non-local viewer.
...
The viewer is in the (0.0, 0.0, -1.0) direction in the D3D coordinate
system.
2015-04-24 19:08:01 +09:00
Matteo Bruni
b963c73abb
wined3d: Introduce D3D7+ normal matrix computation.
2015-04-24 19:07:52 +09:00
Henri Verbeet
cfd280fd66
wined3d: Get rid of the tracing code in shader_vaddline().
2015-04-24 14:29:39 +09:00
Henri Verbeet
dd2398297c
wined3d: Simplify shader_arb_dump_program_source().
2015-04-24 14:29:32 +09:00
Stefan Dösinger
4fbaab2020
wined3d: Shadow format flags in wined3d_rendertarget_view.
2015-04-23 20:43:20 +09:00
Francois Gouget
6f6dfe91d6
wined3d: Make glsl_vertex_pipe_view() static.
2015-04-23 20:43:19 +09:00
Stefan Dösinger
9076612e2d
wined3d: Shadow format flags in the resource.
2015-04-22 23:24:41 +09:00
Henri Verbeet
6e4ad78ff4
wined3d: Slightly simplify get_info_log_line().
2015-04-21 23:44:59 +09:00
Henri Verbeet
de1450788b
wined3d: Completely initialize "correction_params" in shader_glsl_load_constants() (Valgrind).
...
Leaving the last two elements uninitialized is mostly harmless since the
shader doesn't actually use them, but the driver might try to do some kind of
analysis on them.
2015-04-21 22:22:00 +09:00
Henri Verbeet
c7780791ea
wined3d: Introduce a function to compile ARB vertex/fragment programs.
2015-04-21 22:21:56 +09:00
Henri Verbeet
8063d4cfcc
wined3d: Initialize "type.padding" in arbfp_blit_set() (Valgrind).
2015-04-21 22:21:52 +09:00
Henri Verbeet
8b6cddbe25
wined3d: Get rid of context_invalidate_active_texture().
...
Calling wined3d_texture_bind() + context_invalidate_active_texture() is
equivalent to just calling wined3d_texture_bind_and_dirtify().
2015-04-16 20:44:43 +09:00
Henri Verbeet
dcaaf915f8
wined3d: Use wined3d_texture_bind_and_dirtify() in wined3d_texture_upload_data().
2015-04-16 20:44:41 +09:00
Henri Verbeet
5c9da580a8
wined3d: Use wined3d_texture_bind_and_dirtify() in device_update_volume().
...
I missed this in 7c4d512fee
. Generally speaking,
the only places where plain wined3d_texture_bind() calls are appropriate are
places where you're binding the texture to a specific stage for a subsequent
draw. I.e., places where context_active_texture() is called first.
2015-04-16 20:44:37 +09:00
Henri Verbeet
52478e3809
wined3d: Bind the texture before calling wined3d_volume_upload_data() in wined3d_volume_load_location().
2015-04-16 20:44:31 +09:00
Henri Verbeet
aad0ab8101
wined3d: Properly handle WINED3DSIH_DP2 in the GLSL shader backend.
2015-04-15 22:21:59 +09:00
Henri Verbeet
a37099e132
wined3d: Bind sampler objects to the correct texture stage.
...
On current hardware this generally only makes a difference for vertex
textures. This fixes a regression introduced by commit
c6232e1d11
.
2015-04-15 22:21:58 +09:00
Henri Verbeet
dc53f6c2e6
wined3d: Use the display format if WINED3DFMT_UNKNOWN is passed as backbuffer format for windowed mode resets.
2015-04-15 22:21:58 +09:00
Stefan Dösinger
27209c69a9
wined3d: Call arbfp_blit_surface and ffp_blit_blit_surface through the blit interfaces.
2015-04-15 22:21:58 +09:00
Stefan Dösinger
6b455e74a0
wined3d: Move fixed function draw blits out of surface_blt_special.
2015-04-15 22:21:58 +09:00
Stefan Dösinger
f84d741cb3
wined3d: Implement color keying in the ARB fixed function pipeline.
2015-04-15 22:21:58 +09:00
Stefan Dösinger
483d9550c4
wined3d: Use finer grained colorkey state invalidation.
2015-04-15 22:21:58 +09:00
Stefan Dösinger
382fa588a9
wined3d: Handle color key dirtification in wined3d_cs_exec_set_texture.
2015-04-15 22:21:57 +09:00
Joachim Priesner
8fff427bc0
wined3d: Load ModelView matrix for glLightfv calls.
...
Analogous to the light() function in state.c, the correct ModelView
matrix has to be loaded when glLightfv is called.
2015-04-13 16:41:48 +09:00
Stefan Dösinger
c5c7137212
wined3d: Simplify alpha test and color keying in GLSL.
2015-04-10 21:44:13 +09:00
Stefan Dösinger
5c7707dc77
wined3d: Move alpha test states to the fragment pipeline.
...
This will allow some color keying cleanups. For Core Contexts we'll have
to emulate alpha testing in shaders anyway.
2015-04-10 21:44:01 +09:00
Stefan Dösinger
f4b6874491
wined3d: Match blitter and fragment processing color keying capabilities.
...
This is necessary if e.g. the nvts or ffp fragment processing pipeline
is selected for debugging purposes on a GPU that otherwise supports the
ARB program blitter.
2015-04-10 21:43:51 +09:00
Stefan Dösinger
5d51c97d07
wined3d: Implement color keying in the glsl fragment pipeline.
2015-04-10 21:43:31 +09:00
Stefan Dösinger
2d56694445
wined3d: Implement color keying in arbfp_blit.
2015-04-10 21:43:12 +09:00
Stefan Dösinger
439076d591
wined3d: Allow ARB blits from converted surfaces.
2015-04-10 21:42:47 +09:00
Stefan Dösinger
82db5954c4
wined3d: Set color keys through the command stream.
2015-04-10 21:42:41 +09:00
Maxime Lombard
086d2af629
wined3d: Add support for Nvidia GTX 970M.
2015-04-10 21:42:27 +09:00
Sebastian Lackner
14219b0c3b
wined3d: Fix a typo in vertexshader_init.
...
Should fix the graphical corruptions recently introduced by
002713de6d
.
2015-04-08 23:14:24 +09:00
Sebastian Lackner
3a14df3b9a
wined3d: Fix typo in init_output_registers.
2015-04-08 16:22:41 +09:00
Stefan Dösinger
b413a4e202
wined3d: Add more formats to wined3d_format_convert_color_to_float.
2015-04-07 23:10:33 +09:00
Stefan Dösinger
fa0a9232e0
wined3d: Move surface_convert_color_to_float to utils.c.
2015-04-07 23:10:30 +09:00
Stefan Dösinger
8a101bc1f5
wined3d: Add a function for wined3d_gl_resource_type to texture target conversion.
2015-04-07 23:10:20 +09:00
Stefan Dösinger
f260c17b34
wined3d: Use a shader for unconverted blits.
2015-04-07 23:10:14 +09:00
Stefan Dösinger
e8b9f8134d
wined3d: Define a constant for the blit texture size parameter.
2015-04-03 00:33:29 +09:00
Stefan Dösinger
ad50f872ae
wined3d: Pass a struct arbfp_blit_type to the blit shader generation functions.
2015-04-03 00:33:28 +09:00
Stefan Dösinger
6cf421399b
wined3d: Use bitfields in struct arbfp_blit_type.
2015-04-03 00:33:28 +09:00
Stefan Dösinger
da7abd29b4
wined3d: Pass a wined3d_ffp_texture_type enum to blit shader functions.
2015-04-03 00:33:28 +09:00
Stefan Dösinger
844c4efb47
wined3d: Give tex_type and its values a better name.
2015-04-03 00:33:28 +09:00
Henri Verbeet
94b0e895db
wined3d: Use GLSL 1.30 for SM4 shaders when available.
...
This is required for bitwise operators in particular if no other extension
provides them.
2015-03-31 18:49:28 +09:00
Henri Verbeet
d0d8a7827b
wined3d: Take WINED3D_PIXEL_CENTER_INTEGER into account when calculating vpos.
2015-03-31 18:49:28 +09:00
Henri Verbeet
94967c28b9
wined3d: Add support for half-integer pixel centers.
...
Like in OpenGL and Direct3D 10+.
2015-03-30 19:10:29 +09:00
Matteo Bruni
05757794a0
wined3d: Don't use the builtin FFP uniform for the projection matrix.
2015-03-27 20:40:38 +09:00
Matteo Bruni
7a8ac888de
wined3d: Don't use the builtin FFP uniform for the normal matrix.
2015-03-27 20:40:38 +09:00
Stefan Dösinger
be4c7a0a84
wined3d: Implement per stage constants in atifs.
2015-03-27 20:40:37 +09:00
Stefan Dösinger
3c2d0b983a
wined3d: Avoid constant collision in atifs.
2015-03-24 20:06:18 +09:00
Stefan Dösinger
239e8cad7c
wined3d: Add per-context private data for fragment pipelines.
2015-03-24 20:06:15 +09:00
Stefan Dösinger
1b0c063632
wined3d: Check for conversion changes in the atifs fragment pipeline.
...
Mapping colorop to pixelshader is necessary because misc_state_template
defines a pixel shader handler. We have to use the same representative
in all pipeline parts.
Wined3d_cs_exec_set_texture dirtifies the pixel shader state when the
fixup of a texture changes. Atifs no longer needs a pixel shader handler
on its own since vertex shader updates aren't delayed any more when the
pixel shader state is dirty.
2015-03-24 20:06:05 +09:00
Stefan Dösinger
92fee8c04f
wined3d: Improve color fixups in atifs shaders.
...
The abilities of this hardware is too limited to support generic sign /
swizzle fixups. A generic handler would consume 4 of the 8 available
color instruction slots and 2 alpha instruction slots.
The bump mapping handler code has its own way of handling the color
fixups. It merges the fixup into the perturbation calculation without
requiring extra shader instructions. In theory this is possible for the
majority of d3d texture ops as well, but I don't think this is worth the
effort. I expect that this code will only be used for the ddraw signed
format test in practice.
2015-03-24 20:05:46 +09:00
Henri Verbeet
010ff106dd
d3d10core: Implement d3d10_device_DrawInstanced().
2015-03-24 17:41:17 +09:00
Henri Verbeet
a33d3ad41b
wined3d: Add support for SV_InstanceID.
2015-03-24 17:41:12 +09:00
Henri Verbeet
f9fafb3686
wined3d: Use the "sysval_semantic" field instead of "semantic_name" to recognize SV_POSITION.
2015-03-24 17:41:09 +09:00
Henri Verbeet
1b08196c5a
wined3d: Implement d3d10 style instance data step rates.
2015-03-24 17:41:06 +09:00
Matteo Bruni
74cda79ac3
wined3d: Introduce a get_texture_matrix() function.
2015-03-23 22:59:20 +09:00
Matteo Bruni
2d270f31c6
wined3d: Introduce a get_projection_matrix() function.
...
Notice that I'm using floats instead of doubles in the new function,
mostly to be able to use struct wined3d_matrix and multiply_matrix().
At a rough estimate the precision should still be good enough.
2015-03-23 22:59:19 +09:00
Matteo Bruni
65c8c40b18
wined3d: Use a separate STATE_VIEWPORT state handler in the GLSL pipeline.
2015-03-23 22:59:18 +09:00
Henri Verbeet
88f230b56e
d3d10core: Also pass unused input layout elements to wined3d.
...
While these won't be used by the shader, they potentially affect the
calculated offset for WINED3D_APPEND_ALIGNED_ELEMENT elements.
2015-03-23 22:59:12 +09:00
Henri Verbeet
cbe717b8f3
wined3d: Take the input slot into account when handling WINED3D_APPEND_ALIGNED_ELEMENT.
2015-03-23 22:59:11 +09:00
Henri Verbeet
f3765e9f77
wined3d: Merge some common shader initialization code into shader_init().
2015-03-23 22:59:10 +09:00
Henri Verbeet
002713de6d
wined3d: Store shader input signatures as a wined3d_shader_signature structure.
2015-03-23 22:59:08 +09:00
Henri Verbeet
2e5ad1b6e3
wined3d: Store shader output signatures as a wined3d_shader_signature structure.
...
Instead of a fixed array of wined3d_shader_signature_element structures.
Shader model 4 shaders can have different semantics in a single
register, e.g. v1.xy TEXCOORD0 and v1.zw TEXCOORD1, so having a single
wined3d_shader_signature_element structure per register isn't
necessarily sufficient.
2015-03-23 22:59:07 +09:00
Henri Verbeet
ec78d50193
wined3d: Fix a TRACE in wined3d_device_draw_indexed_primitive_instanced().
2015-03-20 21:32:50 +09:00
Henri Verbeet
ba396e4212
wined3d: Simplify the wined3d_matrix structure.
2015-03-20 21:32:46 +09:00
Francois Gouget
f505e6fb4a
Assorted spelling fixes.
2015-03-19 21:54:14 +09:00
Matteo Bruni
9811d85141
wined3d: Don't use the builtin FFP uniform for the modelview matrix.
2015-03-19 20:56:59 +09:00
Matteo Bruni
425dc69fef
wined3d: Use a separate STATE_TRANSFORM(WINED3D_TS_VIEW) state handler in the GLSL pipeline.
2015-03-19 20:56:56 +09:00
Matteo Bruni
99f3e835ac
wined3d: Use a separate STATE_VDECL state handler in the GLSL pipeline.
...
It's mostly a copy of vertexdeclaration() from state.c, with a few
differences due to the new function being private to the GLSL backend
(e.g. d3d_info.vs_clipping is known to be TRUE) and the fragment fog
update part being split out.
2015-03-19 20:56:50 +09:00
Matteo Bruni
50861156e2
wined3d: Introduce a get_modelview_matrix() function.
2015-03-19 20:56:45 +09:00
Matteo Bruni
fe4a226bfa
wined3d: Introduce a get_identity_matrix() function.
2015-03-19 20:56:42 +09:00
Stefan Dösinger
df829de88d
ddraw: Handle DDBLT_ROP in ddraw.
2015-03-18 21:03:22 +09:00
Matteo Bruni
38e4cb29e7
wined3d: Depend on the vertex shader state instead of the vertex declaration state where appropriate.
2015-03-18 21:02:55 +09:00
Matteo Bruni
d8c5e417c2
wined3d: Force stream info update on vertex shader change.
2015-03-18 21:02:41 +09:00
Stefan Dösinger
406cfefc2f
wined3d: Initialize WINED3DTA_TEMP.
2015-03-11 22:09:42 +09:00
Matteo Bruni
f298d30b39
wined3d: Fix a typo in a trace in context_create().
2015-03-11 22:08:34 +09:00
Stefan Dösinger
d4db09d0e9
wined3d: Support WINED3DFMT_R5G5_SNORM_L6_UNORM with EXT_texture_snorm.
...
From: Stefan Dösinger <stefandoesinger@gmx.at>
2015-03-10 21:43:34 +09:00
Stefan Dösinger
6df52ca7e6
wined3d: Add support for GL_EXT_texture_snorm.
2015-03-10 21:43:32 +09:00
Stefan Dösinger
6f2f73a456
wined3d: Improve the unsigned emulation of WINED3DFMT_R5G5_SNORM_L6_UNORM.
2015-03-10 21:43:11 +09:00
Stefan Dösinger
ce836bf651
wined3d: Properly up-scale WINED3DFMT_R5G5_SNORM_L6_UNORM.
2015-03-10 21:43:07 +09:00
Bernhard Übelacker
44ddcac6c3
wined3d: Recognize Nvidia GeForce 8100 with Nouveau driver (bug).
2015-03-10 21:42:50 +09:00
Matteo Bruni
db80aba5ad
wined3d: Drop redundant check for instanced rendering from drawStridedFast.
...
We need GL_ARB_instanced_arrays to be able to take the fastest path and
that's already checked in draw_primitive. Note that
GL_ARB_instanced_arrays provides glDrawElementsInstanced if
GL_ARB_draw_instanced is not supported so we don't need to explicitly
check for the latter.
2015-03-02 13:48:00 +09:00
Matteo Bruni
8ed9c2a11b
wined3d: Add a couple checkGLcall() in surface_prepare_rb().
2015-03-02 13:47:56 +09:00
Matteo Bruni
2f804307bd
wined3d: Drop a few unnecessary &x[0].
2015-03-02 13:47:52 +09:00
Matteo Bruni
7f618695c6
wined3d: Remove an obsolete comment.
...
Wined3d doesn't actually require the GLX extension for multisampling
at this point (while it does require FBOs).
2015-03-02 13:47:46 +09:00
Matteo Bruni
67d2b52c27
wined3d: Remove ARB_/EXT_TEXTURE_ENV_ADD.
2015-02-26 20:08:57 +09:00