wined3d: Fix use_vs() usage in vertexdeclaration().

Henri Verbeet hverbeet at codeweavers.com
Mon Dec 15 09:35:15 CST 2008


---
 dlls/wined3d/state.c |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 085e3d4..8ffcec0 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -4449,19 +4449,16 @@ static void streamsrc(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCo
 }
 
 static void vertexdeclaration(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
-    BOOL useVertexShaderFunction = FALSE, updateFog = FALSE;
+    BOOL updateFog = FALSE;
+    BOOL useVertexShaderFunction = use_vs(stateblock->wineD3DDevice);
     BOOL usePixelShaderFunction = use_ps(stateblock->wineD3DDevice);
     BOOL transformed;
     /* Some stuff is in the device until we have per context tracking */
     IWineD3DDeviceImpl *device = stateblock->wineD3DDevice;
     BOOL wasrhw = context->last_was_rhw;
 
-    /* Shaders can be implemented using ARB_PROGRAM, GLSL, or software -
-     * here simply check whether a shader was set, or the user disabled shaders
-     */
-    if (use_vs(device)) {
-        useVertexShaderFunction = TRUE;
-
+    if (useVertexShaderFunction)
+    {
         if(((IWineD3DVertexShaderImpl *)stateblock->vertexShader)->baseShader.reg_maps.fog != context->last_was_foggy_shader) {
             updateFog = TRUE;
         }
@@ -4470,8 +4467,6 @@ static void vertexdeclaration(DWORD state, IWineD3DStateBlockImpl *stateblock, W
     }
 
     transformed = device->strided_streams.u.s.position_transformed;
-    if (transformed) useVertexShaderFunction = FALSE;
-
     if(transformed != context->last_was_rhw && !useVertexShaderFunction) {
         updateFog = TRUE;
     }
-- 
1.5.6.4



--------------020405040203080700030200--



More information about the wine-patches mailing list