meta: Don't alter fragment color clamp in DrawPixels().
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 9 Jun 2012 09:33:20 +0000 (02:33 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 2 Jul 2012 18:08:48 +0000 (11:08 -0700)
commitd73f6375f50be6a76991e240222a8e25906bfe4b
treefa6bafbf128ea4b486d9be55a690bdb417137af5
parent9f0f2f9512c3c9dcf875efa490b587f010b260c1
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@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/common/meta.c