Skip to content

Commit dbe69dc

Browse files
committed
Fix DLFG RecreateSwapchain livelock
Reset m_lastPresentStatus on DLFG recreateSwapChain - There existed a livelock in D3D9SwapChainEx::PresentImage when DLFG was enabled - If the DLFG Presenter fails to acquireNextImage, we enter a loop attempting to RecreateSwapChain - In that loop, the next call to acquireNextImage early-outs on a failed previous present status - Loop then reruns because the present status is kept as a failing - Fix: DLFG RecreateSwapchain needs to reset the present status to success to break the loop See merge request lightspeedrtx/dxvk-remix-nv!1172
2 parents a088b16 + c20df83 commit dbe69dc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/dxvk/rtx_render/rtx_dlfg.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@ namespace dxvk {
220220
if (res != VK_SUCCESS) {
221221
return res;
222222
}
223+
224+
// Reset present status since we recreated the swapchain. This ensures we try to acquire
225+
// during the next present instead of returning a stale error value.
226+
m_lastPresentStatus = VK_SUCCESS;
223227

224228
createBackbuffers();
225229
return res;

0 commit comments

Comments
 (0)