From cbc1ec4f73483df36968dd54274f5f03a1b95851 Mon Sep 17 00:00:00 2001 From: Rohan Garg Date: Mon, 31 Mar 2025 15:44:50 +0200 Subject: [PATCH] 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 Reviewed-by: Nanley Chery Part-of: --- src/intel/vulkan/anv_image.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 34e3d5d62ee..13ad31d08c7 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -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; }