[Mesa-dev] [PATCH 1/3] meta: Don't alter fragment color clamp in DrawPixels().

Eric Anholt eric at anholt.net
Mon Jun 11 17:52:15 CEST 2012


On Sat,  9 Jun 2012 02:33:20 -0700, Kenneth Graunke <kenneth at whitecape.org> wrote:
> 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 <eric at anholt.net>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>

This makes sense, since our meta drawpixels code is fixed function for
color rendering, so we should leave GL_FIXED_ONLY in place and allow it
to clamp.  If we ever make shaders for it, we'd have to revisit this
anyway.

These two are:

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120611/ab15c2cd/attachment-0001.pgp>


More information about the mesa-dev mailing list