Mesa (master): meta: Don't alter fragment color clamp in DrawPixels().
Kenneth Graunke
kwg at kemper.freedesktop.org
Mon Jul 2 18:09:46 UTC 2012
Module: Mesa
Branch: master
Commit: d73f6375f50be6a76991e240222a8e25906bfe4b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d73f6375f50be6a76991e240222a8e25906bfe4b
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Sat Jun 9 02:33:20 2012 -0700
meta: Don't alter fragment color clamp in DrawPixels().
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).
Reviewed-by: Eric Anholt <eric at anholt.net>
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/common/meta.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index be7141a..6a53393 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -2347,7 +2347,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);
More information about the mesa-commit
mailing list