Commit Graph

3722 Commits

Author SHA1 Message Date
Henri Verbeet adf5bb5f6a wined3d: Cleanup IWineD3DDeviceImpl_UpdateTexture().
The root problem here is that with the original error handling a NULL
dereference occurs (IWineD3DBaseTexture_GetType()) when either the source or
destination texture is NULL. Rewriting the error handling changes the
indentation of almost the entire function though, so this patch ends up
rewriting the entire function.
2009-10-19 11:45:45 +02:00
Henri Verbeet 9dd78e13d5 wined3d: Printing a FIXME once only works if the relevant BOOL is static (LLVM/Clang). 2009-10-16 13:37:21 +02:00
Henri Verbeet 594497f4bb wined3d: Simplify IWineD3DStateBlockImpl_Apply().
Consistently use the stateblock's contained states to determine what to apply.
2009-10-15 12:06:18 +02:00
Henri Verbeet ce10d5f186 wined3d: Don't apply more than num_contained_render_states in IWineD3DStateBlockImpl_Apply(). 2009-10-15 12:06:18 +02:00
Henri Verbeet bac6486520 wined3d: Merge some bitfields in struct SAVEDSTATES. 2009-10-14 11:26:44 +02:00
Henri Verbeet 1f029a30db wined3d: Simplify IWineD3DStateBlockImpl_Capture().
Consistently use the stateblock's contained states to determine what to
capture.
2009-10-14 11:26:38 +02:00
Henri Verbeet a24d14796a wined3d: Remove the useless "changed" and "enabledChanged" fields from struct wined3d_light_info. 2009-10-14 11:26:26 +02:00
Henri Verbeet 3bc9d1894d wined3d: Rename PLIGHTINFOEL to something less awful. 2009-10-14 11:26:17 +02:00
Henri Verbeet 580cd8c5bb wined3d: Get rid of stateblock_copy_values().
Use IWineD3DStateBlockImpl_Capture() for the initial stateblock capture
instead.
2009-10-14 11:26:02 +02:00
Henri Verbeet 8949a2c1ad wined3d: Remove some code that doesn't make sense.
This was introduced by abb11f30cd, but I don't
see how it could ever do something useful. Perhaps that's a lack of
imagination on my part, but the only situation in which device->stateBlock
should be NULL is while creating the initial stateblock, and in that case we
just returned in the line above. Setting the stream frequency of all streams
to 0x01010101 doesn't make sense either.
2009-10-13 11:38:28 +02:00
Henri Verbeet da5b491606 wined3d: Capture on a recorded stateblock doesn't record the vertexdeclaration in d3d9. 2009-10-13 11:38:28 +02:00
Henri Verbeet 526839068f wined3d: Vertex state stateblocks should also record the vertex declaration. 2009-10-13 11:38:28 +02:00
Jeff Zaroyko a1126242a7 wined3d: Fix prototype for set_texture_matrix. 2009-10-12 17:07:03 +02:00
Henri Verbeet 3dbfda1ab3 wined3d: Capture some more renderstates in vertex and pixel stateblocks. 2009-10-09 11:50:29 +02:00
Henri Verbeet 442beb1dcf wined3d: Clear resources that we aren't recording in stateblock_init(). 2009-10-09 11:50:29 +02:00
Stefan Dösinger 8a68f418db wined3d: Don't reserve clipping constants needlessly. 2009-10-08 12:03:50 +02:00
Stefan Dösinger ed2860f789 wined3d: Split the clip_parameters[2] array. 2009-10-08 12:03:42 +02:00
Stefan Dösinger 7f6ae94c0a wined3d: Don't write to result.color in arb_add_sRGB_correction.
add_sRGB_correction and the generate_pshader function generate the same MOV.
There's no need to do it in two places.
2009-10-08 12:03:30 +02:00
Henri Verbeet 2be38232ea wined3d: Remove some unused code. 2009-10-06 12:02:59 +02:00
Henri Verbeet 92d22ce535 wined3d: Move the SM1 opcode enum to shader_sm1.c. 2009-10-06 12:02:52 +02:00
Henri Verbeet 5c22971561 wined3d: Keep a reference to the vertex declaration initially captured by CreateStateBlock() as well. 2009-10-06 12:02:48 +02:00
Henri Verbeet b5de2fcb1c wined3d: Keep references to the textures initially captured by CreateStateBlock() as well. 2009-10-06 12:02:44 +02:00
Stefan Dösinger cb5ce03de4 wined3d: SetRenderTarget resets the scissor rect. 2009-10-02 15:06:57 +02:00
Stefan Dösinger 4a3f04cb56 wined3d: SetRenderTarget bypasses stateblock recording. 2009-10-02 15:06:57 +02:00
Stefan Dösinger 9e068a33b3 wined3d: SetRenderTarget doesn't change the viewport in d3d7. 2009-10-02 15:06:56 +02:00
Stefan Dösinger eda00d97ad d3d9: Test viewports that are bigger than the surface. 2009-10-02 15:06:38 +02:00
Stefan Dösinger dc45657f2c wined3d: Fix vs_2_0 sgn.
vs_2_0's sgn has two extra parameters - temporary registers for the
instruction. This patch fixes the crash of the d3d9:visual test on windows and
properly handles the vs_2_0 version of sgn.
2009-10-02 12:36:59 +02:00
Henri Verbeet 048c9450d9 wined3d: Use the actual array sizes to determine the number of the various pixel/vertex states. 2009-10-02 11:53:09 +02:00
Henri Verbeet 8b3f868774 wined3d: Move the pixel/vertex states arrays to stateblock.c. 2009-10-02 11:53:03 +02:00
Henri Verbeet a84974e2ea wined3d: Fix the values of NUM_SAVEDPIXELSTATES_T and NUM_SAVEDVERTEXSTATES_R. 2009-10-02 11:52:54 +02:00
Henri Verbeet 15d4eee58b wined3d: Use stateblock_init_contained_states() for WINED3DSBT_VERTEXSTATE stateblocks. 2009-10-02 11:52:49 +02:00
Henri Verbeet d500c9b795 wined3d: Add a separate function to initialize the saved states for WINED3DSBT_VERTEXSTATE. 2009-10-02 11:52:43 +02:00
Stefan Dösinger c749debec6 wined3d: Fix an error string. 2009-10-01 12:10:35 +02:00
Henri Verbeet 93c949eba5 wined3d: Use stateblock_init_contained_states() for WINED3DSBT_PIXELSTATE stateblocks. 2009-10-01 12:03:55 +02:00
Henri Verbeet 5a01619d31 wined3d: Add a separate function to initialize the saved states for WINED3DSBT_PIXELSTATE. 2009-10-01 12:03:49 +02:00
Henri Verbeet 841afe485e wined3d: Use stateblock_init_contained_states() for WINED3DSBT_ALL stateblocks. 2009-10-01 12:03:34 +02:00
Henri Verbeet c5029f83ec wined3d: Simplify stateblock_savedstates_set().
We only need to handle the case where "value" is TRUE, since the stateblock
data will be filled with zeroes by default.
2009-10-01 12:03:28 +02:00
Henri Verbeet 75fe879c76 wined3d: Get rid of stateblock_savedstates_copy().
This is redundant because we call stateblock_savedstates_set() further down.
2009-10-01 12:03:21 +02:00
Henri Verbeet be0b7355fc wined3d: Add a separate function for initializing the "contained_*" fields from the "changed" field. 2009-09-30 14:31:59 +02:00
Henri Verbeet 5f3425b89b wined3d: Get rid of stateblock_copy(). 2009-09-30 14:31:59 +02:00
Henri Verbeet 345b329217 wined3d: Add a separate function for copying stateblock values. 2009-09-30 14:31:58 +02:00
Henri Verbeet 844dda20ff wined3d: Make some internal stateblock function arguments const. 2009-09-30 14:31:58 +02:00
Henri Verbeet 5737efe71a wined3d: Explicitly pass gl_info to stateblock_savedstates_set(). 2009-09-30 14:31:58 +02:00
Henri Verbeet 49f712beff wined3d: Explicitly pass gl_info to stateblock_savedstates_copy(). 2009-09-29 14:22:34 +02:00
Henri Verbeet 6d3e5a9cce wined3d: Pass IWineD3DStateBlockImpl pointers to stateblock_copy(). 2009-09-29 14:22:34 +02:00
Henri Verbeet 4ed126f5dc wined3d: Clear the correct "activeLights" array in stateblock_copy(). 2009-09-29 14:22:34 +02:00
Henri Verbeet 664057ce6a wined3d: Add a separate function for state block initialization. 2009-09-29 14:22:34 +02:00
Henri Verbeet 6a7b97b617 wined3d: Fix a typo. 2009-09-29 14:22:34 +02:00
Stefan Dösinger 404aecb8da wined3d: Test if result.clip[] works correctly.
The Mac Nvidia driver doesn't implement the result.clip part of
GL_NV_vertex_program2_option correctly. It complains about a syntax
error if "result.clip[0]" is used. "result.clip" compiles correctly, but
supports only one clipplane, and running the shader results in severe
rendering bugs.
2009-09-28 17:33:07 +02:00
Stefan Dösinger 77a83aee79 wined3d: Don't use GL_NV_texture_shader on OSX. 2009-09-28 17:32:54 +02:00