anv: re enable compression for CPS surfaces on platforms other than Xe

I accidentally disabled compression on CPS surfaces marked as storage or
color attachment for all platforms, when this should only be limited to
Xe.

Fixes: 80f9b6 ('anv: CPB surfaces that are used as color attachments or for stores cannot be compressed')
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34297>
This commit is contained in:
Rohan Garg 2025-03-31 15:44:50 +02:00 committed by Marge Bot
parent 4fcf2eb1d7
commit cbc1ec4f73

View file

@ -213,6 +213,7 @@ anv_image_choose_isl_surf_usage(struct anv_physical_device *device,
VkImageCompressionFlagsEXT comp_flags)
{
isl_surf_usage_flags_t isl_usage = isl_extra_usage;
const struct intel_device_info *devinfo = &device->info;
/* On platform like MTL, we choose to allocate additional CCS memory at the
* back of the VkDeviceMemory objects since different images can share the
@ -242,7 +243,9 @@ anv_image_choose_isl_surf_usage(struct anv_physical_device *device,
* compression for BLORP writes, but not for general rendering
* nor image stores.
*/
if (vk_usage & (VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_STORAGE_BIT))
if (devinfo->verx10 == 125 &&
vk_usage & (VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT |
VK_IMAGE_USAGE_STORAGE_BIT))
isl_usage |= ISL_SURF_USAGE_DISABLE_AUX_BIT;
}