From 17959640c3bfe96a96a600ab14b96658f6acf4d6 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Mon, 22 Aug 2022 20:30:16 +0200 Subject: [PATCH] [dxvk] Work around vkWaitSemaphore incorrectly returning with VK_TIMEOUT --- src/dxvk/dxvk_queue.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/dxvk/dxvk_queue.cpp b/src/dxvk/dxvk_queue.cpp index 02671a096..46a594ce0 100644 --- a/src/dxvk/dxvk_queue.cpp +++ b/src/dxvk/dxvk_queue.cpp @@ -104,7 +104,13 @@ namespace dxvk { waitInfo.pSemaphores = &m_semaphore; waitInfo.pValues = &semaphoreValue; - VkResult vr = vk->vkWaitSemaphores(vk->device(), &waitInfo, ~0ull); + // 32-bit winevulkan on Proton seems to be broken here + // and returns with VK_TIMEOUT, even though the timeout + // is infinite. Work around this by spinning. + VkResult vr = VK_TIMEOUT; + + while (vr == VK_TIMEOUT) + vr = vk->vkWaitSemaphores(vk->device(), &waitInfo, ~0ull); if (vr) Logger::err(str::format("Failed to synchronize with global timeline semaphore: ", vr));