Commit Graph

95 Commits

Author SHA1 Message Date
Stefan Dösinger 8f3accc718 wined3d: Care for the inverted y coords in dsy. 2007-10-22 15:59:04 +02:00
Stefan Dösinger 3f16f02940 wined3d: Nested loop support. 2007-10-04 12:03:59 +02:00
Stefan Dösinger 9c6cdda147 wined3d: Reverse the position fixup if the pshader is reading vpos. 2007-10-03 11:02:48 +02:00
Stefan Dösinger c5eb531249 wined3d: Bem is an instruction and uses registers. 2007-10-01 13:00:25 +02:00
Stefan Dösinger daf2290ea4 wined3d: Implement the nrm instruction in arb. 2007-09-27 11:57:29 +02:00
Stefan Dösinger 2b2c9199e8 wined3d: Unify pixel format correction. 2007-09-24 13:30:21 +02:00
Stefan Dösinger 02114ac21f wined3d: The D3DSI_COISSUE flag changes the behavior of cnd. 2007-09-14 14:26:26 +02:00
Stefan Dösinger 7248354067 wined3d: Pixel shader 1.x constants are clamped to [-1;1]. 2007-09-14 14:23:45 +02:00
Stefan Dösinger 5ab9d85c39 wined3d: Implement texbeml. 2007-09-12 12:10:03 +02:00
H. Verbeet 89245248c7 wined3d: Handle the ps_3_0 vPos field. 2007-05-04 13:41:54 +02:00
Fabian Bieler c4bbed4854 wined3d: Mark vertex shader 3.0 as foggy shaders if they write out the fog coord. 2007-04-13 12:58:12 +02:00
Felix Nawothnig 18c9e5d5d0 wined3d: Use GL_TEXTURE_2D for dummy textures. 2007-03-30 11:25:23 +02:00
Fabian Bieler 333de16fb6 wined3d: Implement support for projective textures in ps 2.0 and later. 2007-03-29 21:15:29 +02:00
Stefan Dösinger bee084503b wined3d: Implement bem shader instruction. 2007-03-27 12:30:38 +02:00
Andrew Talbot 2f5f3825c6 wined3d: Replace inline static with static inline. 2007-03-17 20:04:46 +01:00
Stefan Dösinger 49a49fcfec wined3d: Load one bump mapping environment matrix into pixel shaders if needed. 2007-02-15 11:36:01 +01:00
H. Verbeet 8f0884066f wined3d: Add WINED3DDECLUSAGE, use it. 2007-02-14 13:50:22 +01:00
Stefan Dösinger fa97fbdcad wined3d: Make shader_cleanup more useful. 2007-02-12 12:37:48 +01:00
H. Verbeet a31f2fd9fc wined3d: Use %s in trace. 2007-01-19 12:28:58 +01:00
H. Verbeet cb26d59d26 05/49: wined3d: Only add line numbers for new lines in shader_addline(). 2007-01-16 16:02:28 +01:00
H. Verbeet 845cd590d2 wined3d: Remove dead code in shader_get_registers_used().
As spotted by Christoph Bumiller, these branches are now never
reached. Also, at least in the case of WINED3DSIO_TEXM3x3SPEC and
WINED3DSIO_TEXM3x3VSPEC the old code was not quite correct, since we
can lookup rather than guess the texture type these days.
2006-12-29 20:55:16 +01:00
H. Verbeet 74b85c8b38 wined3d: Create samplers for all 1.x instructions that sample. 2006-12-28 12:18:41 +01:00
Dmitry Timoshkov 47ffd7ae95 wined3d: Make some data const. 2006-12-14 20:11:41 +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
Andrew Talbot 5381dd2cf6 wined3d: Cast-qual warnings fix. 2006-11-27 13:43:00 +01:00
H. Verbeet 8afe27dacd wined3d: Fix GL_ARB_texture_cube_map extension support. 2006-11-20 11:50:14 +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 b7edf5b008 wined3d: Add D3DSHADER_ADDRMODE masks to the WINED3D namespace. 2006-10-13 11:15:00 +02:00
Ivan Gyurdiev 29aa316d67 wined3d: Add D3DSI and other opcode masks to the WINED3D namespace. 2006-10-13 11:14:47 +02:00
H. Verbeet 94a86c1224 wined3d: Improve shader_dump_decl_usage() TRACEs. 2006-10-10 19:58:39 +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
Stefan Dösinger 760456dc7f wined3d: Find the correct sampler type for < 2.0 pshaders. 2006-08-28 11:37:24 +02:00
Jason Green e5fc18a505 wined3d: Skip processing of D3DSIO_PHASE instruction. 2006-07-29 11:50:10 +02:00
Jason Green 2e52b36bb3 wined3d: Declare a 1D sampler for TEXDP3TEX (GLSL). 2006-07-29 11:50:02 +02:00
Christian Costa 2dc451e181 wined3d: Readd missing copyright to shaders files. 2006-07-18 11:10:34 +02:00
Jason Green 6a97f2202e wined3d: Fix for vertex shaders. 2006-07-17 15:05: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 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 5638fac685 wined3d: Trace ABS/ABSNEG modifiers. 2006-07-07 17:40:03 +02:00
Ivan Gyurdiev 5b3c500efe wined3d: Reverse semantics maps for shaders. 2006-07-07 17:39:26 +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
Ivan Gyurdiev 771623692e wined3d: Rework shader mode selection.
- currently half the shader selection code (GLSL vs ARB) is in
fillGLcaps. The parts that check for software shaders are in
GetDeviceCaps. That placement, will work, but is definitely not optimal.
FillGLcaps should detect support - it should not make decision as to
what's used, because that's not what the purpose of the function is.
GetDeviceCaps should report support as it has already been selected.
Instead, select shader mode in its own function, called in the
appropriate places.

- unifying pixel and vertex shaders into a single selection is a
mistake. A software vertex shader can be coupled with a hardware arb or
glsl pixel shader, or no shader at all. Split them back into two and add
a SHADER_NONE variant.

- drawprim is doing support checks for ARB_PROGRAM, and making shader
decisions based on that - that's wrong, support has already been
checked, and decided upon, and shaders can be implemented via software,
ARB_PROGRAm or GLSL, so that support check isn't valid.

- Store the shader selected mode into the shader itself. Different types
of shaders can be combined, so this is an improvement. In fact, storing
the mode into the settings globally is a mistake as well - it should be
done per device, since different cards have different capabilities.
2006-07-06 16:07:37 +02:00
Ivan Gyurdiev 0111e15e1f wined3d: Fix faulty DCL trace. 2006-07-03 12:04:23 +02:00