Vulkan: Fix crash during shutdown if shaders are still compiling

Make sure the async shader compiler threads are stopped before the shaders are deleted
This commit is contained in:
Exzap 2024-03-11 21:55:58 +01:00
parent 40d1eaeb72
commit 1f9b89116f
2 changed files with 13 additions and 14 deletions

View file

@ -600,7 +600,7 @@ VulkanRenderer::~VulkanRenderer()
SubmitCommandBuffer();
WaitDeviceIdle();
WaitCommandBufferFinished(GetCurrentCommandBufferId());
// shut down compilation threads
// make sure compilation threads have been shut down
RendererShaderVk::Shutdown();
// shut down pipeline save thread
m_destructionRequested = true;
@ -1558,12 +1558,12 @@ void VulkanRenderer::Shutdown()
Renderer::Shutdown();
SubmitCommandBuffer();
WaitDeviceIdle();
if (m_imguiRenderPass != VK_NULL_HANDLE)
{
vkDestroyRenderPass(m_logicalDevice, m_imguiRenderPass, nullptr);
m_imguiRenderPass = VK_NULL_HANDLE;
}
RendererShaderVk::Shutdown();
}
void VulkanRenderer::UnrecoverableError(const char* errMsg) const