Henri Verbeet : wined3d: Just mark the stencil write mask dirty in IWineD3DDeviceImpl_ClearSurface( ).
Alexandre Julliard
julliard at winehq.org
Thu Mar 25 11:44:43 CDT 2010
Module: wine
Branch: master
Commit: 2e7e118899fc097a40227fd3f50d5269cfc4a08d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2e7e118899fc097a40227fd3f50d5269cfc4a08d
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Thu Mar 25 09:32:36 2010 +0100
wined3d: Just mark the stencil write mask dirty in IWineD3DDeviceImpl_ClearSurface().
---
dlls/wined3d/device.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index b25c4ec..fab9e65 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4397,10 +4397,11 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac
glDisable(GL_STENCIL_TEST_TWO_SIDE_EXT);
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_TWOSIDEDSTENCILMODE));
}
+ glStencilMask(~0U);
+ IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_STENCILWRITEMASK));
glClearStencil(Stencil);
checkGLcall("glClearStencil");
glMask = glMask | GL_STENCIL_BUFFER_BIT;
- glStencilMask(0xFFFFFFFF);
}
if (Flags & WINED3DCLEAR_ZBUFFER) {
@@ -4484,10 +4485,6 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac
}
}
- /* Restore the old values (why..?) */
- if (Flags & WINED3DCLEAR_STENCIL) {
- glStencilMask(This->stateBlock->renderState[WINED3DRS_STENCILWRITEMASK]);
- }
if (Flags & WINED3DCLEAR_TARGET) {
DWORD mask = This->stateBlock->renderState[WINED3DRS_COLORWRITEENABLE];
glColorMask(mask & WINED3DCOLORWRITEENABLE_RED ? GL_TRUE : GL_FALSE,
More information about the wine-cvs
mailing list