Skip to content

Commit

Permalink
[d3d11] Recreate swap chain immediately after synchronous present fails
Browse files Browse the repository at this point in the history
Fully restores pre-1.3 behaviour in case async present is disabled.
Apparently this is necessary to avoid hangs on Nvidia for some reason.
  • Loading branch information
doitsujin committed Aug 6, 2019
1 parent 9fdd7bf commit bd40b05
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/d3d11/d3d11_swapchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

4 comments on commit bd40b05

@SR-dude
Copy link

@SR-dude SR-dude commented on bd40b05 Aug 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has no effect on RADV, correct?

@doitsujin
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct.

@misyltoad
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably won't make a difference, but unlikely?

@doitsujin
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this kind of code? no.

Please sign in to comment.