mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-21 23:11:38 +00:00
If present returns OUT_OF_DATE, force repaint in CheckResizeOutputWindow
This commit is contained in:
@@ -35,8 +35,6 @@ VulkanReplay::OutputWindow::OutputWindow()
|
||||
|
||||
WINDOW_HANDLE_INIT;
|
||||
|
||||
fresh = true;
|
||||
|
||||
hasDepth = false;
|
||||
|
||||
failures = recreatePause = 0;
|
||||
@@ -802,6 +800,14 @@ bool VulkanReplay::CheckResizeOutputWindow(uint64_t id)
|
||||
outw.Create(m_pDriver, m_pDriver->GetDev(), outw.hasDepth);
|
||||
else
|
||||
outw.recreatePause--;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if(outw.outofdate)
|
||||
{
|
||||
outw.outofdate = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -1156,22 +1162,15 @@ void VulkanReplay::FlipOutputWindow(uint64_t id)
|
||||
|
||||
VkResult retvkr = vt->QueuePresentKHR(Unwrap(m_pDriver->GetQ()), &presentInfo);
|
||||
|
||||
m_pDriver->FlushQ();
|
||||
|
||||
if(retvkr == VK_ERROR_OUT_OF_DATE_KHR)
|
||||
{
|
||||
// force a swapchain recreate.
|
||||
outw.width = 0;
|
||||
outw.height = 0;
|
||||
// this will check the current extent and use that if possible
|
||||
outw.Create(m_pDriver, m_pDriver->GetDev(), outw.hasDepth);
|
||||
|
||||
CheckResizeOutputWindow(id);
|
||||
|
||||
// skip this present
|
||||
retvkr = vkr = VK_SUCCESS;
|
||||
outw.outofdate = true;
|
||||
}
|
||||
|
||||
RDCASSERTEQUAL(vkr, VK_SUCCESS);
|
||||
RDCASSERTEQUAL(retvkr, VK_SUCCESS);
|
||||
|
||||
m_pDriver->FlushQ();
|
||||
}
|
||||
|
||||
void VulkanReplay::DestroyOutputWindow(uint64_t id)
|
||||
|
||||
@@ -423,7 +423,8 @@ private:
|
||||
|
||||
WINDOW_HANDLE_DECL;
|
||||
|
||||
bool fresh;
|
||||
bool fresh = true;
|
||||
bool outofdate = false;
|
||||
|
||||
uint32_t width, height;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user