From 39cf5b5c30883e34040e6780d710fc380e4c8f77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 24 Jan 2024 09:46:55 +0100 Subject: [PATCH] Add more asserts to check the state of the render manager --- Common/GPU/Vulkan/VulkanRenderManager.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Common/GPU/Vulkan/VulkanRenderManager.cpp b/Common/GPU/Vulkan/VulkanRenderManager.cpp index a425e46c7f..0b8f24bce4 100644 --- a/Common/GPU/Vulkan/VulkanRenderManager.cpp +++ b/Common/GPU/Vulkan/VulkanRenderManager.cpp @@ -348,6 +348,11 @@ bool VulkanRenderManager::CreateBackbuffers() { } void VulkanRenderManager::StartThreads() { + { + std::unique_lock lock(compileMutex_); + _assert_(compileQueue_.empty()); + } + runCompileThread_ = true; // For controlling the compiler thread's exit if (useRenderThread_) { @@ -403,6 +408,11 @@ void VulkanRenderManager::StopThreads() { INFO_LOG(G3D, "Vulkan compiler thread joined. Now wait for any straggling compile tasks."); CreateMultiPipelinesTask::WaitForAll(); + + { + std::unique_lock lock(compileMutex_); + _assert_(compileQueue_.empty()); + } } void VulkanRenderManager::DestroyBackbuffers() {