From: Ian Romanick Date: Mon, 19 Aug 2013 20:16:54 +0000 (-0700) Subject: mesa: Only advertise GL_ETC1_RGB8_OES in ES contexts X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=40550c8cedbcca508fb05baa7b7d480e6a60c51f;p=mesa.git mesa: Only advertise GL_ETC1_RGB8_OES in ES contexts There is no extension for this format in desktop GL, so an application can't give the format back to glCompressedTexImage2D. Signed-off-by: Ian Romanick Reviewed-by: Anuj Phogat Cc: "9.2" --- diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c index 58859440c24..334ea4068d9 100644 --- a/src/mesa/main/texcompress.c +++ b/src/mesa/main/texcompress.c @@ -277,7 +277,15 @@ _mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats) } } - 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; }