gles: Fix glGet(GL_{NUM_,}COMPRESSED_TEXTURE_FORMATS_ARB)
authorAdam Jackson <ajax@redhat.com>
Thu, 8 Sep 2011 17:34:53 +0000 (13:34 -0400)
committerAdam Jackson <ajax@redhat.com>
Thu, 8 Sep 2011 17:40:06 +0000 (13:40 -0400)
We'd still accept the GL_PALETTE[48]_* formats in glCompressedTexImage2D,
but they wouldn't be listed if you queried whether they were supported.

Signed-off-by: Adam Jackson <ajax@redhat.com>
src/mesa/main/texcompress.c

index 42bd1eee5ca061145a863722102b27a7fed06926..390fc535e925aa81bdee40cfd032069e68dfbeb3 100644 (file)
@@ -259,7 +259,6 @@ _mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats)
          n += 4;
       }
    }
-   return n;
 
 #if FEATURE_ES1 || FEATURE_ES2
    if (formats) {
@@ -278,6 +277,8 @@ _mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats)
       n += 10;
    }
 #endif
+
+   return n;
 }