From bd40b057202a9e42196c4c1209920c228161d793 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Tue, 6 Aug 2019 09:10:39 +0200 Subject: [PATCH] [d3d11] Recreate swap chain immediately after synchronous present fails Fully restores pre-1.3 behaviour in case async present is disabled. Apparently this is necessary to avoid hangs on Nvidia for some reason. --- src/d3d11/d3d11_swapchain.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/d3d11/d3d11_swapchain.cpp b/src/d3d11/d3d11_swapchain.cpp index 98fb3df5710..3c5c0fcb7f1 100644 --- a/src/d3d11/d3d11_swapchain.cpp +++ b/src/d3d11/d3d11_swapchain.cpp @@ -305,6 +305,10 @@ namespace dxvk { m_device->presentImage(m_presenter, sync.present, &m_presentStatus); + + if (m_presentStatus.result != VK_NOT_READY + && m_presentStatus.result != VK_SUCCESS) + RecreateSwapChain(m_vsync); } }