From d5d9cb623d56b597b4f1c69cb1afe86004b0f2d6 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 20 Dec 2020 16:03:28 +1000 Subject: [PATCH] GPU/Vulkan: Fix possible framebuffer destroy-while-in-use --- src/core/gpu_hw_vulkan.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/gpu_hw_vulkan.cpp b/src/core/gpu_hw_vulkan.cpp index 7f94a6b6c..a3afec1c0 100644 --- a/src/core/gpu_hw_vulkan.cpp +++ b/src/core/gpu_hw_vulkan.cpp @@ -129,13 +129,13 @@ void GPU_HW_Vulkan::UpdateSettings() ResetGraphicsAPIState(); } - if (framebuffer_changed) - CreateFramebuffer(); - // Everything should be finished executing before recreating resources. m_host_display->ClearDisplayTexture(); g_vulkan_context->ExecuteCommandBuffer(true); + if (framebuffer_changed) + CreateFramebuffer(); + if (shaders_changed) { // clear it since we draw a loading screen and it's not in the correct state