mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 19:24:12 +01:00
[d3d9,d3d11] recreate swapchain on VK_SUBOPTIMAL_KHR
The vulkan wayland wsi returns suboptimal when the window is fullscreened and not directly scanned out, and there are modifiers available that would allow the window to be directly scanned out. Recreate the swapchain if we receive suboptimal result. This allows us recreate the swapchain to use a modifier that allows direct scan-out under winewayland on wayland compositors.
This commit is contained in:
parent
c1a25df468
commit
1a1c3a4202
@ -377,7 +377,7 @@ namespace dxvk {
|
||||
|
||||
VkResult status = m_presenter->acquireNextImage(sync, imageIndex);
|
||||
|
||||
while (status != VK_SUCCESS && status != VK_SUBOPTIMAL_KHR) {
|
||||
while (status != VK_SUCCESS) {
|
||||
RecreateSwapChain();
|
||||
|
||||
if (!m_presenter->hasSwapChain())
|
||||
@ -385,6 +385,9 @@ namespace dxvk {
|
||||
|
||||
info = m_presenter->info();
|
||||
status = m_presenter->acquireNextImage(sync, imageIndex);
|
||||
|
||||
if (status == VK_SUBOPTIMAL_KHR)
|
||||
break;
|
||||
}
|
||||
|
||||
if (m_hdrMetadata && m_dirtyHdrMetadata) {
|
||||
|
@ -799,11 +799,14 @@ namespace dxvk {
|
||||
|
||||
VkResult status = m_wctx->presenter->acquireNextImage(sync, imageIndex);
|
||||
|
||||
while (status != VK_SUCCESS && status != VK_SUBOPTIMAL_KHR) {
|
||||
while (status != VK_SUCCESS) {
|
||||
RecreateSwapChain();
|
||||
|
||||
info = m_wctx->presenter->info();
|
||||
status = m_wctx->presenter->acquireNextImage(sync, imageIndex);
|
||||
|
||||
if (status == VK_SUBOPTIMAL_KHR)
|
||||
break;
|
||||
}
|
||||
|
||||
if (m_hdrMetadata && m_dirtyHdrMetadata) {
|
||||
|
Loading…
Reference in New Issue
Block a user