diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index 2ff6461cd0f..b5de46bf1ef 100644 --- a/src/intel/vulkan/anv_formats.c +++ b/src/intel/vulkan/anv_formats.c @@ -836,12 +836,20 @@ anv_get_image_format_features2(const struct anv_physical_device *physical_device */ flags &= ~VK_FORMAT_FEATURE_2_DISJOINT_BIT; - /* When the hardware accesses a storage image, it bypasses the aux - * surface. We could support storage access on images with aux - * modifiers by resolving the aux surface prior to the storage access. + /* Gfx11 and prior bypass the aux surface when accessing storage + * images. We could support storage access on images with aux + * modifiers by resolving the aux surface prior to the storage + * access. */ - flags &= ~VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT; - flags &= ~VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT; + if (devinfo->ver <= 11) + flags &= ~VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT; + + /* Starting with gfx12.5, atomics are supported with compression. + * However, the performance of this combination is slow on gfx12.5. + * So, only allow atomic support on Xe2+. + */ + if (devinfo->verx10 <= 125) + flags &= ~VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT; /* Host transfer don't touch the AUX data, so if that is required by * the modifier, just drop support on the format. diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index ed033be3b11..9b1279eb7c3 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -539,7 +539,8 @@ anv_formats_ccs_e_compatible(const struct intel_device_info *devinfo, format, vk_tiling, fmt_list)) return false; - if (vk_usage & VK_IMAGE_USAGE_STORAGE_BIT) { + if ((vk_usage & VK_IMAGE_USAGE_STORAGE_BIT) && + vk_tiling != VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT) { if (devinfo->verx10 < 125) return false;