wined3d: simplify setting the stencil renderstate
Jan Zerebecki
jan.wine at zerebecki.de
Wed Sep 6 03:44:02 CDT 2006
If this patch is rejected from inclusion, please tell me why, as
I would have to ask anyway.
From: Jan Zerebecki <jan.wine at zerebecki.de>
Changelog:
wined3d: simplify setting the stencil renderstate
As ( This->stateBlock->renderState[State] == Value ) is true for
the current State and Value, the removed code is not needed.
---
dlls/wined3d/device.c | 43 -------------------------------------------
1 files changed, 0 insertions(+), 43 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index faa1232..5a07adf 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3335,49 +3335,6 @@ static void renderstate_stencil(IWineD3D
if( This->stateBlock->set.renderState[WINED3DRS_CCW_STENCILPASS] )
stencilPass_ccw = StencilOp(This->stateBlock->renderState[WINED3DRS_CCW_STENCILPASS]);
- switch(State) {
- case WINED3DRS_STENCILENABLE :
- onesided_enable = Value;
- break;
- case WINED3DRS_TWOSIDEDSTENCILMODE :
- twosided_enable = Value;
- break;
- case WINED3DRS_STENCILFUNC :
- if( !( func = CompareFunc(Value) ) )
- func = GL_ALWAYS;
- break;
- case WINED3DRS_CCW_STENCILFUNC :
- if( !( func_ccw = CompareFunc(Value) ) )
- func_ccw = GL_ALWAYS;
- break;
- case WINED3DRS_STENCILREF :
- ref = Value;
- break;
- case WINED3DRS_STENCILMASK :
- mask = Value;
- break;
- case WINED3DRS_STENCILFAIL :
- stencilFail = StencilOp(Value);
- break;
- case WINED3DRS_STENCILZFAIL :
- depthFail = StencilOp(Value);
- break;
- case WINED3DRS_STENCILPASS :
- stencilPass = StencilOp(Value);
- break;
- case WINED3DRS_CCW_STENCILFAIL :
- stencilFail_ccw = StencilOp(Value);
- break;
- case WINED3DRS_CCW_STENCILZFAIL :
- depthFail_ccw = StencilOp(Value);
- break;
- case WINED3DRS_CCW_STENCILPASS :
- stencilPass_ccw = StencilOp(Value);
- break;
- default :
- ERR("This should not happen!");
- }
-
TRACE("(onesided %ld, twosided %ld, ref %x, mask %x, \
GL_FRONT: func: %x, fail %x, zfail %x, zpass %x \
GL_BACK: func: %x, fail %x, zfail %x, zpass %x )\n",
More information about the wine-patches
mailing list