mesa: Allow ETC2/EAC formats with ARB_ES3_compatibility.
authorMatt Turner <mattst88@gmail.com>
Mon, 4 Mar 2013 19:32:32 +0000 (11:32 -0800)
committerMatt Turner <mattst88@gmail.com>
Sat, 9 Mar 2013 05:20:39 +0000 (21:20 -0800)
Fixes piglit's oes_compressed_etc2_texture-miptree tests on Desktop GL.
Reported-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/main/glformats.c
src/mesa/main/teximage.c

index 8728540cf3536a9e6553c1b658d637d184b2180f..c1e16587ae1a99ce511a4f93c1c6a451f47e7ca1 100644 (file)
@@ -917,7 +917,7 @@ _mesa_is_compressed_format(struct gl_context *ctx, GLenum format)
    case GL_COMPRESSED_SIGNED_RG11_EAC:
    case GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:
    case GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:
-      return _mesa_is_gles3(ctx);
+      return _mesa_is_gles3(ctx) || ctx->Extensions.ARB_ES3_compatibility;
    case GL_PALETTE4_RGB8_OES:
    case GL_PALETTE4_RGBA8_OES:
    case GL_PALETTE4_R5_G6_B5_OES:
index 9d4a17052d593bb90f8d6430e794a7f8e304f162..7d996da4708d78ffd5bc2ea258c8c2c08f43fc24 100644 (file)
@@ -520,7 +520,7 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
       }
    }
 
-   if (_mesa_is_gles3(ctx)) {
+   if (_mesa_is_gles3(ctx) || ctx->Extensions.ARB_ES3_compatibility) {
       switch (internalFormat) {
       case GL_COMPRESSED_RGB8_ETC2:
       case GL_COMPRESSED_SRGB8_ETC2: