From: Michel Dänzer Date: Wed, 16 Nov 2011 16:39:50 +0000 (+0100) Subject: read_rgba_pixels: Don't force clamping if the renderbuffer is normalized. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b11c16752a18ef8dfb96d9f0ead6ecb62bde6773;p=mesa.git read_rgba_pixels: Don't force clamping if the renderbuffer is normalized. Signed-off-by: Michel Dänzer Reviewed-by: Brian Paul --- diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c index 86b87534d31..9bb58e7a4dc 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; }