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.
This commit is contained in:
Giovanni Mascellani 2025-01-20 22:45:15 +01:00 committed by Henri Verbeet
parent 4fbfb44681
commit ed7a846e2e
Notes: Henri Verbeet 2025-01-21 14:13:31 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Giovanni Mascellani (@giomasce)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1343

View File

@ -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);