anv: don't uninitialize bvh_bo_pool is not initialized

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 3e8d2617e1 ("anv: use buffer pools for BVH build buffers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10009
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25802>
This commit is contained in:
Lionel Landwerlin
2023-10-19 09:46:14 +03:00
committed by Marge Bot
parent 42f53a2155
commit 9bea6e02b8

View File

@@ -3633,7 +3633,8 @@ VkResult anv_CreateDevice(
fail_general_state_pool:
anv_state_pool_finish(&device->general_state_pool);
fail_batch_bo_pool:
anv_bo_pool_finish(&device->bvh_bo_pool);
if (device->vk.enabled_extensions.KHR_acceleration_structure)
anv_bo_pool_finish(&device->bvh_bo_pool);
anv_bo_pool_finish(&device->batch_bo_pool);
anv_bo_cache_finish(&device->bo_cache);
fail_queue_cond:
@@ -3741,7 +3742,8 @@ void anv_DestroyDevice(
anv_state_pool_finish(&device->dynamic_state_pool);
anv_state_pool_finish(&device->general_state_pool);
anv_bo_pool_finish(&device->bvh_bo_pool);
if (device->vk.enabled_extensions.KHR_acceleration_structure)
anv_bo_pool_finish(&device->bvh_bo_pool);
anv_bo_pool_finish(&device->batch_bo_pool);
anv_bo_cache_finish(&device->bo_cache);