r300: fallback only if stencil test is enabled
authorMaciej Cencora <m.cencora@gmail.com>
Mon, 27 Apr 2009 13:31:01 +0000 (15:31 +0200)
committerAlex Deucher <alexdeucher@gmail.com>
Mon, 27 Apr 2009 18:33:24 +0000 (14:33 -0400)
src/mesa/drivers/dri/r300/r300_render.c

index 41b5e30be496113728c63eca18ab6c2fc2243ae1..f87fee4af651b57b4e45526daaf76bab411d9340 100644 (file)
@@ -439,14 +439,9 @@ static int r300Fallback(GLcontext * ctx)
 
        FALLBACK_IF(ctx->RenderMode != GL_RENDER);
 
-       /* If GL_EXT_stencil_two_side is disabled, this fallback check can
-        * be removed.
-        */
-       FALLBACK_IF(ctx->Stencil.Ref[0] != ctx->Stencil.Ref[back]
-                   || ctx->Stencil.ValueMask[0] !=
-                   ctx->Stencil.ValueMask[back]
-                   || ctx->Stencil.WriteMask[0] !=
-                   ctx->Stencil.WriteMask[back]);
+       FALLBACK_IF(ctx->Stencil.Enabled && (ctx->Stencil.Ref[0] != ctx->Stencil.Ref[back]
+                   || ctx->Stencil.ValueMask[0] != ctx->Stencil.ValueMask[back]
+                   || ctx->Stencil.WriteMask[0] != ctx->Stencil.WriteMask[back]));
 
        if (ctx->Extensions.NV_point_sprite || ctx->Extensions.ARB_point_sprite)
                FALLBACK_IF(ctx->Point.PointSprite);