From ed7a846e2ec453b8310e98aee2f43d8bb4148bbf Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Mon, 20 Jan 2025 22:45:15 +0100 Subject: [PATCH] vkd3d: Only call d3d12_fence_garbage_collect_vk_semaphores_locked() when using binary semaphores. The function is specific to binary semaphores, and will unconditionally access the "u.binary" field of struct vkd3d_signaled_semaphore. --- libs/vkd3d/command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 6c7bf167..3b75a34e 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -556,7 +556,8 @@ static void d3d12_fence_destroy_vk_objects(struct d3d12_fence *fence) fence->old_vk_fences[i] = VK_NULL_HANDLE; } - d3d12_fence_garbage_collect_vk_semaphores_locked(fence, true); + if (!device->vk_info.KHR_timeline_semaphore) + d3d12_fence_garbage_collect_vk_semaphores_locked(fence, true); VK_CALL(vkDestroySemaphore(device->vk_device, fence->timeline_semaphore, NULL)); vkd3d_mutex_unlock(&fence->mutex);