tu: close submitqueues before device_finish()

Otherwise we would have already closed the device.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23533>
This commit is contained in:
Rob Clark 2023-06-08 12:59:48 -07:00 committed by Marge Bot
parent 2196fdb2cf
commit c14a13d40d

View file

@ -2390,6 +2390,13 @@ tu_DestroyDevice(VkDevice _device, const VkAllocationCallbacks *pAllocator)
tu_bo_suballocator_finish(&device->pipeline_suballoc);
tu_bo_suballocator_finish(&device->autotune_suballoc);
for (unsigned i = 0; i < TU_MAX_QUEUE_FAMILIES; i++) {
for (unsigned q = 0; q < device->queue_count[i]; q++)
tu_queue_finish(&device->queues[i][q]);
if (device->queue_count[i])
vk_free(&device->vk.alloc, device->queues[i]);
}
tu_drm_device_finish(device);
if (device->physical_device->has_set_iova)
@ -2400,13 +2407,6 @@ tu_DestroyDevice(VkDevice _device, const VkAllocationCallbacks *pAllocator)
u_vector_finish(&device->zombie_vmas);
for (unsigned i = 0; i < TU_MAX_QUEUE_FAMILIES; i++) {
for (unsigned q = 0; q < device->queue_count[i]; q++)
tu_queue_finish(&device->queues[i][q]);
if (device->queue_count[i])
vk_free(&device->vk.alloc, device->queues[i]);
}
pthread_cond_destroy(&device->timeline_cond);
_mesa_hash_table_destroy(device->bo_sizes, NULL);
vk_free(&device->vk.alloc, device->bo_list);