GPU/Vulkan: Fix possible framebuffer destroy-while-in-use

This commit is contained in:
Connor McLaughlin 2020-12-20 16:03:28 +10:00
parent c0d8e44548
commit d5d9cb623d

View file

@ -129,13 +129,13 @@ void GPU_HW_Vulkan::UpdateSettings()
ResetGraphicsAPIState(); ResetGraphicsAPIState();
} }
if (framebuffer_changed)
CreateFramebuffer();
// Everything should be finished executing before recreating resources. // Everything should be finished executing before recreating resources.
m_host_display->ClearDisplayTexture(); m_host_display->ClearDisplayTexture();
g_vulkan_context->ExecuteCommandBuffer(true); g_vulkan_context->ExecuteCommandBuffer(true);
if (framebuffer_changed)
CreateFramebuffer();
if (shaders_changed) if (shaders_changed)
{ {
// clear it since we draw a loading screen and it's not in the correct state // clear it since we draw a loading screen and it's not in the correct state