On 11/16/2011 09:44 AM, Michel Dänzer wrote:
From: Michel Dänzer<michel.daen...@amd.com>

Signed-off-by: Michel Dänzer<michel.daen...@amd.com>
---
  src/mesa/main/readpix.c |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index 8550618..582adc3 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -285,7 +285,8 @@ read_rgba_pixels( struct gl_context *ctx,
        return;

     if ((ctx->Color._ClampReadColor == GL_TRUE || type != GL_FLOAT)&&
-       !_mesa_is_integer_format(format)) {
+       !_mesa_is_integer_format(format)&&
+       _mesa_get_format_datatype(rb->Format) != GL_UNSIGNED_NORMALIZED) {
        transferOps |= IMAGE_CLAMP_BIT;
     }


Looks good to me.

Reviewed-by: Brian Paul <bri...@vmware.com>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to