[Mesa-dev] [PATCH 1/2] mesa/texcompress: correct mapping of S3TC formats in conversion function
Nanley Chery
nanleychery at gmail.com
Wed Aug 26 14:38:40 PDT 2015
From: Nanley Chery <nanley.g.chery at intel.com>
MESA_FORMAT_RGBA_DXT5 should actually be reserved for GL_RGBA[4]_DXT5_S3TC.
Also, Gallium and other dri drivers (radeon and nouveau) follow this mapping
scheme.
Cc: Brian Paul <brianp at vmware.com>
Cc: Chad Versace <chad.versace at intel.com>
Cc: Ian Romanick <ian.d.romanick at intel.com>
Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
---
src/mesa/main/texcompress.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c
index edfb036..de82b49 100644
--- a/src/mesa/main/texcompress.c
+++ b/src/mesa/main/texcompress.c
@@ -378,15 +378,15 @@ _mesa_glenum_to_compressed_format(GLenum format)
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
case GL_RGB_S3TC:
+ case GL_RGB4_S3TC:
return MESA_FORMAT_RGB_DXT1;
case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
- case GL_RGB4_S3TC:
return MESA_FORMAT_RGBA_DXT1;
case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
case GL_RGBA_S3TC:
+ case GL_RGBA4_S3TC:
return MESA_FORMAT_RGBA_DXT3;
case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
- case GL_RGBA4_S3TC:
return MESA_FORMAT_RGBA_DXT5;
case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
--
2.5.0
More information about the mesa-dev
mailing list