vk_priority_to_gen(priority));
if (err != 0 && priority > VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT) {
result = vk_error(VK_ERROR_NOT_PERMITTED_EXT);
- goto fail_fd;
+ goto fail_vmas;
}
}
pthread_mutex_destroy(&device->mutex);
fail_context_id:
anv_gem_destroy_context(device, device->context_id);
+ fail_vmas:
+ if (physical_device->use_softpin) {
+ util_vma_heap_finish(&device->vma_hi);
+ util_vma_heap_finish(&device->vma_lo);
+ }
fail_fd:
close(device->fd);
fail_device:
anv_bo_pool_finish(&device->batch_bo_pool);
+ if (physical_device->use_softpin) {
+ util_vma_heap_finish(&device->vma_hi);
+ util_vma_heap_finish(&device->vma_lo);
+ }
+
pthread_cond_destroy(&device->queue_submit);
pthread_mutex_destroy(&device->mutex);