From b11c16752a18ef8dfb96d9f0ead6ecb62bde6773 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Wed, 16 Nov 2011 17:39:50 +0100 Subject: [PATCH] read_rgba_pixels: Don't force clamping if the renderbuffer is normalized. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Michel Dänzer Reviewed-by: Brian Paul --- src/mesa/main/readpix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c index 86b8753..9bb58e7 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; } -- 2.7.4