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

Author: Emil Velikov <[email protected]>
Date:   Sun Jan 12 22:42:05 2014 +0000

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 <[email protected]>
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 <[email protected]>
Cc: 10.0 9.2 9.1 <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>

---

 src/mesa/main/clear.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c
index fd5bb35..077c5fc 100644
--- a/src/mesa/main/clear.c
+++ b/src/mesa/main/clear.c
@@ -278,7 +278,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;

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to