Vulkan: Ensure all frames are written before resizing framedump buffer

Prevents destroying a framebuffer that may still be in use by a previous
frame dump.
This commit is contained in:
Stenzek 2017-04-15 20:00:40 +10:00
parent 48da42b49f
commit 3fd1e6c2f6
1 changed files with 4 additions and 0 deletions

View File

@ -959,6 +959,10 @@ bool Renderer::ResizeFrameDumpBuffer(u32 new_width, u32 new_height)
return true;
}
// Ensure all previous frames have been dumped, since we are destroying a framebuffer
// that may still be in use.
FlushFrameDump();
if (m_frame_dump_framebuffer != VK_NULL_HANDLE)
{
vkDestroyFramebuffer(g_vulkan_context->GetDevice(), m_frame_dump_framebuffer, nullptr);