gallium/util: util_format_srgb should not return FORMAT_NONE for sRGB formats

This fixes a serious regression introduced
in 4e549ddb50.

Cc: 9.2 10.0 <mesa-stable@lists.freedesktop.org>

Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit d40532f260)
This commit is contained in:
Marek Olšák 2014-01-21 19:53:45 +01:00 committed by Carl Worth
parent e2b6834c87
commit b1694c9f87

View file

@ -872,6 +872,9 @@ util_format_get_component_bits(enum pipe_format format,
static INLINE enum pipe_format
util_format_srgb(enum pipe_format format)
{
if (util_format_is_srgb(format))
return format;
switch (format) {
case PIPE_FORMAT_L8_UNORM:
return PIPE_FORMAT_L8_SRGB;