mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 23:50:11 +01:00
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>
This commit is contained in:
parent
d382e90614
commit
d40532f260
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue