diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2013-08-19 13:16:54 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2013-08-21 07:46:51 -0700 |
commit | 40550c8cedbcca508fb05baa7b7d480e6a60c51f (patch) | |
tree | 03874b03437b63c20a6bb262aac7c08acd3238bd /src | |
parent | cabd45773b58d6aa48202da1cdd8cf1a6b856c53 (diff) |
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 <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Cc: "9.2" <mesa-stable@lists.freedesktop.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/texcompress.c | 10 |
1 files changed, 9 insertions, 1 deletions
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; } |