[PATCH] WineD3D: Move the viewport to the vertex and misc =

Stefan Doesinger stefan at codeweavers.com
Wed Jul 2 13:16:23 CDT 2008


pipeline states=0A=
=0A=
---=0A=
 dlls/wined3d/state.c |   10 ++++++++--=0A=
 1 files changed, 8 insertions(+), 2 deletions(-)=0A=
=0A=
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c=0A=
index e830268..bf942d4 100644=0A=
--- a/dlls/wined3d/state.c=0A=
+++ b/dlls/wined3d/state.c=0A=
@@ -3627,7 +3627,7 @@ static void vertexdeclaration(DWORD state, =
IWineD3DStateBlockImpl *stateblock, W=0A=
     }=0A=
 }=0A=
 =0A=
-static void viewport(DWORD state, IWineD3DStateBlockImpl *stateblock, =
WineD3DContext *context) {=0A=
+static void viewport_miscpart(DWORD state, IWineD3DStateBlockImpl =
*stateblock, WineD3DContext *context) {=0A=
     UINT width, height;=0A=
     IWineD3DSurfaceImpl *target;=0A=
 =0A=
@@ -3649,7 +3649,9 @@ static void viewport(DWORD state, =
IWineD3DStateBlockImpl *stateblock, WineD3DCon=0A=
     }=0A=
 =0A=
     checkGLcall("glViewport");=0A=
+}=0A=
 =0A=
+static void viewport_vertexpart(DWORD state, IWineD3DStateBlockImpl =
*stateblock, WineD3DContext *context) {=0A=
     stateblock->wineD3DDevice->posFixup[2] =3D 1.0 / =
stateblock->viewport.Width;=0A=
     stateblock->wineD3DDevice->posFixup[3] =3D =
-stateblock->wineD3DDevice->posFixup[1] / stateblock->viewport.Height;=0A=
     if(!isStateDirty(context, STATE_TRANSFORM(WINED3DTS_PROJECTION))) {=0A=
@@ -4839,7 +4841,7 @@ const struct StateEntry FFPStateTable[] =3D=0A=
     { /*   , STATE_INDEXBUFFER                      */      =
STATE_INDEXBUFFER,                                  indexbuffer         =
},=0A=
     { /*   , STATE_VDECL                            */      =
STATE_VDECL,                                        NULL                =
},=0A=
     { /*   , STATE_VSHADER                          */      =
STATE_VDECL,                                        NULL                =
},=0A=
-    { /*   , STATE_VIEWPORT                         */      =
STATE_VIEWPORT,                                     viewport            =
},=0A=
+    { /*   , STATE_VIEWPORT                         */      =
STATE_VIEWPORT,                                     NULL                =
},=0A=
     { /*   , STATE_VERTEXSHADERCONSTANT             */      =
STATE_VERTEXSHADERCONSTANT,                         NULL                =
},=0A=
     { /*   , STATE_PIXELSHADERCONSTANT              */      =
STATE_VERTEXSHADERCONSTANT,                         NULL                =
},=0A=
       /* Lights */=0A=
@@ -4911,6 +4913,8 @@ const struct StateEntryTemplate =
misc_state_template[] =3D {=0A=
      */=0A=
     { STATE_VERTEXSHADERCONSTANT,                         { =
STATE_VERTEXSHADERCONSTANT,                         shaderconstant      =
}},=0A=
     { STATE_PIXELSHADERCONSTANT,                          { =
STATE_VERTEXSHADERCONSTANT,                         shaderconstant      =
}},=0A=
+    /* Viewport */=0A=
+    { STATE_VIEWPORT,                                     { =
STATE_VIEWPORT,                                     viewport_miscpart   =
}},=0A=
     {0 /* Terminate */,                                   { 0,          =
                                        0                   }},=0A=
 };=0A=
 =0A=
@@ -4961,6 +4965,8 @@ const struct StateEntryTemplate =
ffp_vertexstate_template[] =3D {=0A=
     { STATE_ACTIVELIGHT(5),                               { =
STATE_ACTIVELIGHT(5),                               light               =
}},=0A=
     { STATE_ACTIVELIGHT(6),                               { =
STATE_ACTIVELIGHT(6),                               light               =
}},=0A=
     { STATE_ACTIVELIGHT(7),                               { =
STATE_ACTIVELIGHT(7),                               light               =
}},=0A=
+    /* Viewport */=0A=
+    { STATE_VIEWPORT,                                     { =
STATE_VIEWPORT,                                     viewport_vertexpart =
}},=0A=
     {0 /* Terminate */,                                   { 0,          =
                                        0                   }},=0A=
 };=0A=
 =0A=
-- =0A=
1.5.4.5=0A=
=0A=

------=_NextPart_000_0021_01C8E0ED.0890AFB0--




More information about the wine-patches mailing list