[Mesa-dev] [PATCH] mesa/swrast: handle sRGB FBOs correctly.

Dave Airlie airlied at gmail.com
Mon Jan 10 15:55:16 PST 2011


On Tue, Jan 11, 2011 at 1:24 AM, Brian Paul <brianp at vmware.com> wrote:
> On 01/09/2011 08:43 PM, Dave Airlie wrote:
>>
>> From: Dave Airlie<airlied at redhat.com>
>>
>>> From reading EXT_texture_sRGB and EXT_framebuffer_sRGB and interactions
>>
>> with FBO I've found that swrast is converting the sRGB values to linear
>> for
>> blending when an sRGB texture is bound as an FBO. According to the spec
>> and further explained in the framebuffer_sRGB spec this behaviour is not
>> required unless the GL_FRAMEBUFFER_SRGB is enabled and the Visual/config
>> exposes GL_FRAMEBUFFER_SRGB_CAPABLE_EXT.
>>
>> This patch fixes swrast to use a separate Fetch call for FBOs bound to
>> SRGB and avoid the conversions.
>
> One comment below.
>
> BTW, as long as you're looking at sRGB, it might be interesting to implement
> the new GL_EXT_texture_sRGB_decode extension:
> http://www.opengl.org/registry/specs/EXT/texture_sRGB_decode.txt
>

Oh interesting, I'll add to my list, doesn't look too hard.

Pushed the rest with the change you suggested.

Thanks,
Dave.


More information about the mesa-dev mailing list