Commit Graph

122 Commits

Author SHA1 Message Date
Markus Amsler c40501db50 Revert "d3d: Remove AddRef from IWineD3DDevice_GetSwapChain.".
This reverts commit f84f687e6d.
2006-11-30 16:03:59 +01:00
H. Verbeet 8a7f427948 wined3d: Select the right shader backend when creating the device. 2006-11-28 12:19:27 +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
Markus Amsler f84f687e6d d3d: Remove AddRef from IWineD3DDevice_GetSwapChain. 2006-11-22 11:40:50 +01:00
H. Verbeet 9d6f22002c wined3d: Only copy the depth buffer if there is one. 2006-11-20 11:50:14 +01:00
H. Verbeet 8afe27dacd wined3d: Fix GL_ARB_texture_cube_map extension support. 2006-11-20 11:50:14 +01:00
H. Verbeet ef2c062c09 wined3d: Allow the depth buffer to be shared between onscreen and offscreen rendering modes. 2006-11-17 18:14:25 +01:00
H. Verbeet 6d66085150 wined3d: Add FBO support for offscreen rendering. 2006-11-17 18:14:13 +01:00
H. Verbeet 9bf04ecd03 wined3d: Rename renderUpsideDown to render_offscreen. 2006-11-17 15:53:52 +01:00
Ivan Gyurdiev 875a1eb02d wined3d: Add D3DFVF codes to the WINED3D namespace. 2006-10-31 12:09:06 +01:00
Ivan Gyurdiev 4eced8ea24 wined3d: Add D3DFOGMODE to the WINED3D namespace. 2006-10-30 12:05:24 +01:00
Markus Amsler 9497e89d89 wined3d: Respect ARB_VERTEX_BUFFER_OBJECT in loadVertexData. 2006-10-30 11:17:01 +01:00
Ivan Gyurdiev 9846602412 wined3d: Add D3DTEXTURETRANSFORMTYPE to the WINED3D namespace. 2006-10-13 11:15:31 +02:00
Ivan Gyurdiev c912032aa5 wined3d: Add D3DTEXTUREOP to the WINED3D namespace. 2006-10-13 11:13:02 +02:00
Ivan Gyurdiev 532fe7a1cf wined3d: Merge D3DDP_MAXTEXCOORD constants into one constant in WINED3D namespace. 2006-10-12 12:38:02 +02:00
Ivan Gyurdiev 2bac4a02da wined3d: Merge D3DPRIMITIVETYPE types into one type in WINED3D namespace. 2006-10-12 12:37:52 +02:00
Ivan Gyurdiev a07a8f793b wined3d: D3DDECLTYPE: Consistently use in WINED3D namespace. 2006-10-11 12:20:21 +02:00
Ivan Gyurdiev 837027fcb7 wined3d: D3DTEXTURESTAGESTATETYPE: Consistently use in WINED3D namespace. 2006-10-11 12:18:53 +02:00
Ivan Gyurdiev e020eceddf wined3d: Make the shader mode selections per device. 2006-10-09 20:27:55 +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
H. Verbeet 5abdd7a19f wined3d: Comparing BOOLs against FALSE is redundant. 2006-09-27 09:49:07 +02:00
Stefan Dösinger 96bce8d6d4 wined3d: Avoid wasting a uniform. 2006-09-25 18:24:19 +02:00
Ivan Gyurdiev b421b60874 wined3d: Allow null streams in the vertex declaration. 2006-09-21 19:57:12 +02:00
Stefan Dösinger fd65b9b413 wined3d: Do not bind the 0 vbo when vbos are unsupported. 2006-09-21 11:14:52 +02:00
Stefan Dösinger 0b7a96e92b wined3d: Compile pixel shaders in drawprim. 2006-08-25 11:19:08 +02:00
Stefan Dösinger d7f94bf7c9 wined3d: Correctly draw transformed and untransformed vertices in the same scene. 2006-08-22 12:53:53 +02:00
H. Verbeet 49f4c68e29 wined3d: Lookup GLSL float uniform locations only once per program. 2006-08-21 12:16:27 +02:00
Roderick Colenbrander 1a3359884c wined3d: Fix opengl extension call. 2006-08-11 11:56:36 +02:00
H. Verbeet ef87a40c72 wined3d: Delay vertex shader compilation until the shader is first used. 2006-08-07 13:12:10 +02:00
H. Verbeet ea905eab09 wined3d: Disable vertex arrays after we're done drawing from them.
After drawing from a vertex array we should disable them, to prevent
the next draw calls from potentially reading past their ends. This
also moves the disabling of vertex attrib arrays (for shaders) into
its own function.
2006-08-04 11:58:43 +02:00
Jason Green 46c4b88ba5 wined3d: Fix some upside-down rendering issues for shaders. 2006-07-27 12:03:25 +02:00
Jason Green f6b88b93ad wined3d: Fix crash caused by bad TRACE. 2006-07-26 10:24:27 +02:00
H. Verbeet 2d6e661fbe wined3d: D3d8 shaders can have a NULL pFunction, but a valid vertex declaration. 2006-07-25 11:21:46 +02:00
Jason Green ac8f2c033c wined3d: Improve traces for D3DTRANSFORMSTATETYPE.
Added debug function for WINED3DTRANSFORMSTATETYPE and changed all
references from D3DTS_* to WINED3DTS_*.
2006-07-24 19:55:27 +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
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
Michael Stefaniuc 00e779370f janitorial: Put "inline static" at the beginning of a declaration. 2006-07-07 14:30:35 +02:00
Ivan Gyurdiev 0472e9cd49 wined3d: Clean up drawPrimitive/drawPrimitiveDrawStrided. 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 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
H. Verbeet 7f9e61f7d2 wined3d: Use register combiners for texture stage operations.
Make wined3d use register combiners for texture stage operations. In
order to do that the texture unit index needs to be separated from the
texture stage index. For cards that don't support the
NV_register_combiners extension nothing should change.
2006-06-28 16:34:36 +02:00
H. Verbeet ac98d566ac wined3d: Fix uploading of textures for shaders.
The code for uploading / binding textures for use with pixel shaders
is slightly different from the one for uploading / binding textures
for use with the fixed function pipeline. It would be possible to keep
the code in a single function with a couple of conditionals, but in
combination with the changes needed for register combiners that would
become quite messy.
2006-06-28 16:08:17 +02:00
H. Verbeet a54e36adfe wined3d: Texture limits fixes.
GL_LIMITS(textures) is currently used for both the number of texture
stages and the maximum number of simultaneous textures. In the current
code that's the same, but in a later patch that will be separated,
since a texture stage doesn't have to reference an actual
texture. Also, shaders can access a larger number of samplers than the
number of texture units the fixed function pipeline can access.
2006-06-28 16:06:25 +02:00