I think another approach would be to temporarily set the Sampler.sRGBDecode field to GL_SKIP_DECODE_EXT, use the non-sRGB path to get the texels, then restore Sampler.sRGBDecode to its original value. Call _mesa_set_fetch_functions() as needed to choose the non-decoding texel fetch functions. Then we could avoid the linear_to_nonlinear() function altogether.
We should probably have a piglit test to exercise glGetTexImage with sRGB textures... -Brian On Sat, May 21, 2011 at 5:37 PM, Mike Kaplinskiy <mike.kaplins...@gmail.com> wrote: > Sorry looks like I edited that comment a few too many times. Here's an > updated patch with the comment fixed. > > On Sat, May 21, 2011 at 7:15 PM, Mike Kaplinskiy > <mike.kaplins...@gmail.com> wrote: >> This fixes the loading screen for Assassins Creed Brotherhood running >> under wine for me [exposed by a fast-path that actually fixed it at >> be0a2f62f3a5bc6f05c3c7c6b674f2688aee031d]. May also fix bug 37150. >> > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev > > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev