+static const struct internal_format_class_info gles_etc2_compatible_internal_formats[] = {
+ {VIEW_CLASS_EAC_R11, GL_COMPRESSED_R11_EAC},
+ {VIEW_CLASS_EAC_R11, GL_COMPRESSED_SIGNED_R11_EAC},
+ {VIEW_CLASS_EAC_RG11, GL_COMPRESSED_RG11_EAC},
+ {VIEW_CLASS_EAC_RG11, GL_COMPRESSED_SIGNED_RG11_EAC},
+ {VIEW_CLASS_ETC2_RGB, GL_COMPRESSED_RGB8_ETC2},
+ {VIEW_CLASS_ETC2_RGB, GL_COMPRESSED_SRGB8_ETC2},
+ {VIEW_CLASS_ETC2_RGBA, GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2},
+ {VIEW_CLASS_ETC2_RGBA, GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2},
+ {VIEW_CLASS_ETC2_EAC_RGBA, GL_COMPRESSED_RGBA8_ETC2_EAC},
+ {VIEW_CLASS_ETC2_EAC_RGBA, GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC},
+};
+
+static const struct internal_format_class_info gles_astc_compatible_internal_formats[] = {
+#define ASTC_FMT(size) \
+ {VIEW_CLASS_ASTC_##size##_RGBA, GL_COMPRESSED_RGBA_ASTC_##size##_KHR}, \
+ {VIEW_CLASS_ASTC_##size##_RGBA, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_##size##_KHR}
+
+ ASTC_FMT(4x4),
+ ASTC_FMT(5x4),
+ ASTC_FMT(5x5),
+ ASTC_FMT(6x5),
+ ASTC_FMT(6x6),
+ ASTC_FMT(8x5),
+ ASTC_FMT(8x6),
+ ASTC_FMT(8x8),
+ ASTC_FMT(10x5),
+ ASTC_FMT(10x6),
+ ASTC_FMT(10x8),
+ ASTC_FMT(10x10),
+ ASTC_FMT(12x10),
+ ASTC_FMT(12x12),
+#undef ASTC_FMT
+};
+
+static const struct internal_format_class_info gles_astc_3d_compatible_internal_formats[] = {
+#define ASTC_FMT(size) \
+ {VIEW_CLASS_ASTC_##size##_RGBA, GL_COMPRESSED_RGBA_ASTC_##size##_OES}, \
+ {VIEW_CLASS_ASTC_##size##_RGBA, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_##size##_OES}
+
+ ASTC_FMT(3x3x3),
+ ASTC_FMT(4x3x3),
+ ASTC_FMT(4x4x3),
+ ASTC_FMT(4x4x4),
+ ASTC_FMT(5x4x4),
+ ASTC_FMT(5x5x4),
+ ASTC_FMT(5x5x5),
+ ASTC_FMT(6x5x5),
+ ASTC_FMT(6x6x5),
+ ASTC_FMT(6x6x6),
+#undef ASTC_FMT
+};
+
+GLenum
+_mesa_texture_view_lookup_view_class(const struct gl_context *ctx, GLenum internalformat)