[Mesa-dev] [PATCH] mesa/glformats: restrict ETC1_RGB8 support to GLES

Nanley Chery nanleychery at gmail.com
Mon Sep 14 11:17:32 PDT 2015


From: Nanley Chery <nanley.g.chery at intel.com>

According to the extensions table and our glext headers,
OES_compressed_ETC1_RGB8_texture is only supported in
GLES1 and GLES2. Since we may give users a GLES3 context
when a GLES2 context is requested, we also allow this
extension for GLES3 as well.

Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
---

I've updated the commit's subject and comment to be clearer. I assume
the R-b on the first patch still applies?

 src/mesa/main/teximage.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index ff844cd..2a4d29d 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -558,7 +558,8 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
       }
    }
 
-   if (ctx->Extensions.OES_compressed_ETC1_RGB8_texture) {
+   if (_mesa_is_gles(ctx) &&
+      ctx->Extensions.OES_compressed_ETC1_RGB8_texture) {
       switch (internalFormat) {
       case GL_ETC1_RGB8_OES:
          return GL_RGB;
-- 
2.5.1



More information about the mesa-dev mailing list