[Mesa-dev] [PATCH] read_rgba_pixels: Don't force clamping if the renderbuffer is already clamped.

Theiss, Ingo ingo.theiss at i-matrixx.de
Thu Nov 17 04:45:44 PST 2011


 
Am Mittwoch, 16. November 2011 17:44 CET, Michel Dänzer <michel at daenzer.net> schrieb: 
 
> From: Michel Dänzer <michel.daenzer at amd.com>
> 
> Signed-off-by: Michel Dänzer <michel.daenzer at 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;
>     }
>  
> -- 
> 1.7.7.2
> 

Hi Michel,

with this patch (b11c167...) I get a regression compared to (4517153...) with piglit test 'texture-al -auto'.

texture-al: failure with format GL_ALPHA:
  expected color = 1, 0.5, 0, 1
  result color = 3, 0.501961, 0, 1

glxinfo:

OpenGL renderer string: Gallium 0.4 on AMD BARTS
OpenGL version string: 2.1 Mesa 7.12-devel (git-b11c167)
OpenGL shading language version string: 1.20

Regards,

Ingo


 
 



More information about the mesa-dev mailing list