Skip to content

Commit

Permalink
do not invoke SK_BeginBufferSwapEx on second DXVK swapchain
Browse files Browse the repository at this point in the history
  • Loading branch information
Kethen committed Apr 23, 2024
1 parent a4e3cd9 commit c74aa65
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/render/dxgi/dxgi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,9 +425,10 @@ ImGui_DX11Startup ( IDXGISwapChain* pSwapChain )
SK_LOGi2 (L" _d3d11_rbk->init (SwapChain, %p, %p) Succeeded",
pD3D11Dev.p, pImmediateContext.p);

//SK_DXGI_UpdateSwapChain (pSwapChain);
// DXVK multi swap chain quirk workaround
SK_DXGI_UpdateSwapChain (_d3d11_rbk->_pSwapChain.p);
if (_d3d11_rbk->_pSwapChain.IsEqualObject(pSwapChain)){
SK_DXGI_UpdateSwapChain (pSwapChain);
}

return true;
}
Expand Down Expand Up @@ -2987,7 +2988,14 @@ SK_DXGI_PresentBase ( IDXGISwapChain *This,

if ( pDev != nullptr || pDev12 != nullptr )
{
SK_BeginBufferSwapEx (bWaitOnFailure);
if (_IsBackendD3D11(rb.api)){
// more DXVK double swapchain workaround
if (_d3d11_rbk->_pSwapChain.IsEqualObject(This)){
SK_BeginBufferSwapEx (bWaitOnFailure);
}
}else{
SK_BeginBufferSwapEx (bWaitOnFailure);
}
}

rb.setLatencyMarkerNV (PRESENT_START);
Expand Down

0 comments on commit c74aa65

Please sign in to comment.