Stefan Dösinger
17769497eb
wined3d: Drop the color0 mov optimization if the src is overwritten.
2009-07-10 13:07:33 +02:00
Stefan Dösinger
37b73478f1
wined3d: An indirect address op can adjust min and max at the same time.
2009-07-09 12:47:24 +02:00
Henri Verbeet
9cf7888002
wined3d: Fix some cast-qual warnings.
2009-07-09 11:38:07 +02:00
Henri Verbeet
483d552e21
wined3d: Allow shader_buffer_init() to fail.
2009-07-09 11:38:02 +02:00
Henri Verbeet
40b411958b
wined3d: Rename "SHADER_BUFFER" to something sane.
2009-07-09 11:37:58 +02:00
Henri Verbeet
bddc4d3f0d
wined3d: Reuse the shader buffer between shaders.
2009-07-09 11:37:53 +02:00
Henri Verbeet
6211643bf5
wined3d: Fix a sign compare warning in shader_vaddline().
2009-07-08 20:14:44 +02:00
Henri Verbeet
3484d46a36
wined3d: Replace some shader_is_pshader_version() calls with plain type checks.
2009-07-07 11:50:35 +02:00
Henri Verbeet
2ac34bf231
wined3d: Add some missing float suffixes.
...
The compiler should be smart enough to fix most of these, but it looks sloppy.
2009-07-07 11:50:05 +02:00
Henri Verbeet
ca69ec0e85
wined3d: Recognize geometry shaders in shader_trace_init().
2009-07-01 11:41:27 +02:00
Henri Verbeet
5df58b7f89
wined3d: Replace "pshader" checks with explicit type checks in shader_get_registers_used().
2009-07-01 11:41:21 +02:00
Henri Verbeet
1911adcea5
wined3d: Consolidate "color0_mov" handling a bit.
2009-06-30 12:55:45 +02:00
Henri Verbeet
02a0614aa1
wined3d: Use dst_param.reg.idx to index reg_maps->texcoord_mask.
2009-06-30 12:55:40 +02:00
Henri Verbeet
03702e1de3
wined3d: Remove some redundant pshader checks.
2009-06-30 12:55:24 +02:00
Henri Verbeet
592361be38
wined3d: Pass the shader type to shader_record_register_usage().
2009-06-30 12:55:19 +02:00
Henri Verbeet
5b6877ee62
wined3d: Remove shader_is_version_token().
2009-06-30 12:55:11 +02:00
Stefan Dösinger
5859d87754
wined3d: Implement function calls with NV exts.
2009-06-29 12:28:21 +02:00
Stefan Dösinger
bd14b6e2b4
wined3d: IFC requires GL_NV_fragment_program2.
2009-06-26 12:01:44 +02:00
Stefan Dösinger
26d17fe04c
wined3d: Implement MRTs in ARB.
2009-06-22 11:26:43 +02:00
Stefan Doesinger
58c3a0c832
wined3d: Implement vpos and vface.
2009-06-17 12:19:31 +02:00
Stefan Doesinger
ae600fe0c8
wined3d: Implement texldl in ARB.
2009-06-17 12:19:15 +02:00
Stefan Doesinger
c220bafa2c
wined3d: Unroll loops in ARB if needed.
...
This is needed to allow us to claim vs_2_0 support with plain
GL_ARB_vertex_program. vs_2_0 allows loops without breaks.
2009-06-16 13:57:04 +02:00
Stefan Dösinger
de12f880ce
wined3d: Don't enable the NV frag extensions if we don't need them.
...
Enabling the NV extensions occupies a temp register for some reason. Avoid
needlessly enabling it.
2009-06-01 16:16:00 +02:00
Stefan Dösinger
d8e219be75
wined3d: Avoid the TMP_COLOR mov in some cases.
...
Many 2.0 and 3.0 shaders end with a "mov oC0, rx". If sRGB writing is enabled,
the ARB backend writes to a TMP_COLOR temporary, and at the end of the shader
writes the sRGB corrected color to result.color. If oC0 is not partially
rewritten after the mov, we can ignore the mov, not declare TMP_COLOR at all,
and just use the rx register as input for the sRGB correction code. This saves
a temporary and an instruction.
2009-05-29 11:27:44 +02:00
Stefan Dösinger
e70c80add9
wined3d: Emulate if(bool) in ARB shaders.
2009-05-28 12:46:01 +02:00
Stefan Dösinger
e492dd858e
wined3d: Add a function around the handler table.
...
This reduces the number of methods in the shader backend(the instr
modifiers can be handled in that wrapper) and it will help flow
control emulation in the ARB backend.
2009-05-28 12:45:45 +02:00
Stefan Dösinger
8763f6eac5
wined3d: Make find_gl_vshader backend specific.
2009-05-28 12:45:10 +02:00
Stefan Dösinger
d0d681c81e
wined3d: Make find_gl_pshader backend private.
2009-05-28 12:44:43 +02:00
Henri Verbeet
fcf7844653
wined3d: Match the d3d10 name for WINED3DDECLUSAGE_POSITION.
...
I.e., make sure that if a SM4 shader uses SV_POSITION it ends up as position
data.
2009-05-28 12:42:18 +02:00
Henri Verbeet
2ee0d47a49
wined3d: Use strings for shader input/output semantics.
2009-05-27 11:12:12 +02:00
Henri Verbeet
19cb4594e3
wined3d: Use a separate structure for vertex shader attributes.
...
In D3D10 shaders input/output semantics are strings rather than predefined
types. Unfortunately, the code in vshader_get_input() can be performance
critical, depending on application behaviour. Since vshader_get_input() is
only relevant for d3d9 shaders anyway, just store the usage and usage_idx for
these shaders.
2009-05-27 11:12:07 +02:00
Henri Verbeet
e6efb797c3
wined3d: Make "packed_output" a bitmap.
2009-05-27 11:11:57 +02:00
Henri Verbeet
10fadadc54
wined3d: Use the "input_registers" bitmap for vertex shader attributes as well.
2009-05-27 11:11:53 +02:00
Henri Verbeet
664b17b9ee
wined3d: Make "packed_input" a bitmap.
2009-05-27 11:11:48 +02:00
Stefan Dösinger
7b1d48721d
wined3d: Emulate the 4 component address register in ARB.
2009-05-20 10:55:17 +02:00
Stefan Dösinger
c7ca3793cc
wined3d: Implement mova rounding in arb.
2009-05-20 10:55:03 +02:00
Henri Verbeet
adc9bfe3fd
wined3d: Pass a struct wined3d_shader_register to shader_record_register_usage().
2009-05-12 11:18:02 +02:00
Henri Verbeet
2039702035
wined3d: Pass a struct wined3d_shader_register to shader_dump_register().
2009-05-12 11:17:56 +02:00
Henri Verbeet
d2409581e0
wined3d: Record register usage only once.
2009-05-08 18:16:48 +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
5e473cb17f
wined3d: Group register information into struct wined3d_shader_register.
2009-05-08 12:13:17 +02:00
Henri Verbeet
690d666de5
wined3d: Add support for immediate constants to shader_dump_register().
2009-05-07 14:44:22 +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
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