mesa: change s3tc vs. fxt1 priority when choosing compressed formats
authorBrian Paul <brianp@vmware.com>
Fri, 23 Oct 2009 20:37:14 +0000 (14:37 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 23 Oct 2009 20:45:44 +0000 (14:45 -0600)
src/mesa/main/texformat.c

index c709004784b624d15664a5bf6d9982429cdf9bc9..9d5534e39602c076f473038b06e9c32f53317ae5 100644 (file)
@@ -1590,25 +1590,25 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
       case GL_COMPRESSED_INTENSITY_ARB:
          return &_mesa_texformat_intensity;
       case GL_COMPRESSED_RGB_ARB:
-#if FEATURE_texture_fxt1
-         if (ctx->Extensions.TDFX_texture_compression_FXT1)
-            return &_mesa_texformat_rgb_fxt1;
-#endif
 #if FEATURE_texture_s3tc
          if (ctx->Extensions.EXT_texture_compression_s3tc ||
              ctx->Extensions.S3_s3tc)
             return &_mesa_texformat_rgb_dxt1;
 #endif
-         return &_mesa_texformat_rgb;
-      case GL_COMPRESSED_RGBA_ARB:
 #if FEATURE_texture_fxt1
          if (ctx->Extensions.TDFX_texture_compression_FXT1)
-            return &_mesa_texformat_rgba_fxt1;
+            return &_mesa_texformat_rgb_fxt1;
 #endif
+         return &_mesa_texformat_rgb;
+      case GL_COMPRESSED_RGBA_ARB:
 #if FEATURE_texture_s3tc
          if (ctx->Extensions.EXT_texture_compression_s3tc ||
              ctx->Extensions.S3_s3tc)
-            return &_mesa_texformat_rgba_dxt3; /* Not rgba_dxt1, see spec */
+            return &_mesa_texformat_rgba_dxt5; /* Not rgba_dxt1, see spec */
+#endif
+#if FEATURE_texture_fxt1
+         if (ctx->Extensions.TDFX_texture_compression_FXT1)
+            return &_mesa_texformat_rgba_fxt1;
 #endif
          return &_mesa_texformat_rgba;
       default: