Skip to content

Commit

Permalink
Merge branch 'nfreybler/BUGFIX__cherry_pick_swapchain_present_fix' in…
Browse files Browse the repository at this point in the history
…to 'main'

cherry pick swapchain present fix

See merge request lightspeedrtx/dxvk-remix-nv!1162
  • Loading branch information
nv-nfreybler committed Nov 15, 2024
2 parents edf9ae6 + 0f7c200 commit 6528a0b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/d3d11/d3d11_swapchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,17 @@ 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())
return DXGI_STATUS_OCCLUDED;

info = m_presenter->info();
status = m_presenter->acquireNextImage(sync, imageIndex);

if (status == VK_SUBOPTIMAL_KHR)
break;
}

// Resolve back buffer if it is multisampled. We
Expand Down
7 changes: 5 additions & 2 deletions src/d3d9/d3d9_swapchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 6528a0b

Please sign in to comment.