Henri Verbeet
9a579a43b1
wined3d: Use the output signature to map SM4 pixel shader outputs to the appropriate register.
2009-05-11 12:43:00 +02:00
Stefan Dösinger
2fd485ae31
winedd: Move shader_*_add_instruction_modifiers into the shader backend.
2009-05-08 12:20:18 +02:00
Stefan Dösinger
f9276a6429
wined3d: Keep track of used float constants.
2009-05-08 12:15:15 +02:00
Henri Verbeet
69cbb57bfd
wined3d: Add support for immediate constants to the GLSL backend.
2009-05-08 12:13:49 +02:00
Henri Verbeet
96005c0fca
wined3d: Pass a struct wined3d_shader_register to shader_is_scalar().
2009-05-08 12:13:46 +02:00
Henri Verbeet
5e473cb17f
wined3d: Group register information into struct wined3d_shader_register.
2009-05-08 12:13:17 +02:00
Henri Verbeet
65622a052c
wined3d: Create a struct wined3d_shader_version to store version information.
...
The version tokens in SM1-3 and SM4 are similar, but not the same.
2009-05-07 14:44:21 +02:00
Henri Verbeet
5c63d93e18
wined3d: Store the shader version in the frontend's private data.
2009-05-07 14:44:21 +02:00
Henri Verbeet
9381a41681
wined3d: Add an initial shader_sm4_read_src_param() implementation.
2009-05-06 12:21:05 +02:00
Henri Verbeet
699eae0cf7
wined3d: Shift the writemask in the frontend.
2009-05-06 12:20:57 +02:00
Stefan Dösinger
f5e24f7a85
wined3d: Implement texldd.
...
GL_ARB_shader_texture is supported on dx9 ATI cards(and probably dx10
ones too). For Nvidia cards I included a fallback to normal texld.
GL_EXT_gpu_shader4 supports similar texture*Grad GLSL functions, just
with an EXT prefix instead of ARB. For dx9 NV cards we'd have to use
GL_NV_fragment_program2, which supports a texldd equivalent on those
cards.
2009-05-05 14:12:52 +02:00
Henri Verbeet
454dd2ed07
wined3d: Implement shader_sm4_is_end().
2009-05-05 11:34:39 +02:00
Henri Verbeet
2a5a6a3439
wined3d: Store the SM 1-3 opcode information tables in the SM 1-3 frontend.
2009-05-05 11:34:28 +02:00
Henri Verbeet
868f5bfc7c
wined3d: Handle reading the shader header in the frontend.
...
In SM 1-3 this is just the version, in SM4 this also includes the token count.
2009-05-05 11:34:15 +02:00
Henri Verbeet
ef074cdde1
wined3d: Introduce a stubbed SM4 shader frontend.
2009-05-05 11:34:07 +02:00
Henri Verbeet
dddd1f0211
wined3d: Select the frontend based on the version token.
2009-05-04 12:53:16 +02:00
Henri Verbeet
5f96c0083a
wined3d: Add a frontend function to determine if there are any tokens left.
2009-05-04 12:53:12 +02:00
Henri Verbeet
2378108eb9
wined3d: Create a frontend for parsing shaders.
2009-05-04 12:53:08 +02:00
Henri Verbeet
5a7afd9b2a
wined3d: Move SM 1-3 parsing functions to their own file.
2009-05-04 12:53:04 +02:00
Henri Verbeet
7420a96736
wined3d: Merge wined3d_private_types.h into wined3d_private.h.
2009-05-01 13:11:57 +02:00
Henri Verbeet
65321dd1ce
wined3d: Introduce shader_sm1_read_semantic().
2009-04-29 13:08:08 +02:00
Henri Verbeet
8d4c90496f
wined3d: Store the sampler type in struct shader_reg_maps.
...
Instead of the usage token.
2009-04-29 13:08:01 +02:00
Stefan Dösinger
8513f64a01
wined3d: Emulate R16G16F and R32G32F if GL_ARB_texture_rg is not supported.
...
Nvidia doesn't offer it on geforce 7 and earlier cards, but some games need
it. This is surprising because the extension was made specifically for
compatibility purposes for older cards.
2009-04-28 13:10:03 +02:00
Henri Verbeet
d32d308798
wined3d: Remove some redundant defines.
2009-04-28 13:10:02 +02:00
Henri Verbeet
e001876163
wined3d: Create a separate function to record register usage.
2009-04-28 13:10:02 +02:00
Henri Verbeet
2b07565d6e
wined3d: Store D3D shader opcode names in a separate table.
2009-04-27 13:25:09 +02:00
Stefan Dösinger
7ab6c22f5a
wined3d: Support the full amount of constants in GLSL.
...
This patch advertises all GL reported float uniforms to the D3D app to
reach the 256 constants required by Shader Model 3.0 on dx9 cards. If
the shader does not use indirect addressing, all 256 constants are
declared. The compiler can then figure out which constants are
actually used. This makes shaders work that use high constant indices,
but don't use all 256 constants.
2009-04-27 13:24:00 +02:00
Henri Verbeet
2dcfdd5b55
wined3d: Use a more reasonable limit for the number of mipmap levels.
...
256 is quite ridiculous, considering the dimensions are only UINTs. Perhaps
these arrays should be dynamically allocated in the first place though.
2009-04-24 11:52:51 +02:00
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
Henri Verbeet
d6494ad00c
wined3d: Move some frontend specfic code to baseshader.c.
2009-04-23 14:22:06 +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
db5ab97125
wined3d: Store the source swizzle in struct wined3d_shader_src_param.
2009-04-21 14:00:02 +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
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
d3fc7dca99
wined3d: Get rid of the "token" field from struct wined3d_shader_dst_param.
2009-04-14 15:25:07 -05:00
Tobias Jakobi
0c2514bd8f
wined3d: Rename some NP2 fixup variables and update comments.
2009-04-13 17:32:11 -05: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
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
62d9dc2177
wined3d: Store the relative addressing mode in struct wined3d_shader_dst_param.
2009-04-10 10:23:20 +02:00
Henri Verbeet
22e57d025c
wined3d: Store the destination shift in struct wined3d_shader_dst_param.
2009-04-10 10:23:15 +02:00
Stefan Dösinger
cb1c9dcda9
d3d: Remove the format from index buffers.
2009-04-09 16:28:25 +02:00
Stefan Dösinger
f0efa97413
wined3d: Remove the buffer fvf.
2009-04-09 16:28:10 +02:00
Henri Verbeet
9ec0b09d35
wined3d: Store usage and usage_idx in struct wined3d_shader_semantic.
...
Instead of the usage token.
2009-04-08 11:42:19 +02:00
Henri Verbeet
d12e489272
wined3d: Store a struct wined3d_shader_dst_param in struct wined3d_shader_semantic.
2009-04-08 11:41:59 +02:00