[42/47] WineD3D: Move WINED3DRS_NORMALDEGREE to the state table

Stefan Dösinger stefan at codeweavers.com
Sun Dec 10 16:21:25 CST 2006


-------------- next part --------------
From fdf7381bfb878880a842faecd85e27e4a1fabecd Mon Sep 17 00:00:00 2001
From: Stefan Doesinger <stefan at codeweavers.com>
Date: Sun, 10 Dec 2006 19:57:02 +0100
Subject: [PATCH] WineD3D: Move WINED3DRS_NORMALDEGREE 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 d0e9be6..7668e85 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3429,6 +3429,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl
     case WINED3DRS_PATCHSEGMENTS :
     case WINED3DRS_DEBUGMONITORTOKEN :
     case WINED3DRS_POSITIONDEGREE :
+    case WINED3DRS_NORMALDEGREE :
         StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock);
         break;
 
@@ -3439,13 +3440,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl
         return WINED3DERR_INVALIDCALL;
       }
 
-    case WINED3DRS_NORMALDEGREE :
-    {
-        if(WINED3DDEGREE_LINEAR != Value)
-            ERR("(%p)->(%s,%d) not yet implemented\n", This, debug_d3drenderstate(State), Value);
-        break;
-    }
-
     case WINED3DRS_MINTESSELLATIONLEVEL :
     case WINED3DRS_MAXTESSELLATIONLEVEL :
     case WINED3DRS_ADAPTIVETESS_X :
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 379412e..2057fe8 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -1196,6 +1196,12 @@ static void state_positiondegree(DWORD s
         ERR("(WINED3DRS_POSITIONDEGREE,%d) not yet implemented\n", stateblock->renderState[WINED3DRS_POSITIONDEGREE]);
 }
 
+static void state_normaldegree(DWORD state, IWineD3DStateBlockImpl *stateblock) {
+    TRACE("Stub\n");
+    if (stateblock->renderState[WINED3DRS_NORMALDEGREE] != D3DDEGREE_LINEAR)
+        ERR("(WINED3DRS_NORMALDEGREE,%d) not yet implemented\n", stateblock->renderState[WINED3DRS_NORMALDEGREE]);
+}
+
 const struct StateEntry StateTable[] =
 {
       /* State name                                         representative,                                     apply function */
@@ -1374,7 +1380,7 @@ const struct StateEntry StateTable[] =
     { /*170, WINED3DRS_TWEENFACTOR                  */      0,                                                  state_nogl          },
     { /*171, WINED3DRS_BLENDOP                      */      STATE_RENDER(WINED3DRS_BLENDOP),                    state_blendop       },
     { /*172, WINED3DRS_POSITIONDEGREE               */      STATE_RENDER(WINED3DRS_POSITIONDEGREE),             state_positiondegree},
-    { /*173, WINED3DRS_NORMALDEGREE                 */      STATE_RENDER(WINED3DRS_NORMALDEGREE),               state_unknown       },
+    { /*173, WINED3DRS_NORMALDEGREE                 */      STATE_RENDER(WINED3DRS_NORMALDEGREE),               state_normaldegree  },
       /*172, WINED3DRS_POSITIONORDER                */      /* Value assigned to 2 state names */
       /*173, WINED3DRS_NORMALORDER                  */      /* Value assigned to 2 state names */
     { /*174, WINED3DRS_SCISSORTESTENABLE            */      STATE_RENDER(WINED3DRS_SCISSORTESTENABLE),          state_scissor       },
-- 
1.4.2.4



More information about the wine-patches mailing list