+ /* From the KHR_texture_compression_astc_hdr spec:
+ *
+ * Add a second new column "3D Tex." which is empty for all non-ASTC
+ * formats. If only the LDR profile is supported by the
+ * implementation, this column is also empty for all ASTC formats. If
+ * both the LDR and HDR profiles are supported only, this column is
+ * checked for all ASTC formats.
+ *
+ * Add a third new column "Cube Map Array Tex." which is empty for all
+ * non-ASTC formats, and checked for all ASTC formats.
+ *
+ * and,
+ *
+ * 'An INVALID_OPERATION error is generated by CompressedTexImage3D
+ * if <internalformat> is TEXTURE_CUBE_MAP_ARRAY and the
+ * "Cube Map Array" column of table 8.19 is *not* checked, or if
+ * <internalformat> is TEXTURE_3D and the "3D Tex." column of table
+ * 8.19 is *not* checked'
+ *
+ * The instances of <internalformat> above should say <target>.
+ */
+
+ /* Throw an INVALID_OPERATION error if the target is
+ * TEXTURE_CUBE_MAP_ARRAY and the format is not ASTC.
+ */
+ if (target_can_be_compresed &&
+ ctx->Extensions.KHR_texture_compression_astc_ldr &&
+ layout != MESA_FORMAT_LAYOUT_ASTC)