DrawPixels uses the MESA_META_CLAMP_FRAGMENT_COLOR flag to save/restore the fragment color clamp mode. This is unnecessary since it never alters it. It's also harmful: when the clamp mode is GL_FIXED_ONLY, setting this flag causes _mesa_meta_begin to force it to GL_FALSE, breaking clamping on SNORM formats.
DrawPixels should use the user-specified clamp mode and not change it. Fixes Piglit's spec/ARB_color_buffer_float/GL_RGBA8_SNORM-drawpixels test on i965/Sandybridge (with SNORM render targets re-enabled). Cc: Eric Anholt <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> --- src/mesa/drivers/common/meta.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 8d7e901..40da516 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -2287,7 +2287,6 @@ _mesa_meta_DrawPixels(struct gl_context *ctx, MESA_META_CLIP | MESA_META_VERTEX | MESA_META_VIEWPORT | - MESA_META_CLAMP_FRAGMENT_COLOR | metaExtraSave)); newTex = alloc_texture(tex, width, height, texIntFormat); -- 1.7.10.4 _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
