i915: Use Stencil.Enabled instead of Stencil._Enabled in DrawBuffers.
authorEric Anholt <eric@anholt.net>
Fri, 15 May 2009 19:32:51 +0000 (12:32 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 15 May 2009 19:45:33 +0000 (12:45 -0700)
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.

bug #21608 for Radeon

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

index 4f4ea45b74f348b401f88ae5dde0a3fc4129903b..df5c3fc1766f40cbb3487fea397db96bb1b79d0a 100644 (file)
@@ -276,7 +276,7 @@ intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb)
       ctx->Driver.Enable(ctx, GL_DEPTH_TEST,
                          (ctx->Depth.Test && fb->Visual.depthBits > 0));
       ctx->Driver.Enable(ctx, GL_STENCIL_TEST,
-                         (ctx->Stencil._Enabled && fb->Visual.stencilBits > 0));
+                         (ctx->Stencil.Enabled && fb->Visual.stencilBits > 0));
    }
    else {
       /* Mesa's Stencil._Enabled field is updated when