From 9bea6e02b8feed96c91701b60965621492653f58 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Thu, 19 Oct 2023 09:46:14 +0300 Subject: [PATCH] anv: don't uninitialize bvh_bo_pool is not initialized Signed-off-by: Lionel Landwerlin Fixes: 3e8d2617e1 ("anv: use buffer pools for BVH build buffers") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10009 Reviewed-by: Emma Anholt Part-of: --- src/intel/vulkan/anv_device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index edb1a3dc77f..b85d5a5cdfb 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -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);