Commit Graph

614 Commits

Author SHA1 Message Date
Stefan Dösinger f8ca32b3fb wined3d: Break the glDrawPixels call out of UnlockRect. 2006-07-18 11:22:09 +02:00
Christian Costa 2dc451e181 wined3d: Readd missing copyright to shaders files. 2006-07-18 11:10:34 +02:00
Christian Costa 95ac88cc0b wined3d: Fix typo in ARB pixel shader. 2006-07-18 11:10:23 +02:00
H. Verbeet 593541a50c wined3d: Increment texture_idx when continuing as well. 2006-07-18 11:09:46 +02:00
Jason Green 6a97f2202e wined3d: Fix for vertex shaders. 2006-07-17 15:05:38 +02:00
Stefan Dösinger ecbb53a723 wined3d: Break out the frame buffer readback of LockRect, implement palettized readback. 2006-07-17 15:05:38 +02:00
Stefan Dösinger 5702a310e9 wined3d: Allocate 4 extra bytes in the dib section. 2006-07-17 13:51:12 +02:00
Christian Costa 494841d3e5 wined3d: Only copy memory corresponding to the dib section instead of the power of 2 surface. 2006-07-14 13:32:40 +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 07eb6531a3 wined3d: Fix light state bugs. 2006-07-14 12:39:13 +02:00
H. Verbeet 0924f969d1 wined3d: Texture stages that reference NULL textures should just pass
through the result of the previous stage.
2006-07-12 13:21:04 +02:00
H. Verbeet 7090259545 wined3d: Fix specular color handling for register combiners.
By default the FinalCombiner is setup to add the specular color to the
final result of the combiner operations. However, it should only do
this when the WINED3DRS_SPECULARENABLE renderstate is enabled.
2006-07-12 13:20:41 +02:00
Stefan Dösinger 0dd13f2cb7 wined3d: Check the color data type too when deciding whether to convert data. 2006-07-12 13:20:25 +02:00
Ivan Gyurdiev ed9848930b wined3d: Improve GetAdapterMonitor stub. 2006-07-11 17:14:46 +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 345dd49eda wined3d: Fix off-by-one constants bug. 2006-07-11 17:12:24 +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
Louis. Lenders 2ce792fd33 wined3d: Add an "\n" to a fixme to fix another overflow (in IWineD3DImpl_CheckDeviceFormatConversion). 2006-07-11 12:41:29 +02:00
Alexandre Julliard 5258e061dc make_dlls: Ignore generated import libraries from the top-level .gitignore. 2006-07-10 20:55:58 +02:00
Alexandre Julliard cc2b3b48e6 Take advantage of the recursive nature of .gitignore for Makefile entries.
Prefix other entries with '/' to make them non-recursive.
2006-07-10 20:47:54 +02:00
Ivan Gyurdiev c58e06548e wined3d: Fix typo breaking 3.0 pshaders color input. 2006-07-10 11:48:11 +02:00
Stefan Dösinger eb527c82e2 Add a common fps counter channel to ddraw, opengl and d3d. 2006-07-07 17:52:46 +02:00
Ivan Gyurdiev 5638fac685 wined3d: Trace ABS/ABSNEG modifiers. 2006-07-07 17:40:03 +02:00
Ivan Gyurdiev 899c8cdb64 wined3d: Create fake input semantics for d3d8 shaders.
Use them to remove the need for loading arrays in two different places.
2006-07-07 17:39:52 +02:00
Ivan Gyurdiev 5b3c500efe wined3d: Reverse semantics maps for shaders. 2006-07-07 17:39:26 +02:00
Ivan Gyurdiev c611012df5 wined3d: Make WINED3D_ATR macros more flexible.
Make them operate on a type, as opposed to a semantic name.
2006-07-07 17:37:25 +02:00
Ivan Gyurdiev c202bfe40d wined3d: Simplify primitiveDeclartationConvertToStrided.
Assign fixed indices to declaration inputs.
Then use a common path to load the strided data.
2006-07-07 17:36:24 +02:00
Ivan Gyurdiev 85aa8ab855 wined3d: Add position_transformed flag to Strided data format. 2006-07-07 17:35:36 +02:00
Ivan Gyurdiev fc2611d4a8 wined3d: Only link and use GLSL program if at least one GLSL shader is available. 2006-07-07 17:28:21 +02:00
Jason Green c562c4c771 wined3d: Fix D3DSIO_TEXKILL for GLSL. 2006-07-07 16:57:51 +02:00
Michael Stefaniuc 00e779370f janitorial: Put "inline static" at the beginning of a declaration. 2006-07-07 14:30:35 +02:00
Michael Stefaniuc 32b1a24501 janitorial: Move the storage specifier to the beginning of the declaration. 2006-07-07 14:30:35 +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 0472e9cd49 wined3d: Clean up drawPrimitive/drawPrimitiveDrawStrided. 2006-07-06 16:07:38 +02:00
Ivan Gyurdiev 1309844913 wined3d: Implement FVF to DECL9 conversion (with tests). 2006-07-06 16:07:38 +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 bbe7b40a71 wined3d: Fix STREAM flag override. 2006-07-06 16:07:38 +02:00
Ivan Gyurdiev e260e9fd98 wined3d: Add missing PSIZE register for decl8->9 conversion. 2006-07-06 16:07:38 +02:00
Ivan Gyurdiev b324fc0fdb wined3d: Allow mix of SW vertex and GLSL pixel shader.
Do not attach non-GLSL shaders to the GLSL program, that will cause a
crash. Mix with ARB shaders is never going to happen, because the
selection code will always choose GLSL for both or ARB for both.
2006-07-06 16:07:37 +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
Stefan Dösinger 1a82976908 wined3d: Flip WINED3DFMT_R8G8B8 to GL_RGB. 2006-07-06 12:45:27 +02:00
Ivan Gyurdiev 7e9fd0b4c1 wined3d: Add a function to print out D3DDECLUSAGE9 values. 2006-07-03 12:04:37 +02:00
Ivan Gyurdiev 0111e15e1f wined3d: Fix faulty DCL trace. 2006-07-03 12:04:23 +02:00
Ivan Gyurdiev 1bfec25031 wined3d: Resync ARB mnxn function with GLSL mnxn function. 2006-07-03 12:04:09 +02:00
Ivan Gyurdiev fd896d8652 wined3d: Use shader_get_regtype() in register counting pass. 2006-07-03 12:03:58 +02:00
Ivan Gyurdiev d06e13db99 wined3d: Move SHADER_ARB code into arb_program_shader.c. 2006-07-03 12:03:31 +02:00
Ivan Gyurdiev fce0c625f0 wined3d: Cleanup: print constants in device code. 2006-07-03 12:02:04 +02:00
Stefan Dösinger 77448f588b wined3d: Perform sanity checks on the rectangle in LockRect. 2006-06-30 20:44:27 +02:00