[Mesa-dev] [PATCH] meta: fix broken sRGB mipmap generation

Brian Paul brianp at vmware.com
Sat Sep 17 12:06:02 PDT 2011


On 09/17/2011 11:52 AM, Henri Verbeet wrote:
> On 17 September 2011 19:33, Brian Paul<brian.e.paul at gmail.com>  wrote:
>> From: Brian Paul<brianp at vmware.com>
>>
>> If we're generating a mipmap for an sRGB texture we need to bypass
>> sRGB->linear conversion.  Otherwise the destination mipmap level
>> (drawn with a textured quad) will have the wrong colors.
>> If we can't turn of sRGB->linear conversion (GL_EXT_texture_sRGB_decode)
>> we need to use the software fallback for mipmap generation.
>>
> Although not directly related to the issue this patch fixes, note that
> issue 24 in EXT_texture_sRGB (and issue 10 in EXT_texture_sRGB_decode
> is related to that) recommends to do filtering in linear space.

Right.  I wasn't concerned with that for now.  If 
GL_EXT_framebuffer_sRGB is supported, I believe we can do that with 
little effort, but I haven't tried it yet.

-Brian


More information about the mesa-dev mailing list