[Mesa-dev] sRGB in gallium

Roland Scheidegger sroland at vmware.com
Thu Feb 10 06:17:18 PST 2011


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.

Roland


More information about the mesa-dev mailing list