Stefan Dösinger : wined3d: Move WINED3DRS_POSITIONDEGREE to the state table.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Dec 11 10:34:59 CST 2006


Module: wine
Branch: master
Commit: 052197acb0da8f0af007d3d5d3e4f5af452feeb1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=052197acb0da8f0af007d3d5d3e4f5af452feeb1

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Sun Dec 10 23:21:21 2006 +0100

wined3d: Move WINED3DRS_POSITIONDEGREE to the state table.

---

 dlls/wined3d/device.c |    8 +-------
 dlls/wined3d/state.c  |    8 +++++++-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 2c640d9..0103bf0 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3428,6 +3428,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl
     case WINED3DRS_PATCHEDGESTYLE :
     case WINED3DRS_PATCHSEGMENTS :
     case WINED3DRS_DEBUGMONITORTOKEN :
+    case WINED3DRS_POSITIONDEGREE :
         StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock);
         break;
 
@@ -3438,13 +3439,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl
         return WINED3DERR_INVALIDCALL;
       }
 
-    case WINED3DRS_POSITIONDEGREE :
-    {
-        if(WINED3DDEGREE_CUBIC != Value)
-            ERR("(%p)->(%s,%d) not yet implemented\n", This, debug_d3drenderstate(State), Value);
-        break;
-    }
-
     case WINED3DRS_NORMALDEGREE :
     {
         if(WINED3DDEGREE_LINEAR != Value)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 23f5f84..caf55f9 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -1190,6 +1190,12 @@ static void state_patchsegments(DWORD st
         ERR("(WINED3DRS_PATCHSEGMENTS,%d) not yet implemented\n", tmpvalue.d);
 }
 
+static void state_positiondegree(DWORD state, IWineD3DStateBlockImpl *stateblock) {
+    TRACE("Stub\n");
+    if (stateblock->renderState[WINED3DRS_POSITIONDEGREE] != D3DDEGREE_CUBIC)
+        ERR("(WINED3DRS_POSITIONDEGREE,%d) not yet implemented\n", stateblock->renderState[WINED3DRS_POSITIONDEGREE]);
+}
+
 const struct StateEntry StateTable[] =
 {
       /* State name                                         representative,                                     apply function */
@@ -1367,7 +1373,7 @@ const struct StateEntry StateTable[] =
     { /*169, Undefined                              */      0,                                                  state_undefined     },
     { /*170, WINED3DRS_TWEENFACTOR                  */      0,                                                  state_nogl          },
     { /*171, WINED3DRS_BLENDOP                      */      STATE_RENDER(WINED3DRS_BLENDOP),                    state_blendop       },
-    { /*172, WINED3DRS_POSITIONDEGREE               */      STATE_RENDER(WINED3DRS_POSITIONDEGREE),             state_unknown       },
+    { /*172, WINED3DRS_POSITIONDEGREE               */      STATE_RENDER(WINED3DRS_POSITIONDEGREE),             state_positiondegree},
     { /*173, WINED3DRS_NORMALDEGREE                 */      STATE_RENDER(WINED3DRS_NORMALDEGREE),               state_unknown       },
       /*172, WINED3DRS_POSITIONORDER                */      /* Value assigned to 2 state names */
       /*173, WINED3DRS_NORMALORDER                  */      /* Value assigned to 2 state names */




More information about the wine-cvs mailing list