Stefan Dösinger : wined3d: Move WINED3DRS_STENCILWRITEMASK to the state table.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Dec 11 07:45:02 CST 2006
Module: wine
Branch: master
Commit: 8d7243192a7f566f64a52cde9f64b29fa91aee89
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8d7243192a7f566f64a52cde9f64b29fa91aee89
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Fri Dec 8 18:41:05 2006 +0100
wined3d: Move WINED3DRS_STENCILWRITEMASK to the state table.
---
dlls/wined3d/device.c | 9 +--------
dlls/wined3d/state.c | 7 ++++++-
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 995316f..2d39baf 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3372,15 +3372,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl
case WINED3DRS_CCW_STENCILZFAIL :
case WINED3DRS_CCW_STENCILPASS :
case WINED3DRS_EDGEANTIALIAS :
- StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock);
- break;
-
case WINED3DRS_STENCILWRITEMASK :
- {
- glStencilMask(Value);
- TRACE("glStencilMask(%u)\n", Value);
- checkGLcall("glStencilMask");
- }
+ StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock);
break;
case WINED3DRS_FOGENABLE :
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 2e1bf60..535c93f 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -627,6 +627,11 @@ state_stencil(DWORD state, IWineD3DState
}
}
+static void state_stencilwrite(DWORD state, IWineD3DStateBlockImpl *stateblock) {
+ glStencilMask(stateblock->renderState[WINED3DRS_STENCILWRITEMASK]);
+ checkGLcall("glStencilMask");
+}
+
const struct StateEntry StateTable[] =
{
/* State name representative, apply function */
@@ -689,7 +694,7 @@ const struct StateEntry StateTable[] =
{ /* 56, WINED3DRS_STENCILFUNC */ STATE_RENDER(WINED3DRS_STENCILENABLE), state_stencil },
{ /* 57, WINED3DRS_STENCILREF */ STATE_RENDER(WINED3DRS_STENCILENABLE), state_stencil },
{ /* 58, WINED3DRS_STENCILMASK */ STATE_RENDER(WINED3DRS_STENCILENABLE), state_stencil },
- { /* 59, WINED3DRS_STENCILWRITEMASK */ STATE_RENDER(WINED3DRS_STENCILWRITEMASK), state_unknown },
+ { /* 59, WINED3DRS_STENCILWRITEMASK */ STATE_RENDER(WINED3DRS_STENCILWRITEMASK), state_stencilwrite },
{ /* 60, WINED3DRS_TEXTUREFACTOR */ STATE_RENDER(WINED3DRS_TEXTUREFACTOR), state_texfactor },
/* A BIG hole. If wanted, 'fixed' states like the vertex type or the bound shaders can be put here */
{ /* 61, Undefined */ 0, state_undefined },
More information about the wine-cvs
mailing list