Mesa (master): i830: Fix crash for GL_STENCIL_TEST in i830Enable()

Kenneth Graunke kwg at kemper.freedesktop.org
Tue May 29 18:32:48 UTC 2012


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

Author: Kurt Roeckx <kurt at roeckx.be>
Date:   Fri May 11 00:19:42 2012 +0200

i830: Fix crash for GL_STENCIL_TEST in i830Enable()

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 at roeckx.be>
Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i915/i830_state.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/i915/i830_state.c b/src/mesa/drivers/dri/i915/i830_state.c
index 6f8bd69..647ba62 100644
--- a/src/mesa/drivers/dri/i915/i830_state.c
+++ b/src/mesa/drivers/dri/i915/i830_state.c
@@ -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);




More information about the mesa-commit mailing list