From eacf5b781d536a22497b31fec59b9e4b8c1fd8a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tur=C3=A1nszki=20J=C3=A1nos?= Date: Sat, 7 Feb 2026 14:44:40 +0100 Subject: [PATCH] fix for mutex deadlock in ClearPipelineStateCache after recent changes --- WickedEngine/wiGraphicsDevice_DX12.cpp | 3 --- WickedEngine/wiGraphicsDevice_Vulkan.cpp | 3 --- 2 files changed, 6 deletions(-) diff --git a/WickedEngine/wiGraphicsDevice_DX12.cpp b/WickedEngine/wiGraphicsDevice_DX12.cpp index f85350725..ba724ddaa 100644 --- a/WickedEngine/wiGraphicsDevice_DX12.cpp +++ b/WickedEngine/wiGraphicsDevice_DX12.cpp @@ -5701,15 +5701,12 @@ std::mutex queue_locker; void GraphicsDevice_DX12::ClearPipelineStateCache() { - allocationhandler->destroylocker.lock(); - pipelines_global.clear(); for (auto& x : commandlists) { x->pipelines_worker.clear(); } - allocationhandler->destroylocker.unlock(); } Texture GraphicsDevice_DX12::GetBackBuffer(const SwapChain* swapchain) const diff --git a/WickedEngine/wiGraphicsDevice_Vulkan.cpp b/WickedEngine/wiGraphicsDevice_Vulkan.cpp index 2b20f27e1..501dc6d47 100644 --- a/WickedEngine/wiGraphicsDevice_Vulkan.cpp +++ b/WickedEngine/wiGraphicsDevice_Vulkan.cpp @@ -6795,8 +6795,6 @@ using namespace vulkan_internal; } void GraphicsDevice_Vulkan::ClearPipelineStateCache() { - allocationhandler->destroylocker.lock(); - layout_locker.lock(); pso_layouts.clear(); layout_locker.unlock(); @@ -6807,7 +6805,6 @@ using namespace vulkan_internal; { x->pipelines_worker.clear(); } - allocationhandler->destroylocker.unlock(); if (pipelineCache != VK_NULL_HANDLE) {