Mesa (master): intel: Use GL_FRONT_AND_BACK for stencil clearing.

Eric Anholt anholt at kemper.freedesktop.org
Thu May 14 18:43:45 UTC 2009


Module: Mesa
Branch: master
Commit: d866abeffc7e4a29736fa35fb8ac09c3a28a44d6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d866abeffc7e4a29736fa35fb8ac09c3a28a44d6

Author: Eric Anholt <eric at anholt.net>
Date:   Wed May 13 18:18:29 2009 -0700

intel: Use GL_FRONT_AND_BACK for stencil clearing.

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 |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_clear.c b/src/mesa/drivers/dri/intel/intel_clear.c
index eb0d890..488db2c 100644
--- a/src/mesa/drivers/dri/intel/intel_clear.c
+++ b/src/mesa/drivers/dri/intel/intel_clear.c
@@ -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);




More information about the mesa-commit mailing list