mesa: Use correct enum conversion function.
[mesa.git] / src / mesa / main / texcompress.c
index 2391868a41747e3b2a73b92f951bc278f794990b..e71d0c411da3ba5b6662b8403713364204d8b803 100644 (file)
@@ -1,6 +1,5 @@
 /*
  * Mesa 3-D graphics library
- * Version:  6.5.1
  *
  * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
  * Copyright (c) 2008 VMware, Inc.
@@ -265,20 +264,16 @@ _mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats)
          n += 3;
       }
    }
-   if (_mesa_is_desktop_gl(ctx)
-       && ctx->Extensions.ANGLE_texture_compression_dxt) {
-      if (formats) {
-         formats[n++] = GL_RGB_S3TC;
-         formats[n++] = GL_RGB4_S3TC;
-         formats[n++] = GL_RGBA_S3TC;
-         formats[n++] = GL_RGBA4_S3TC;
-      }
-      else {
-         n += 4;
-      }
-   }
 
-   if (ctx->Extensions.OES_compressed_ETC1_RGB8_texture) {
+   /* The GL_OES_compressed_ETC1_RGB8_texture spec says:
+    *
+    *     "New State
+    *
+    *         The queries for NUM_COMPRESSED_TEXTURE_FORMATS and
+    *         COMPRESSED_TEXTURE_FORMATS include ETC1_RGB8_OES."
+    */
+   if (_mesa_is_gles(ctx)
+       && ctx->Extensions.OES_compressed_ETC1_RGB8_texture) {
       if (formats) {
          formats[n++] = GL_ETC1_RGB8_OES;
       }