st/mesa: ensure that all pixel paths operation on linear RGB data, not sRGB
authorBrian Paul <brianp@vmware.com>
Sun, 23 Jan 2011 01:28:20 +0000 (18:28 -0700)
committerBrian Paul <brianp@vmware.com>
Sun, 23 Jan 2011 01:33:35 +0000 (18:33 -0700)
commit9d380f487a4f2628594821a4fed5fe587ce52031
tree6128e468224eac1a19b2efec191332303b58261a
parent4c9ad084c1f54d83b4f27ce2b4cec23b6c7371c8
st/mesa: ensure that all pixel paths operation on linear RGB data, not sRGB

Before, we were converting between linear/sRGB in glReadPixels,
glDrawPixels, glAccum, etc if the renderbuffer was an sRGB texture.
Those all need to operate on pixel values as-is without conversion.

Also, when setting up render-to-texture, if the texture is sRGB the
pipe_surface view must be linear RGB.  This will change when we
support GL_ARB_framebuffer_sRGB.

This fixes http://bugs.freedesktop.org/show_bug.cgi?id=33353
src/mesa/state_tracker/st_cb_accum.c
src/mesa/state_tracker/st_cb_drawpixels.c
src/mesa/state_tracker/st_cb_fbo.c
src/mesa/state_tracker/st_cb_readpixels.c
src/mesa/state_tracker/st_cb_texture.c