Add more asserts to check the state of the render manager

This commit is contained in:
Henrik Rydgård committed 2024-01-24 09:46:55 +01:00
1 parent 138890a014
commit 39cf5b5c30
1 file changed
+10
+10
View File
@@ -348,6 +348,11 @@ bool VulkanRenderManager::CreateBackbuffers() {
}
void VulkanRenderManager::StartThreads() {
{
std::unique_lock<std::mutex> 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<std::mutex> lock(compileMutex_);
_assert_(compileQueue_.empty());
}
}
void VulkanRenderManager::DestroyBackbuffers() {