[Mesa-dev] sRGB in gallium

Alex Deucher alexdeucher at gmail.com
Thu Feb 10 08:54:35 PST 2011

On Thu, Feb 10, 2011 at 9:17 AM, Roland Scheidegger <sroland at vmware.com> wrote:
> Am 10.02.2011 13:25, schrieb Henri Verbeet:
>> On 10 February 2011 09:47, José Fonseca > Wouldn't it be
>> easier/cleaner if sRGB sampling/rendering support was not
>>> done through formats, but through enable/disable bits in
>>> pipe_sampler_view/pipe_rt_blend_state?
>> The issue with that is that sRGB only really makes sense for the 8-bit
>> RGBA formats. If you made it a sampler state like in D3D9 you'd need
>> to bring over the associated format capability querying as well. The
>> EXT_texture_sRGB_decode extension for example is setup the way it is
>> in part to avoid that issue. Also, I wouldn't be entirely surprised if
>> e.g. the r600 sampler state only works for some formats.
> I think it might be possible to do without format queries, since it
> appears there's no reason to use anything but 8-bit formats with srgb
> (and noone supports anything else neither) we could just say the srgb
> bit is only valid for these formats.
> Maybe some hw really has further restrictions though (say, can support
> bgra8888 srgb but not rgba8888 srgb), I don't know.

FWIW, the degamma only happens on the xyz channels but not w on 6xx+,
so you have to swizzle alpha to the w slot.


> Roland
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev

More information about the mesa-dev mailing list