Commit Graph

3056 Commits

Author SHA1 Message Date
Henri Verbeet 35499d0c3c wined3d: Handle the opcode specific control shift in the frontend rather than the backend. 2009-04-24 11:52:28 +02:00
David Adam 33eb939390 wined3d: SetDepthStencilSurface is always called when AutoDepthStencil is enabled. 2009-04-24 11:51:27 +02:00
Francois Gouget 6376941266 wined3d: Avoid using an implicit value to set fogcoord to 0.0. 2009-04-23 18:14:27 +02:00
Henri Verbeet 6f33b97c94 wined3d: Get rid of the shared_handle parameter.
I don't expect us to support this in the near future, and right now it's just
dead code.
2009-04-23 14:22:06 +02:00
Henri Verbeet f88bd17ef6 wined3d: Downgrade an ERR to a WARN. 2009-04-23 14:22:06 +02:00
Henri Verbeet fba6f871cf wined3d: Move frontend specfic constants to baseshader.c. 2009-04-23 14:22:06 +02:00
Henri Verbeet d6494ad00c wined3d: Move some frontend specfic code to baseshader.c. 2009-04-23 14:22:06 +02:00
Henri Verbeet fc60083ed2 wined3d: Handle the destination modifier shift in the frontend rather than the backend. 2009-04-23 14:22:06 +02:00
Henri Verbeet cf1bfc8c68 wined3d: Handle the source modifier shift in the frontend rather than the backend. 2009-04-22 13:14:26 +02:00
Henri Verbeet fec1fa93cf wined3d: Handle the swizzle shift in the frontend rather than the backend. 2009-04-22 13:14:14 +02:00
Henri Verbeet baf2f94b76 wined3d: Get rid of the WINED3DVS_* swizzle constants.
They're redundant.
2009-04-22 13:14:09 +02:00
Henri Verbeet 629801bccb wined3d: Get rid of the token field from struct wined3d_shader_src_param. 2009-04-22 13:14:03 +02:00
Henri Verbeet 7a3d4ce76f wined3d: Pass a struct wined3d_shader_src_param to shader_arb_get_swizzle(). 2009-04-22 13:13:57 +02:00
Henri Verbeet 88c80635c2 wined3d: Pass a struct wined3d_shader_src_param to shader_glsl_get_swizzle(). 2009-04-21 14:00:11 +02:00
Henri Verbeet 612c32ea08 wined3d: Add a separate function for converting swizzles to strings. 2009-04-21 14:00:06 +02:00
Henri Verbeet db5ab97125 wined3d: Store the source swizzle in struct wined3d_shader_src_param. 2009-04-21 14:00:02 +02:00
Henri Verbeet 7f58b906dd wined3d: Explicitly pass the source modifier to shader_glsl_gen_modifier(). 2009-04-21 13:57:04 +02:00
Henri Verbeet 644439ff0d wined3d: Pass a struct wined3d_shader_src_param to pshader_gen_input_modifier_line(). 2009-04-21 13:56:58 +02:00
Stefan Dösinger de4f3dc8e8 wined3d: Merge match_apple and implementation_is_apple. 2009-04-20 16:39:55 +02:00
Stefan Dösinger 39877a2ad2 wined3d: Reserve additional GLSL constants on some drivers.
Some drivers apparently need private constants, or don't have an efficient
immval packing. For example, MacOS seems to need 1 float for each different
relative addressing offset. fglrx has the same issue, although it is more
efficient in general

Previously this worked on most drivers because the 16 + 4 reserved int and
bool constants kept the problem hidden. Now that we are more aggressive with
uniforms we have to keep free room for some drivers.
2009-04-20 16:38:39 +02:00
Stefan Dösinger 78d26a659d wined3d: Move the remaining quirks into the quirk table. 2009-04-20 16:38:07 +02:00
Stefan Dösinger 50e91f8d84 wined3d: Move the generic mac glsl uniform fixup to the quirk table. 2009-04-20 16:37:46 +02:00
Stefan Dösinger 7b7f027221 wined3d: Add a more formal framework for driver quirks.
This allows better defining of driver desc fixups without adding extra if
lines for each card.

