H. Verbeet
0fae42da50
wined3d: Cleanup shader_glsl_get_input_register_swizzle().
2006-12-29 20:55:51 +01:00
H. Verbeet
2b9a63b5d1
wined3d: Cleanup shader_glsl_get_output_register_swizzle().
2006-12-29 20:55:25 +01:00
H. Verbeet
a22933e08e
wined3d: The default debug channel for arb_program_shader.c & glsl_shader.c already is d3d_shader.
2006-12-28 12:18:09 +01:00
H. Verbeet
c972351051
wined3d: Move set_glsl_shader_program() to glsl_shader.c.
2006-12-28 12:17:49 +01:00
H. Verbeet
e4fc45e0fe
wined3d: Allow wined3d to handle multiple render targets.
2006-12-20 12:32:30 +01:00
Dmitry Timoshkov
47ffd7ae95
wined3d: Make some data const.
2006-12-14 20:11:41 +01:00
H. Verbeet
533dcbf170
wined3d: Use the texture sampling function in a few more instructions (GLSL).
2006-11-28 12:22:32 +01:00
H. Verbeet
ac651a7058
wined3d: Fix the texm3x3tex instruction to sample properly.
2006-11-28 12:19:48 +01:00
H. Verbeet
e7122e9a79
wined3d: Create a separate function for sampling a texture.
2006-11-28 12:19:39 +01:00
H. Verbeet
df6f482a69
wined3d: Move some code specific to the different shader backends into the respective source files.
2006-11-28 12:19:19 +01:00
Kovács András
eb7b1f4bce
wined3d: Fix introduced regression in shader_glsl_mnxn and vshader_hw_mnxn.
2006-10-30 20:37:34 +01:00
Ivan Gyurdiev
ce2e980d1b
wined3d: Add shader version/end masks to the WINED3D namespace.
2006-10-13 11:15:45 +02:00
Ivan Gyurdiev
9846602412
wined3d: Add D3DTEXTURETRANSFORMTYPE to the WINED3D namespace.
2006-10-13 11:15:31 +02:00
Ivan Gyurdiev
b7edf5b008
wined3d: Add D3DSHADER_ADDRMODE masks to the WINED3D namespace.
2006-10-13 11:15:00 +02:00
Ivan Gyurdiev
837027fcb7
wined3d: D3DTEXTURESTAGESTATETYPE: Consistently use in WINED3D namespace.
2006-10-11 12:18:53 +02:00
Ivan Gyurdiev
82379f22a7
wined3d: Move D3DSP dest modifier related items into the WINED3D namespace.
2006-10-10 13:38:45 +02:00
Ivan Gyurdiev
76b571cb48
wined3d: Move D3DSP source modifier-related items into the WINED3D namespace.
2006-10-10 13:38:36 +02:00
Ivan Gyurdiev
17c9d9588a
wined3d: Move D3DSP_REG structures into the WINED3D namespace.
2006-10-10 13:37:49 +02:00
Ivan Gyurdiev
e8137632c7
wined3d: Move D3DSP DCL-related structures into WINED3D namespace.
2006-10-10 13:37:35 +02:00
Ivan Gyurdiev
7259b9d8b6
wined3d: Move D3DSPR structure into the WINED3D namespace.
2006-10-10 13:37:12 +02:00
Ivan Gyurdiev
062541c026
wined3d: Move D3DSIO structure into WINED3D namespace.
2006-10-10 13:37:03 +02:00
Ivan Gyurdiev
3dcd3681f3
wined3d: Win64 printf fixes.
2006-10-02 14:38:04 +02:00
Ivan Gyurdiev
42a9262acf
wined3d: Read GL info and load constants into the same device.
2006-09-27 19:53:43 +02:00
Ivan Gyurdiev
d0032a1a2a
wined3d: Move device pointer into the BaseShader class.
2006-09-27 19:44:09 +02:00
Stefan Dösinger
581c24ef4e
wined3d: Use GL_EXTCALL.
...
That fixes compilation with gl headers that do not know about glUniform4fvARB.
2006-09-26 11:41:53 +02:00
Stefan Dösinger
96bce8d6d4
wined3d: Avoid wasting a uniform.
2006-09-25 18:24:19 +02:00
Stefan Dösinger
d4a88724dd
wined3d: Load projected textures in fragment shaders.
2006-08-25 11:19:15 +02:00
H. Verbeet
09eb0c40a6
wined3d: Improve float constant loading a bit.
...
- Use a list to keep track of what constants are set.
- Move TRACEs and checkGLcall calls out of the main constant loading loop.
2006-08-21 12:17:42 +02:00
H. Verbeet
49f4c68e29
wined3d: Lookup GLSL float uniform locations only once per program.
2006-08-21 12:16:27 +02:00
H. Verbeet
2358fbbb03
wined3d: Fix indices for the float constant map.
...
Indices for the float constant map should be multiplied by 4 because
we're loading 4 component float vectors, not because the size of a
float is 4.
2006-08-21 12:15:12 +02:00
Phil Costin
ef1c8fd118
wined3d: Fix vertex shader corruption issue.
2006-08-14 11:45:33 +02:00
Roderick Colenbrander
31abc2febd
wined3d: Draw buffers support.
2006-08-10 10:54:50 +02:00
Jason Green
2e52b36bb3
wined3d: Declare a 1D sampler for TEXDP3TEX (GLSL).
2006-07-29 11:50:02 +02:00
Jason Green
72bfe131d1
wined3d: More shader fixes / new instructions.
...
- Replace gl_FragColor with gl_FragData[0] for GLSL pixel shader output.
- Subtract 1 more constant from total GLSL allowed float constants to
accommodate the PROJECTION matrix row that we reference.
2006-07-28 14:01:16 +02:00
Michael Stefaniuc
5ca9f82661
wined3d: Remove superfluous breaks.
2006-07-26 10:24:15 +02:00
Jason Green
7e90aba97b
wined3d: Implement more GLSL instructions.
...
Implement D3DSIO_TEXREG2AR, TEXREG2GB, TEXREG2RGB, TEXM3X3TEX, TEXM3X3SPEC.
2006-07-25 11:22:55 +02:00
Jason Green
718716b77a
wined3d: Make the number of floating point shader constants dynamic.
2006-07-19 09:54:30 +02:00
Ivan Gyurdiev
436d700c2e
wined3d: Fix cmp instruction for GLSL.
...
The current GLSL cmp instruction is incorrect, because:
- it ignores destination write mask
- it ignores source swizzle
- it ignores other source modifiers.
- it works incorrectly for src0 = 0
2006-07-14 13:32:38 +02:00
Ivan Gyurdiev
33293df143
wined3d: More flow control instructions.
...
- Implement call, callnz, label, and ret
- Implement support for NOT modifier
2006-07-11 17:14:24 +02:00
Ivan Gyurdiev
6ede56495a
wined3d: More flow control instructions
...
- Implement if, else, endif, rep, endrep, break
- Implement ifc, breakc, using undocumented comparison bits in the instruction token
- Fix bug in main loop processing of codes with no dst token
- Fix bug in GLSL output modifier processing of codes with no dst token
- Fix bug in loop implementation (src1 contains the integer data, src0 is aL)
- Add versioning for all the instructions above, and remove
GLSL_REQUIRED thing, which is useless and should be removed from all
opcodes in general.
2006-07-11 17:13:05 +02:00
Ivan Gyurdiev
8068fc3b9c
wined3d: Clamp texcoord output between 0 and 1.
2006-07-11 17:12:04 +02:00
Ivan Gyurdiev
e9de563e41
wined3d: Place immediate constants in the same array as global constants.
...
- move DEF, DEFI, DEFB handling into the register counting pass
- keep track of defined constants as a linked list (because there's a
few of them)
- apply immediate constants after global constants in the constant
loading function
- both types of constants now get loaded with array notation in the
shader (into the same array)
2006-07-11 17:11:30 +02:00
Ivan Gyurdiev
c58e06548e
wined3d: Fix typo breaking 3.0 pshaders color input.
2006-07-10 11:48:11 +02:00
Ivan Gyurdiev
5b3c500efe
wined3d: Reverse semantics maps for shaders.
2006-07-07 17:39:26 +02:00
Jason Green
c562c4c771
wined3d: Fix D3DSIO_TEXKILL for GLSL.
2006-07-07 16:57:51 +02:00
Jason Green
3529e0ceeb
wined3d: Fix D3DSIO_M#X# instruction for both ARB and GLSL shaders.
...
This instruction was being handled incorrectly in the case where the
2nd src argument contained a relatively addressed constant.
2006-07-06 16:31:24 +02:00
Ivan Gyurdiev
276609e1e5
wined3d: Move register count pass to SetFunction.
...
Move semantics pointers out of the reg_maps, make them persistent data
in the shader (again, for future software shaders).
2006-07-06 16:07:38 +02:00
Jason Green
4fbe97e5e7
wined3d: Fix a few GLSL shader instruction translations.
...
This fixes the translations for a few instructions in GLSL and allows
Cubemap sampling in pixel shaders < 2.0. It makes some of the
lighting on textures in Half Life 2 look better, including some of the
water effects. It's not perfect yet, but much closer now.
2006-06-29 14:41:01 +02:00
Jason Green
baf38b3007
wined3d: Implement more GLSL instructions and a little cleanup.
...
- Implement D3DSIO_DP2ADD, D3DSIO_TEXKILL, D3DSIO_TEXM3X3PAD
- Partially implement D3DSIO_TEXBEM, D3DSIO_TEXM3X3VSPEC (as much as
they are implemented in ARB_fragment_program at least).
- Stop copying the SHADER_PARSE_STATE struct in each ARB shader
routine - use a pointer instead.
2006-06-27 11:16:10 +02:00
Jason Green
e0ccbeb282
wined3d: Bind correct number of samplers for GLSL shaders.
...
We are only checking against GL_MAX_TEXTURES when binding samplers,
when we should be checking against the maximum number of samplers that
the card supports. Spotted by H. Verbeet.
2006-06-21 11:16:07 +02:00