[Mesa-dev] sRGB in gallium (was: allow rendering to sRGB textures if EXT_fb_srgb is unsupported)

Henri Verbeet hverbeet at gmail.com
Thu Feb 10 04:25:39 PST 2011

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 know that DX9 has it as a state, DX10 doesn't even have SRGB anywher
D3D10 uses formats as well. I.e., DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,

More information about the mesa-dev mailing list