For starters, there's a fixup for the advertised GLSL constants in ATI cards.
fglrx advertises 512 GLSL uniforms instead of the supported 1024(means 128
instead of 256 vec4's). This bug was confirmed by ATI.
2009-04-20 16:37:31 +02:00
Francois Gouget 5ef481922f Assorted spelling fixes. 2009-04-20 15:25:26 +02:00
Henri Verbeet ea0b3b42eb wined3d: Pass a struct wined3d_shader_src_param to shader_arb_add_src_param(). 2009-04-20 14:13:33 +02:00
Henri Verbeet 1ae060be4a wined3d: Simplify replicating the .x swizzle in shader_hw_mov().
It becomes even simpler once the swizzle shift and token field are eliminated.
2009-04-20 14:13:28 +02:00
Henri Verbeet 48a096a638 wined3d: Pass a struct wined3d_shader_src_param to shader_glsl_add_src_param(). 2009-04-20 14:13:20 +02:00
Henri Verbeet c7660c57a0 wined3d: Pass a struct wined3d_shader_src_param to shader_glsl_get_register_name() for the relative addressing token. 2009-04-20 14:13:12 +02:00
Henri Verbeet 915b91757f wined3d: Store the destination relative addressing token as a struct wined3d_shader_src_param. 2009-04-20 14:13:08 +02:00
Henri Verbeet 0663eb9323 wined3d: Store the source relative addressing token as a struct wined3d_shader_src_param. 2009-04-20 14:13:00 +02:00
Henri Verbeet d6ee7d59a8 wined3d: Create a relative addressing token for 1.x shaders in the frontend.
Rather than handling this in the backends. Note that the ARB backend always
assumes 1.x shaders.
2009-04-20 14:12:52 +02:00
Henri Verbeet 8ac4c98be2 wined3d: Store the source modifiers in struct wined3d_shader_src_param. 2009-04-15 15:57:35 -05:00
Henri Verbeet b6668b0296 wined3d: Store the register index in struct wined3d_shader_src_param. 2009-04-15 15:57:30 -05:00
Henri Verbeet 4de1dba2c5 wined3d: Store the register type in struct wined3d_shader_src_param. 2009-04-15 15:57:25 -05:00
Henri Verbeet ff62cab537 wined3d: Introduce struct wined3d_shader_src_param. 2009-04-15 15:57:19 -05:00
Henri Verbeet 463de24e7b wined3d: Group instruction context information together in struct wined3d_shader_context. 2009-04-15 15:57:13 -05:00
Henri Verbeet a7e2c2d70c wined3d: Don't die if a vertex shader has samplers.
This fixes a regression introduced by 38239be58c.
2009-04-15 15:57:00 -05:00
Henri Verbeet d3fc7dca99 wined3d: Get rid of the "token" field from struct wined3d_shader_dst_param. 2009-04-14 15:25:07 -05:00
Henri Verbeet 18cdcc0b7e wined3d: Pass a struct wined3d_shader_dst_param to shader_arb_get_write_mask(). 2009-04-14 15:25:01 -05:00
Roderick Colenbrander f2e2e3e499 wined3d: Report the driver description as reported by the Windows drivers when a device string is entered in our device table. 2009-04-13 17:35:44 -05:00
Roderick Colenbrander c238541656 wined3d: Update Nvidia driver version information. 2009-04-13 17:35:25 -05:00
Tobias Jakobi 0c2514bd8f wined3d: Rename some NP2 fixup variables and update comments. 2009-04-13 17:32:11 -05:00
Tobias Jakobi 9657e81429 wined3d: Add newline to fixme. 2009-04-13 17:32:03 -05:00
Tobias Jakobi 6e970c5d95 wined3d: glsl: Enable load_np2fixup_constants. 2009-04-10 14:00:58 +02:00
Tobias Jakobi 9b067a6ca5 wined3d: Add load_np2fixup_constants function to shader backend. 2009-04-10 14:00:50 +02:00
Stefan Dösinger 754b5cf2ad wined3d: Deal with reserved shader constants in the backend.
This moves the GLSL and ARB specific reserved constants out of directx.c into
the get_caps methods of the shader backends. That way the number of reserved
constants remains in the backend.

GL_LIMITS({v/p}shader_constantsF) now contains the real number of constants as
advertised by GL instead of some mixture of GL info and backend implementation
specifics. This makes it easier for backends to decide how many constants to
use.
2009-04-10 11:22:55 +02:00
Stefan Dösinger 99d88c15ea wined3d: Fix the drawRectPatch vertex count.
DrawPrimitive now accepts the number of vertices, not the number of
primitives. This code was forgotten in the patch that changed this.
We're drawing triangles, so we are drawing num_primitives * 3 vertices.
2009-04-10 11:14:45 +02:00
Stefan Dösinger 014c4bfc70 wined3d: Save some memory in vertex buffers.
In most cases we're fine with the vbo and glMapBuffer and never use the actual
heap memory copy. Try to stick to just the vbo copy and avoid allocating the
extra heap memory. In case it is needed(emulation or vertex conversion), fall
back to the old double buffering mode.
2009-04-10 11:14:32 +02:00
Henri Verbeet 3a5bbe6a0c wined3d: Split vshader_program_add_param() in shader_arb_add_src_param() and shader_arb_add_dst_param(). 2009-04-10 10:23:38 +02:00
Henri Verbeet e6031afdfa wined3d: Merge pshader_get_register_name() and part of vshader_program_add_param(). 2009-04-10 10:23:33 +02:00