intel: Use GL_FRONT_AND_BACK for stencil clearing.
authorEric Anholt <eric@anholt.net>
Thu, 14 May 2009 01:18:29 +0000 (18:18 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 14 May 2009 18:41:03 +0000 (11:41 -0700)
This comes from a radeon-rewrite fallback fix, but may also fix stencil
clear failure when the polygon winding mode is flipped.

src/mesa/drivers/dri/intel/intel_clear.c

index eb0d890f477d68d9f5daf1cc399928629e9531ca..488db2cf452672cf99ad28df151d6bbb1d0219e4 100644 (file)
@@ -256,7 +256,8 @@ intel_clear_tris(GLcontext *ctx, GLbitfield mask)
       if (this_mask & BUFFER_BIT_STENCIL) {
         _mesa_Enable(GL_STENCIL_TEST);
         _mesa_StencilOp(GL_REPLACE, GL_REPLACE, GL_REPLACE);
-        _mesa_StencilFuncSeparate(GL_FRONT, GL_ALWAYS, ctx->Stencil.Clear,
+        _mesa_StencilFuncSeparate(GL_FRONT_AND_BACK, GL_ALWAYS,
+                                  ctx->Stencil.Clear,
                                   ctx->Stencil.WriteMask[0]);
       } else {
         _mesa_Disable(GL_STENCIL_TEST);