summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2014-01-12 22:42:05 +0000
committerCarl Worth <cworth@cworth.org>2014-01-25 16:38:12 -0800
commitb513c66a4ebd5b098bc409da8611af579c55076f (patch)
treee1c738c066a6a1602a3f73bfbab6d74f8637d27b
parentdbc0ae1079d6ce5349b25a86a91c78371c226809 (diff)
mesa: use signed temporary variable to store _ColorDrawBufferIndexes
_ColorDrawBufferIndexes is defined as GLint* and using a GLuint* will result in the first part of the conditional to be evaluated to true always. Unintentionally introduced by the following commit, this will result in a driver segfault if one is using an old version of the piglit test bin/clearbuffer-mixed-format -auto -fbo commit 03d848ea1003abefd8fe51a5b4a780527cd852af Author: Marek Olšák <marek.olsak@amd.com> Date: Wed Dec 4 00:27:20 2013 +0100 mesa: fix interpretation of glClearBuffer(drawbuffer) This corresponding piglit tests supported this incorrect behavior instead of pointing at it. Cc: Marek Olšák <marek.olsak@amd.com> Cc: 10.0 9.2 9.1 <mesa-stable@lists.freedesktop.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> (cherry picked from commit 10368e1446e3b537c1dc4cb536994a4d01cfd2f0)
-rw-r--r--src/mesa/main/clear.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c
index f0b525fa017..d568ed8a3f4 100644
--- a/src/mesa/main/clear.c
+++ b/src/mesa/main/clear.c
@@ -274,7 +274,7 @@ make_color_buffer_mask(struct gl_context *ctx, GLint drawbuffer)
break;
default:
{
- GLuint buf = ctx->DrawBuffer->_ColorDrawBufferIndexes[drawbuffer];
+ GLint buf = ctx->DrawBuffer->_ColorDrawBufferIndexes[drawbuffer];
if (buf >= 0 && att[buf].Renderbuffer) {
mask |= 1 << buf;