Revert "read_rgba_pixels: Don't force clamping if the renderbuffer is normalized."
authorMichel Dänzer <michel.daenzer@amd.com>
Thu, 17 Nov 2011 14:04:40 +0000 (15:04 +0100)
committerMichel Dänzer <michel@daenzer.net>
Thu, 17 Nov 2011 14:04:40 +0000 (15:04 +0100)
This reverts commit b11c16752a18ef8dfb96d9f0ead6ecb62bde6773.

Breaks at least luminance destination formats.

src/mesa/main/readpix.c

index 9bb58e7a4dc07196e20a760168f42c4ab1a52f70..86b87534d31540c59d8bc3dabaf50ef784fdda12 100644 (file)
@@ -285,8 +285,7 @@ read_rgba_pixels( struct gl_context *ctx,
       return;
 
    if ((ctx->Color._ClampReadColor == GL_TRUE || type != GL_FLOAT) &&
-       !_mesa_is_integer_format(format) &&
-       _mesa_get_format_datatype(rb->Format) != GL_UNSIGNED_NORMALIZED) {
+       !_mesa_is_integer_format(format)) {
       transferOps |= IMAGE_CLAMP_BIT;
    }