From b4f5a04223631be1925baea0d469b406f4fbd5ce Mon Sep 17 00:00:00 2001 From: Paulo Zanoni Date: Thu, 1 Aug 2024 13:43:58 -0700 Subject: [PATCH] anv: don't expose the compressed memory types when DEBUG_NO_CCS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These memory types are useless when CCS is disabled, don't leave them there so they don't confuse applications. Backport-to: 24.2 Reviewed-by: José Roberto de Souza Reviewed-by: Jianxun Zhang Signed-off-by: Paulo Zanoni Part-of: --- src/intel/vulkan/xe/anv_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/xe/anv_device.c b/src/intel/vulkan/xe/anv_device.c index 379567cd9f1..df6173a283a 100644 --- a/src/intel/vulkan/xe/anv_device.c +++ b/src/intel/vulkan/xe/anv_device.c @@ -98,7 +98,7 @@ VkResult anv_xe_physical_device_init_memory_types(struct anv_physical_device *device) { if (anv_physical_device_has_vram(device)) { - if (device->info.ver >= 20) { + if (device->info.ver >= 20 && !INTEL_DEBUG(DEBUG_NO_CCS)) { device->memory.types[device->memory.type_count++] = (struct anv_memory_type) { .propertyFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, .heapIndex = 0, @@ -148,7 +148,7 @@ anv_xe_physical_device_init_memory_types(struct anv_physical_device *device) .heapIndex = 0, }; } else { - if (device->info.ver >= 20) { + if (device->info.ver >= 20 && !INTEL_DEBUG(DEBUG_NO_CCS)) { device->memory.types[device->memory.type_count++] = (struct anv_memory_type) { .propertyFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, .heapIndex = 0,