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

Alexandre Julliard julliard at wine.codeweavers.com
Mon Dec 11 10:35:00 CST 2006


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

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

wined3d: Move tesselation to the state table.

---

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

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 3593036..baec6aa 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3430,6 +3430,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl
     case WINED3DRS_DEBUGMONITORTOKEN :
     case WINED3DRS_POSITIONDEGREE :
     case WINED3DRS_NORMALDEGREE :
+    case WINED3DRS_MINTESSELLATIONLEVEL :
+    case WINED3DRS_MAXTESSELLATIONLEVEL :
+    case WINED3DRS_ADAPTIVETESS_X :
+    case WINED3DRS_ADAPTIVETESS_Y :
+    case WINED3DRS_ADAPTIVETESS_Z :
+    case WINED3DRS_ADAPTIVETESS_W :
+    case WINED3DRS_ENABLEADAPTIVETESSELLATION:
         StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock);
         break;
 
@@ -3440,27 +3447,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl
         return WINED3DERR_INVALIDCALL;
       }
 
-    case WINED3DRS_MINTESSELLATIONLEVEL :
-    case WINED3DRS_MAXTESSELLATIONLEVEL :
-    case WINED3DRS_ADAPTIVETESS_X :
-    case WINED3DRS_ADAPTIVETESS_Y :
-    case WINED3DRS_ADAPTIVETESS_Z :
-    case WINED3DRS_ADAPTIVETESS_W :
-    {
-        if(This->stateBlock->renderState[WINED3DRS_ENABLEADAPTIVETESSELLATION])
-            FIXME("(%p)->(%s,%d) not yet implemented\n", This, debug_d3drenderstate(State), Value);
-        else
-            TRACE("(%p)->(%s,%d): recording state but WINED3DRS_ENABLEADAPTIVETESSELLATION is not enabled\n", This, debug_d3drenderstate(State), Value);
-        break;
-    }
-
-    case WINED3DRS_ENABLEADAPTIVETESSELLATION:
-    {
-        if(Value)
-            ERR("(%p)->(%s,%d) not yet implemented\n", This, debug_d3drenderstate(State), Value);
-        break;
-    }
-
     case WINED3DRS_SRGBWRITEENABLE           :
     {
         if(Value)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 08357d8..ff016ce 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -1202,6 +1202,12 @@ static void state_normaldegree(DWORD sta
         ERR("(WINED3DRS_NORMALDEGREE,%d) not yet implemented\n", stateblock->renderState[WINED3DRS_NORMALDEGREE]);
 }
 
+static void state_tessellation(DWORD state, IWineD3DStateBlockImpl *stateblock) {
+    TRACE("Stub\n");
+    if(stateblock->renderState[WINED3DRS_ENABLEADAPTIVETESSELLATION])
+        FIXME("(WINED3DRS_ENABLEADAPTIVETESSELLATION,%d) not yet implemented\n", stateblock->renderState[WINED3DRS_ENABLEADAPTIVETESSELLATION]);
+}
+
 const struct StateEntry StateTable[] =
 {
       /* State name                                         representative,                                     apply function */
@@ -1387,13 +1393,13 @@ const struct StateEntry StateTable[] =
     { /*175, WINED3DRS_SLOPESCALEDEPTHBIAS          */      STATE_RENDER(WINED3DRS_DEPTHBIAS),                  state_depthbias     },
     { /*176, WINED3DRS_ANTIALIASEDLINEENABLE        */      STATE_RENDER(WINED3DRS_ALPHABLENDENABLE),           state_blend         },
     { /*177, undefined                              */      0,                                                  state_undefined     },
-    { /*178, WINED3DRS_MINTESSELLATIONLEVEL         */      STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_unknown       },
-    { /*179, WINED3DRS_MAXTESSELLATIONLEVEL         */      STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_unknown       },
-    { /*180, WINED3DRS_ADAPTIVETESS_X               */      STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_unknown       },
-    { /*181, WINED3DRS_ADAPTIVETESS_Y               */      STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_unknown       },
-    { /*182, WINED3DRS_ADAPTIVETESS_Z               */      STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_unknown       },
-    { /*183, WINED3DRS_ADAPTIVETESS_W               */      STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_unknown       },
-    { /*184, WINED3DRS_ENABLEADAPTIVETESSELLATION   */      STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_unknown       },
+    { /*178, WINED3DRS_MINTESSELLATIONLEVEL         */      STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_tessellation  },
+    { /*179, WINED3DRS_MAXTESSELLATIONLEVEL         */      STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_tessellation  },
+    { /*180, WINED3DRS_ADAPTIVETESS_X               */      STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_tessellation  },
+    { /*181, WINED3DRS_ADAPTIVETESS_Y               */      STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_tessellation  },
+    { /*182, WINED3DRS_ADAPTIVETESS_Z               */      STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_tessellation  },
+    { /*183, WINED3DRS_ADAPTIVETESS_W               */      STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_tessellation  },
+    { /*184, WINED3DRS_ENABLEADAPTIVETESSELLATION   */      STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_tessellation  },
     { /*185, WINED3DRS_TWOSIDEDSTENCILMODE          */      STATE_RENDER(WINED3DRS_STENCILENABLE),              state_stencil       },
     { /*186, WINED3DRS_CCW_STENCILFAIL              */      STATE_RENDER(WINED3DRS_STENCILENABLE),              state_stencil       },
     { /*187, WINED3DRS_CCW_STENCILZFAIL             */      STATE_RENDER(WINED3DRS_STENCILENABLE),              state_stencil       },




More information about the wine-cvs mailing list