diff options
-rw-r--r-- | src/mesa/main/texcompress.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c index 9567c5ddab3..15970a75c05 100644 --- a/src/mesa/main/texcompress.c +++ b/src/mesa/main/texcompress.c @@ -358,21 +358,27 @@ _mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats) } } - if (_mesa_is_gles3(ctx)) { + if (_mesa_is_gles3(ctx) || ctx->Extensions.ARB_ES3_compatibility) { if (formats) { formats[n++] = GL_COMPRESSED_RGB8_ETC2; - formats[n++] = GL_COMPRESSED_SRGB8_ETC2; formats[n++] = GL_COMPRESSED_RGBA8_ETC2_EAC; - formats[n++] = GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC; formats[n++] = GL_COMPRESSED_R11_EAC; formats[n++] = GL_COMPRESSED_RG11_EAC; formats[n++] = GL_COMPRESSED_SIGNED_R11_EAC; formats[n++] = GL_COMPRESSED_SIGNED_RG11_EAC; formats[n++] = GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2; - formats[n++] = GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2; + } else { + n += 7; } - else { - n += 10; + } + + if (_mesa_is_gles3(ctx)) { + if (formats) { + formats[n++] = GL_COMPRESSED_SRGB8_ETC2; + formats[n++] = GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC; + formats[n++] = GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2; + } else { + n += 3; } } |