[PATCH 2/5] wined3d: Remove the unused untransformed field from struct wined3d_device.

Henri Verbeet hverbeet at codeweavers.com
Wed Jul 13 18:02:45 CDT 2011


---
 dlls/wined3d/state.c           |   12 ++----------
 dlls/wined3d/wined3d_private.h |    3 +--
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 7115314..ee521a4 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -4544,7 +4544,7 @@ static void vertexdeclaration(DWORD state_id, struct wined3d_stateblock *statebl
 {
     const struct wined3d_gl_info *gl_info = context->gl_info;
     const struct wined3d_state *state = &stateblock->state;
-    struct wined3d_device *device = stateblock->device;
+    const struct wined3d_device *device = stateblock->device;
     BOOL useVertexShaderFunction = use_vs(state);
     BOOL usePixelShaderFunction = use_ps(state);
     BOOL updateFog = FALSE;
@@ -4556,15 +4556,7 @@ static void vertexdeclaration(DWORD state_id, struct wined3d_stateblock *statebl
     if (transformed != context->last_was_rhw && !useVertexShaderFunction)
         updateFog = TRUE;
 
-    if (transformed) {
-        context->last_was_rhw = TRUE;
-    } else {
-
-        /* Untransformed, so relies on the view and projection matrices */
-        context->last_was_rhw = FALSE;
-        /* This turns off the Z scale trick to 'disable' viewport frustum clipping in rhw mode*/
-        device->untransformed = TRUE;
-    }
+    context->last_was_rhw = transformed;
 
     /* Don't have to apply the matrices when vertex shaders are used. When vshaders are turned
      * off this function will be called again anyway to make sure they're properly set
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 10a35b9..dc036fc 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1654,7 +1654,6 @@ struct wined3d_device
     DWORD vs_clipping;
 
     WORD view_ident : 1;                /* true iff view matrix is identity */
-    WORD untransformed : 1;
     WORD vertexBlendUsed : 1;           /* To avoid needless setting of the blend matrices */
     WORD isRecordingState : 1;
     WORD isInDraw : 1;
@@ -1665,7 +1664,7 @@ struct wined3d_device
     WORD useDrawStridedSlow : 1;
     WORD instancedDraw : 1;
     WORD filter_messages : 1;
-    WORD padding : 4;
+    WORD padding : 5;
 
     BYTE fixed_function_usage_map;      /* MAX_TEXTURES, 8 */
 
-- 
1.7.3.4




More information about the wine-patches mailing list