diff --git a/.pick_status.json b/.pick_status.json index 78b9999346a..4d40cbb5bc5 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1525,7 +1525,7 @@ "description": "anv/image: Check DISJOINT in vkGetPhysicalDeviceImageFormatProperties2 (v2)", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": null }, diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index 6cbbc77337c..a8d847a57b4 100644 --- a/src/intel/vulkan/anv_formats.c +++ b/src/intel/vulkan/anv_formats.c @@ -923,6 +923,31 @@ anv_get_image_format_properties( } } + if (info->flags & VK_IMAGE_CREATE_DISJOINT_BIT) { + /* From the Vulkan 1.2.149 spec, VkImageCreateInfo: + * + * If format is a multi-planar format, and if imageCreateFormatFeatures + * (as defined in Image Creation Limits) does not contain + * VK_FORMAT_FEATURE_DISJOINT_BIT, then flags must not contain + * VK_IMAGE_CREATE_DISJOINT_BIT. + */ + if (format->n_planes > 1 && + !(format_feature_flags & VK_FORMAT_FEATURE_DISJOINT_BIT)) { + goto unsupported; + } + + /* From the Vulkan 1.2.149 spec, VkImageCreateInfo: + * + * If format is not a multi-planar format, and flags does not include + * VK_IMAGE_CREATE_ALIAS_BIT, flags must not contain + * VK_IMAGE_CREATE_DISJOINT_BIT. + */ + if (format->n_planes == 1 && + !(info->flags & VK_IMAGE_CREATE_ALIAS_BIT)) { + goto unsupported; + } + } + if (info->usage & VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT) { /* Nothing to check. */ }