wsi/win32: Use app-provided timeout instead of arbitrary hardcoded value

Prevents returning spurious timeouts when the app wanted to wait
infinitely. Fixes 3DMark Wild Lands which would otherwise attempt
to render/present a buffer it didn't successfully acquire.

Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20963>
This commit is contained in:
Jesse Natalie 2023-01-27 12:06:34 -08:00 committed by Marge Bot
parent 202480a9ca
commit 0b9972953c

View file

@ -579,7 +579,7 @@ wsi_win32_acquire_next_image(struct wsi_swapchain *drv_chain,
uint32_t index = chain->dxgi->GetCurrentBackBufferIndex();
if (chain->wsi->wsi->WaitForFences(chain->base.device, 1,
&chain->base.fences[index],
false, 2000) != VK_SUCCESS)
false, info->timeout) != VK_SUCCESS)
return VK_TIMEOUT;
*image_index = index;