mesa: Fix the base format for GL_COMPRESSED_RGB_BPTC_*_FLOAT_ARB
authorNeil Roberts <neil@linux.intel.com>
Fri, 25 Jul 2014 10:31:07 +0000 (11:31 +0100)
committerNeil Roberts <neil@linux.intel.com>
Tue, 12 Aug 2014 17:00:26 +0000 (18:00 +0100)
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@intel.com>
src/mesa/main/texcompress.c

index 9dbfe9f..fb3ea02 100644 (file)
@@ -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: