[dx91] stencil write masks

Jason Edmeades us at the-edmeades.demon.co.uk
Thu Oct 30 16:25:50 CST 2003


Similar to dx90 but for stencil functions instead (I'd have merged them 
into one patch but didnt find this one in a sample until after I had 
submitted the last patch, sorry).

Changelog
Clear should not be affected by write masks
Jason
-------------- next part --------------
diff -u3 -x '*.o' dlls/d3d8/dx90/device.c dlls/d3d8/device.c
--- dlls/d3d8/dx90/device.c	2003-10-30 21:38:34.000000000 +0000
+++ dlls/d3d8/device.c	2003-10-30 22:20:40.000000000 +0000
@@ -1363,6 +1363,7 @@
         glClearStencil(Stencil);
         checkGLcall("glClearStencil");
         glMask = glMask | GL_STENCIL_BUFFER_BIT;
+        glStencilMask(0xFFFFFFFF);
     }
 
     if (Flags & D3DCLEAR_ZBUFFER) {
@@ -1419,6 +1420,7 @@
     /* Restore the old values (why..?) */
     if (Flags & D3DCLEAR_STENCIL) {
         glClearStencil(old_stencil_clear_value);
+        glStencilMask(This->StateBlock->renderstate[D3DRS_STENCILWRITEMASK]);
     }    
     if (Flags & D3DCLEAR_ZBUFFER) {
         glDepthMask(old_ztest);



More information about the wine-patches mailing list