https://bugs.freedesktop.org/show_bug.cgi?id=36965
--- Comment #6 from Andreas Boll andreas.boll.dev@gmail.com --- (In reply to comment #4)
There is a lot of other code which plays role in handling sRGB textures. I don't think getteximage.c is relevant to this issue(s).
Nevertheless, it looks like Pavel's and Martin's issues are different bugs.
Pavel reported that GL_EXT_texture_sRGB_decode, which is only in 7.11, is broken specifically on r300g, but other drivers might be affected as well and it definitely looks like a Mesa core bug. Pavel, could you please add it as a new bug against Mesa core?
Martin's issue is likely related to the fact that piglit/glean/texture_srgb fails on r600g. Taking a look at it might be a good start.
the piglit passes for me on my rv770 with mesa from git (470952f)
@Martin: Can you test with a newer version of mesa (9.0 or mesa from git)?