Vulkan: Before cleaning the shader managers, drain the shader compile queue.

Mainly paranoia, but might help with the mutex crash from #17364
This commit is contained in:
Henrik Rydgård committed 2023-05-02 22:05:28 +02:00
1 parent 1a2d599942
commit 97488c0a79
2 files changed
+4 -1

No files matched your search

+1 -1
View File
@@ -456,13 +456,13 @@ public:
void Invalidate(InvalidationFlags flags);
void ResetStats();
void DrainCompileQueue();
private:
void EndCurRenderStep();
void ThreadFunc();
void CompileThreadFunc();
void DrainCompileQueue();
void Run(VKRRenderThreadTask &task);
+3
View File
@@ -182,6 +182,9 @@ void GPU_Vulkan::SaveCache(const Path &filename) {
}
GPU_Vulkan::~GPU_Vulkan() {
VulkanRenderManager *rm = (VulkanRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
rm->DrainCompileQueue();
SaveCache(shaderCachePath_);
// Note: We save the cache in DeviceLost
DestroyDeviceObjects();