tu: Disable storage image support for depth/stencil.

Fixes failures in the new CTS tests like
dEQP-VK.image.store.without_format.2d.x8_d24_unorm_pack32.
This commit is contained in:
Emma Anholt 2026-04-28 12:30:44 -07:00
parent 93380ac48a
commit 08f7c9e777

View file

@ -232,11 +232,18 @@ tu_physical_device_get_format_properties(
if (supported_color) {
assert(supported_tex);
optimal |= VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT |
VK_FORMAT_FEATURE_2_BLIT_DST_BIT |
VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT |
VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT |
VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT;
optimal |= VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT | VK_FORMAT_FEATURE_2_BLIT_DST_BIT;
/* "Compatibility Between SPIR-V Image Formats and Vulkan Formats" doesn't
* map any SPIR-V image formats formats to Vulkan depth/stencil formats,
* except for "Unknown" which maps to anything with the feature flags set.
* Don't bother supporting that unformatted z/s access, either, since
* x8_d24 fails and it seems like an unintended corner of the spec.
*/
if (!util_format_has_depth(desc) && !util_format_has_stencil(desc)) {
optimal |= VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT | VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT |
VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT;
}
buffer |= VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT |
VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT |