Mesa (master): mesa: Fix the base format for GL_COMPRESSED_RGB_BPTC_*_FLOAT_ARB

Neil Roberts nroberts at kemper.freedesktop.org
Tue Aug 12 17:27:15 UTC 2014


Module: Mesa
Branch: master
Commit: 0c6e230eb1a6c22e15c852ae98a39110c13d78b8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0c6e230eb1a6c22e15c852ae98a39110c13d78b8

Author: Neil Roberts <neil at linux.intel.com>
Date:   Fri Jul 25 11:31:07 2014 +0100

mesa: Fix the base format for GL_COMPRESSED_RGB_BPTC_*_FLOAT_ARB

The signed and unsigned half-float BPTC-compressed formats were being reported
as having a base format of GL_RGBA but they don't store an alpha channel so it
should be GL_RGB.

Reviewed-by: Ian Romanick <ian.d.romanick 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 9dbfe9f..fb3ea02 100644
--- a/src/mesa/main/texcompress.c
+++ b/src/mesa/main/texcompress.c
@@ -92,6 +92,8 @@ _mesa_gl_compressed_format_base_format(GLenum format)
 
    case GL_COMPRESSED_RGB:
    case GL_COMPRESSED_SRGB:
+   case GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB:
+   case GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB:
    case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
    case GL_COMPRESSED_RGB_FXT1_3DFX:
    case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
@@ -104,8 +106,6 @@ _mesa_gl_compressed_format_base_format(GLenum format)
    case GL_COMPRESSED_SRGB_ALPHA:
    case GL_COMPRESSED_RGBA_BPTC_UNORM_ARB:
    case GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB:
-   case GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB:
-   case GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB:
    case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
    case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
    case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:




More information about the mesa-commit mailing list