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

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


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

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

wined3d: Move WINED3DRS_LASTPIXEL to the state table.

---

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

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 9bf2a74..44ea2cf 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3404,19 +3404,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl
     case WINED3DRS_COLORWRITEENABLE2         :
     case WINED3DRS_COLORWRITEENABLE3         :
     case WINED3DRS_LOCALVIEWER               :
+    case WINED3DRS_LASTPIXEL                 :
         StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock);
         break;
 
-    case WINED3DRS_LASTPIXEL                 :
-      {
-        if (Value) {
-          TRACE("Last Pixel Drawing Enabled\n");
-        } else {
-          FIXME("Last Pixel Drawing Disabled, not handled yet\n");
-        }
-      }
-      break;
-
     case WINED3DRS_SOFTWAREVERTEXPROCESSING  :
       {
         if (Value) {
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index f640743..01dbc0c 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -1036,6 +1036,14 @@ static void state_localviewer(DWORD stat
     }
 }
 
+static void state_lastpixel(DWORD state, IWineD3DStateBlockImpl *stateblock) {
+    if(stateblock->renderState[WINED3DRS_LASTPIXEL]) {
+        TRACE("Last Pixel Drawing Enabled\n");
+    } else {
+        FIXME("Last Pixel Drawing Disabled, not handled yet\n");
+    }
+}
+
 const struct StateEntry StateTable[] =
 {
       /* State name                                         representative,                                     apply function */
@@ -1055,7 +1063,7 @@ const struct StateEntry StateTable[] =
     { /* 13, WINED3DRS_PLANEMASK                    */      STATE_RENDER(WINED3DRS_PLANEMASK),                  state_unknown       },
     { /* 14, WINED3DRS_ZWRITEENABLE                 */      STATE_RENDER(WINED3DRS_ZWRITEENABLE),               state_zwritenable   },
     { /* 15, WINED3DRS_ALPHATESTENABLE              */      STATE_RENDER(WINED3DRS_ALPHATESTENABLE),            state_alpha         },
-    { /* 16, WINED3DRS_LASTPIXEL                    */      STATE_RENDER(WINED3DRS_LASTPIXEL),                  state_unknown       },
+    { /* 16, WINED3DRS_LASTPIXEL                    */      STATE_RENDER(WINED3DRS_LASTPIXEL),                  state_lastpixel     },
     { /* 17, WINED3DRS_TEXTUREMAG                   */      0 /* Handled in ddraw */,                           state_undefined     },
     { /* 18, WINED3DRS_TEXTUREMIN                   */      0 /* Handled in ddraw */,                           state_undefined     },
     { /* 19, WINED3DRS_SRCBLEND                     */      STATE_RENDER(WINED3DRS_ALPHABLENDENABLE),           state_blend         },




More information about the wine-cvs mailing list