}
}
- 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;
}
}