diff options
author | Brian Paul <brianp@vmware.com> | 2014-01-21 16:08:18 -0800 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2014-01-23 08:13:13 -0700 |
commit | 91567b83bfd8979389f66635c50f36714a08a3f5 (patch) | |
tree | 7f54035e64234e774e2cdb479419e07dc7d72b6b /src/mesa/main | |
parent | ab6f9fccd4f90949ee21e5f5e90cdf152815304b (diff) |
mesa: add missing ETC2_SRGB cases in formats.c
In the _mesa_get_format_color_encoding() and _mesa_get_srgb_format_linear()
functions.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/formats.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c index 1246c4d9265..7bde1f1a85f 100644 --- a/src/mesa/main/formats.c +++ b/src/mesa/main/formats.c @@ -2032,6 +2032,9 @@ _mesa_get_format_color_encoding(gl_format format) case MESA_FORMAT_SRGBA_DXT3: case MESA_FORMAT_SRGBA_DXT5: case MESA_FORMAT_XBGR8888_SRGB: + case MESA_FORMAT_ETC2_SRGB8: + case MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC: + case MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1: return GL_SRGB; default: return GL_LINEAR; @@ -2077,6 +2080,15 @@ _mesa_get_srgb_format_linear(gl_format format) case MESA_FORMAT_XBGR8888_SRGB: format = MESA_FORMAT_RGBX8888_REV; break; + case MESA_FORMAT_ETC2_SRGB8: + format = MESA_FORMAT_ETC2_RGB8; + break; + case MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC: + format = MESA_FORMAT_ETC2_RGBA8_EAC; + break; + case MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1: + format = MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1; + break; default: break; } |