+ if (info->tiling == VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT) {
+ const VkPhysicalDeviceImageDrmFormatModifierInfoEXT *modifier_info =
+ vk_find_struct_const(info->pNext,
+ PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT);
+
+ /* Modifiers are only supported on simple 2D images */
+ if (info->type != VK_IMAGE_TYPE_2D)
+ goto unsupported;
+ maxArraySize = 1;
+ maxMipLevels = 1;
+ assert(sampleCounts == VK_SAMPLE_COUNT_1_BIT);
+
+ /* Modifiers are not yet supported for YCbCr */
+ const struct anv_format *format = anv_get_format(info->format);
+ if (format->n_planes > 1)
+ goto unsupported;
+
+ const struct isl_drm_modifier_info *isl_mod_info =
+ isl_drm_modifier_get_info(modifier_info->drmFormatModifier);
+ if (isl_mod_info->aux_usage == ISL_AUX_USAGE_CCS_E) {
+ /* If we have a CCS modifier, ensure that the format supports CCS
+ * and, if VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT is set, all of the
+ * formats in the format list are CCS compatible.
+ */
+ const VkImageFormatListCreateInfoKHR *fmt_list =
+ vk_find_struct_const(info->pNext,
+ IMAGE_FORMAT_LIST_CREATE_INFO_KHR);
+ if (!anv_formats_ccs_e_compatible(devinfo, info->flags,
+ info->format, info->tiling,
+ fmt_list))
+ goto unsupported;
+ }
+ }
+