summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ellison <papillo@i965-laptop.(none)>2009-02-11 18:01:34 -0700
committerIan Romanick <ian.d.romanick@intel.com>2009-03-10 21:56:30 -0700
commitffffc154ad958d7e2745da78296664371812d8a7 (patch)
tree87e667f71273bccb29b7fbb33658db7387c3a1c7
parente89efebf1752dcab4e38bbeebb178e08e56c95b1 (diff)
downloadmesa-ffffc154ad958d7e2745da78296664371812d8a7.tar.gz
Fix an i965 assertion failure on glClear()
While running conform with render-to-texture: conform -d 33 -v 2 -t -direct the i965 driver failed this assertion: intel_clear.c:77: intel_clear_tris: Assertion `(mask & ~((1 << BUFFER_BACK_LEFT) | (1 << BUFFER_FRONT_LEFT) | (1 << BUFFER_DEPTH) | (1 << BUFFER_STENCIL))) == 0' failed. The problem is that intel_clear_tris() is called by intelClear() to clear any and all of the available color buffers, but intel_clear_tris() actually only handles the back left and front left color buffers; so the assertion fails as soon as you try to clear a non-standard color buffer. The fix is to have intelClear() only call intel_clear_tris() with buffers that intel_clear_tris() can support. intelClear() already backs down to _swrast_Clear() for all buffers that aren't handled explicitly. (cherry picked from commit 0ccbc3c905f0594a35d72887a1f115e148aaa596)
-rw-r--r--src/mesa/drivers/dri/intel/intel_clear.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_clear.c b/src/mesa/drivers/dri/intel/intel_clear.c
index dcb6b2316c0..c3ba50f3550 100644
--- a/src/mesa/drivers/dri/intel/intel_clear.c
+++ b/src/mesa/drivers/dri/intel/intel_clear.c
@@ -289,7 +289,7 @@ intelClear(GLcontext *ctx, GLbitfield mask)
}
else {
/* glColorMask in effect */
- tri_mask |= (mask & BUFFER_BITS_COLOR);
+ tri_mask |= (mask & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT));
}
/* HW stencil */