i830: Fix crash for GL_STENCIL_TEST in i830Enable()
authorKurt Roeckx <kurt@roeckx.be>
Thu, 10 May 2012 22:19:42 +0000 (00:19 +0200)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 29 May 2012 18:33:02 +0000 (11:33 -0700)
commit 87f12bb2d95236c7b025d1a8be56b5ab1683d702 tried to fix rb->mt
being NULL, but change this case wrong.

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i915/i830_state.c

index 6f8bd69481fc51272362114c3706b952afae4808..647ba62c03c409b121516123faf8d0b3af4004a7 100644 (file)
@@ -862,7 +862,7 @@ i830Enable(struct gl_context * ctx, GLenum cap, GLboolean state)
          if (ctx->DrawBuffer) {
             struct intel_renderbuffer *irbStencil
                = intel_get_renderbuffer(ctx->DrawBuffer, BUFFER_STENCIL);
-            hw_stencil = (irbStencil && irbStencil->mt->region);
+            hw_stencil = (irbStencil && irbStencil->mt);
          }
          if (hw_stencil) {
             I830_STATECHANGE(i830, I830_UPLOAD_CTX);