radeon: handle compressed sRGB texture formats
authorMaciej Cencora <m.cencora@gmail.com>
Sun, 7 Mar 2010 14:00:29 +0000 (15:00 +0100)
committerMaciej Cencora <m.cencora@gmail.com>
Sun, 7 Mar 2010 21:13:44 +0000 (22:13 +0100)
src/mesa/drivers/dri/radeon/radeon_texture.c

index 6a8e70d47e6631f14d13d989496feb2be523c4d5..3ccc711253bb725fa08e39ab578d67a561532315 100644 (file)
@@ -558,6 +558,15 @@ gl_format radeonChooseTextureFormat(GLcontext * ctx,
        case GL_COMPRESSED_SLUMINANCE_ALPHA:
                return MESA_FORMAT_SLA8;
 
+       case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
+               return MESA_FORMAT_SRGB_DXT1;
+       case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
+               return MESA_FORMAT_SRGBA_DXT1;
+       case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
+               return MESA_FORMAT_SRGBA_DXT3;
+       case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
+               return MESA_FORMAT_SRGBA_DXT5;
+
        default:
                _mesa_problem(ctx,
                              "unexpected internalFormat 0x%x in %s",