radeon: Use Stencil.Enabled instead of Stencil._Enabled in DrawBuffers.
authorDave Airlie <airlied@linux.ie>
Mon, 13 Jul 2009 13:09:17 +0000 (23:09 +1000)
committerDave Airlie <airlied@linux.ie>
Mon, 13 Jul 2009 15:23:23 +0000 (01:23 +1000)
The _Enabled field isn't updated at the point that DrawBuffers is called,
and the Driver.Enable() function does the testing for stencil buffer
presence anyway.

src/mesa/drivers/dri/radeon/radeon_common.c

index f721c630a217ba1e87f799938af681b9d1a90461..3b8541a74a447a2be8ab4d3a363543b9ccd758d5 100644 (file)
@@ -751,9 +751,8 @@ void radeon_draw_buffer(GLcontext *ctx, struct gl_framebuffer *fb)
                ctx->Driver.Enable(ctx, GL_DEPTH_TEST,
                                   (ctx->Depth.Test && fb->Visual.depthBits > 0));
                /* Need to update the derived ctx->Stencil._Enabled first */
-               _mesa_update_stencil(ctx);
                ctx->Driver.Enable(ctx, GL_STENCIL_TEST,
-                                  (ctx->Stencil._Enabled && fb->Visual.stencilBits > 0));
+                                  (ctx->Stencil.Enabled && fb->Visual.stencilBits > 0));
        } else {
                ctx->NewState |= (_NEW_DEPTH | _NEW_STENCIL);
        }