tu: fix to report device memory with heapIndex
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

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: 6d69d7e6bf ("tu: Implement VK_EXT_device_memory_report")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41974>
This commit is contained in:
Yiwei Zhang 2026-06-02 13:04:52 -07:00 committed by Marge Bot
parent 02fd326b4a
commit bff4e7e4c1

View file

@ -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