Skip to content

Commit

Permalink
Add more asserts to check the state of the render manager
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Jan 24, 2024
1 parent 138890a commit 39cf5b5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Common/GPU/Vulkan/VulkanRenderManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_) {
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 39cf5b5

Please sign in to comment.