From 93dbfea72067ae82311d99b1481a1d0205a8a610 Mon Sep 17 00:00:00 2001 From: Nanley Chery Date: Tue, 12 Nov 2024 17:52:07 -0500 Subject: [PATCH] anv: Disable CCS if image bound to wrong heap on Xe2+ Avoids HIZ + CCS flushes and helps debug. Reviewed-by: Jianxun Zhang Part-of: --- src/intel/vulkan/anv_image.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index ec6496d775f..d05e60969fb 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -2788,6 +2788,7 @@ anv_bind_image_memory(struct anv_device *device, */ if (device->info->has_flat_ccs && (anv_bo_is_vram_only(bo) || + (bo->alloc_flags & ANV_BO_ALLOC_COMPRESSED) || (bo->alloc_flags & ANV_BO_ALLOC_IMPORTED))) continue; @@ -2795,8 +2796,8 @@ anv_bind_image_memory(struct anv_device *device, if (device->info->has_aux_map && anv_image_map_aux_tt(device, image, p)) continue; - /* Do nothing except for gfx12. There are no special requirements. */ - if (device->info->ver != 12) + /* No special requirements on gfx9-11. */ + if (device->info->ver <= 11) continue; /* The plane's BO cannot support CCS, disable compression on it. */