read_rgba_pixels: Don't force clamping if the renderbuffer is normalized.
authorMichel Dänzer <michel.daenzer@amd.com>
Wed, 16 Nov 2011 16:39:50 +0000 (17:39 +0100)
committerMichel Dänzer <michel.daenzer@amd.com>
Thu, 17 Nov 2011 09:46:44 +0000 (10:46 +0100)
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/readpix.c

index 86b87534d31540c59d8bc3dabaf50ef784fdda12..9bb58e7a4dc07196e20a760168f42c4ab1a52f70 100644 (file)
@@ -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;
    }