diff --git a/src/d3d11/d3d11_swapchain.cpp b/src/d3d11/d3d11_swapchain.cpp index a707f7f3..9499a2b1 100644 --- a/src/d3d11/d3d11_swapchain.cpp +++ b/src/d3d11/d3d11_swapchain.cpp @@ -281,7 +281,7 @@ namespace dxvk { VkResult status = m_presenter->acquireNextImage(sync, imageIndex); - while (status != VK_SUCCESS && status != VK_SUBOPTIMAL_KHR) { + while (status != VK_SUCCESS) { RecreateSwapChain(m_vsync); if (!m_presenter->hasSwapChain()) @@ -289,6 +289,9 @@ namespace dxvk { info = m_presenter->info(); status = m_presenter->acquireNextImage(sync, imageIndex); + + if (status == VK_SUBOPTIMAL_KHR) + break; } // Resolve back buffer if it is multisampled. We diff --git a/src/d3d9/d3d9_swapchain.cpp b/src/d3d9/d3d9_swapchain.cpp index 2089e61f..fb905943 100644 --- a/src/d3d9/d3d9_swapchain.cpp +++ b/src/d3d9/d3d9_swapchain.cpp @@ -1155,14 +1155,17 @@ namespace dxvk { // NV-DXVK start: DLFG integration VkResult status = presenter->acquireNextImage(sync, imageIndex); // NV-DXVK end - - while (status != VK_SUCCESS && status != VK_SUBOPTIMAL_KHR) { + + while (status != VK_SUCCESS) { RecreateSwapChain(m_vsync); // NV-DXVK start: DLFG integration info = presenter->info(); status = presenter->acquireNextImage(sync, imageIndex); // NV-DXVK end + + if (status == VK_SUBOPTIMAL_KHR) + break; } m_context->beginRecording(