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
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
db5ab97125
wined3d: Store the source swizzle in struct wined3d_shader_src_param.
2009-04-21 14:00:02 +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
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
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
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
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
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
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
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
Henri Verbeet
9a28d273bc
wined3d: Explicitly pass the register type and index to pshader_get_register_name().
2009-04-10 10:23:24 +02:00
Henri Verbeet
22e57d025c
wined3d: Store the destination shift in struct wined3d_shader_dst_param.
2009-04-10 10:23:15 +02:00
Henri Verbeet
0f92bbc6bc
wined3d: Store the register type in struct wined3d_shader_dst_param.
2009-04-07 14:21:49 +02:00
Henri Verbeet
6f66c1ddbd
wined3d: Store the write mask in struct wined3d_shader_dst_param.
2009-04-07 14:21:37 +02:00
Henri Verbeet
f0de1622d0
wined3d: Store the destination modifiers in struct wined3d_shader_dst_param.
2009-04-06 12:57:52 +02:00
Henri Verbeet
6660978b44
wined3d: Use register_idx in the ARB shader backend.
2009-04-03 13:01:50 +02:00
Henri Verbeet
7b62165546
wined3d: Store the register index in struct wined3d_shader_dst_param.
2009-04-03 13:01:44 +02:00
Henri Verbeet
7245cd2b81
wined3d: Add a struct wined3d_shader_dst_param for storing destination parameter information.
2009-04-03 13:01:38 +02:00
Henri Verbeet
04b2e0b19b
wined3d: Remove the opcode field from struct wined3d_shader_instruction.
2009-04-03 13:01:30 +02:00
Henri Verbeet
29c9dc989d
wined3d: Use the source and destination parameter count in the ARB shader backend.
2009-04-03 13:01:20 +02:00
Henri Verbeet
7bde2792c2
wined3d: Store the source and destination parameter count in struct wined3d_shader_instruction.
2009-04-02 16:28:29 +02:00
Henri Verbeet
d633b6d47e
wined3d: Avoid comparing against WINED3DSIO_* in the ARB shader backend.
2009-04-02 16:28:29 +02:00
Henri Verbeet
44648b2b91
wined3d: Store the instruction handler index in struct wined3d_shader_instruction.
...
This allows us to avoid comparing against WINED3DSIO_*, which is specific to
the bytecode.
2009-04-02 16:28:29 +02:00
Henri Verbeet
c3a01b315e
wined3d: Use a more reasonable name for "SHADER_OPCODE_ARG".
2009-04-01 14:24:19 +02:00
Henri Verbeet
e44335585e
wined3d: Don't use the opcode_token field in the ARB backend.
2009-04-01 14:24:02 +02:00
Stefan Dösinger
3fbdb64270
wined3d: Update a comment.
...
shader_select takes care of compiling the shader since we have the shader
duplication infrastructure. However, there's still a motivation to skip the
shader_select call if the vertex shader is dirty.
2009-03-30 14:21:52 +02:00
Stefan Dösinger
703dcca61b
wined3d: Fix some whitespace.
2009-03-30 14:21:44 +02:00
Henri Verbeet
afc5744e70
wined3d: Pass format_desc to set_shader().
...
This should be the last unnecessary getFormatDescEntry() call.
2009-03-24 12:57:45 +01:00
Henri Verbeet
a56e3a102b
wined3d: Only return a pointer to struct GlPixelFormatDesc from getFormatDescEntry().
2009-03-13 11:29:10 +01:00
Henri Verbeet
362bc0d694
wined3d: Don't compare const_num against -1.
2009-03-09 14:39:39 +01:00
Stefan Dösinger
5cf764aec2
wined3d: Put the color_correction calls into the instruction handlers.
...
The color correction cannot be done behind the back of the individual
instruction handlers because it might conflict with the instruction's
color modifications and the D3D provided writemask.
2009-02-27 13:14:23 +01:00
Stefan Dösinger
6012475e59
wined3d: Properly update last_was_pshader.
2009-02-24 16:57:30 +01:00
Henri Verbeet
828f42cb1f
wined3d: Add some traces to state handlers.
...
Should make it a bit clearer what's happening in some cases.
2009-02-19 12:53:44 +01:00
Stefan Dösinger
693d9ded47
wined3d: Properly set the fog frag coord according to the FOGTABLEMODE.
...
This also fixes the test that an earlier patch broke, so the todo_wine can be
removed again.
2009-02-11 12:21:44 +01:00
Stefan Dösinger
8dcd51286d
WineD3D: Put vertex shader duplication infrastructure in place.
2009-02-11 12:21:25 +01:00
Michael Stefaniuc
118c75a8c7
wined3d: Remove superfluous pointer casts.
2009-02-03 12:40:14 +01:00
Stefan Dösinger
50109aa969
wined3d: Get rid of last_was_foggy_shader & friends.
...
The fog settings do not depend on wether the shader writes to oFog or not,
instead they depend on the FOGVERTEXMODE and FOGTABLEMODE settings, and if a
vertex shader is bound at all.
It works the same way as with the fixed function, and having a vertex shader
is the same as using pretransformed vertices, just that the fog coord comes
from the shader instead of the specular color:
FOGTABLEMODE != NONE: The Z coord is used, oFog is ignored
FOGTABLEMODE == NONE, with VS: oFog is used
FOGTABLEMODE == NONE, no VS, XYZ: Z is used
FOGTABLEMODE == NONE, no VS, XYZRHW: diffuse color is used
2009-01-20 12:45:40 +01:00
Stefan Dösinger
3c3272dc41
wined3d: Don't single-allocate new gl shaders.
2009-01-20 12:45:09 +01:00
Stefan Dösinger
1deafcb5a7
wined3d: Split the remains of state_fog.
2009-01-12 13:02:49 +01:00