anv: don't forget to destroy device->vma_mutex

This actually doesn't fix any bugs or leaks, because according to the
man page:

  "In the LinuxThreads implementation, no resources are associated
   with mutex objects, thus pthread_mutex_destroy actually does
   nothing except checking that the mutex is unlocked.

still, it's better to have it than not to have it, especially since
other implementations may do something.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26036>
This commit is contained in:
Paulo Zanoni 2023-09-21 13:40:24 -07:00 committed by Marge Bot
parent 0a072bb31c
commit e1b50074fe

View file

@ -3674,6 +3674,7 @@ VkResult anv_CreateDevice(
util_vma_heap_finish(&device->vma_hi);
util_vma_heap_finish(&device->vma_cva);
util_vma_heap_finish(&device->vma_lo);
pthread_mutex_destroy(&device->vma_mutex);
fail_queues:
for (uint32_t i = 0; i < device->queue_count; i++)
anv_queue_finish(&device->queues[i]);
@ -3785,6 +3786,7 @@ void anv_DestroyDevice(
util_vma_heap_finish(&device->vma_hi);
util_vma_heap_finish(&device->vma_cva);
util_vma_heap_finish(&device->vma_lo);
pthread_mutex_destroy(&device->vma_mutex);
pthread_cond_destroy(&device->queue_submit);
pthread_mutex_destroy(&device->mutex);