From bff4e7e4c13e294ade711397b9a609ed39823c76 Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Tue, 2 Jun 2026 13:04:52 -0700 Subject: [PATCH] tu: fix to report device memory with heapIndex The report data requires VkDeviceMemoryReportCallbackDataEXT::heapIndex instead of memory type index. Meanwhile, turnip only supports a single tu_memory_heap and doesn't have a type-to-heap mapping. So here we fix to report constant 0 for heapIndex. Fixes: 6d69d7e6bfe ("tu: Implement VK_EXT_device_memory_report") Reviewed-by: Emma Anholt Part-of: --- src/freedreno/vulkan/tu_device.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/freedreno/vulkan/tu_device.cc b/src/freedreno/vulkan/tu_device.cc index b5e12fd31cf..f7b98f87cdc 100644 --- a/src/freedreno/vulkan/tu_device.cc +++ b/src/freedreno/vulkan/tu_device.cc @@ -3532,7 +3532,7 @@ tu_memory_emit_report(struct tu_device *device, &device->vk, VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT, /* mem_obj_id */ 0, alloc_info->allocationSize, VK_OBJECT_TYPE_DEVICE_MEMORY, - /* obj_handle */ 0, alloc_info->memoryTypeIndex); + /* obj_handle */ 0, /* heap_index */ 0); return; } @@ -3549,7 +3549,7 @@ tu_memory_emit_report(struct tu_device *device, vk_emit_device_memory_report(&device->vk, type, mem->bo->unique_id, mem->bo->size, VK_OBJECT_TYPE_DEVICE_MEMORY, - (uintptr_t)(mem), mem->vk.memory_type_index); + (uintptr_t)(mem), /* heap_index */ 0); } VKAPI_ATTR VkResult VKAPI_CALL