From ba446eaed33e26836dcfd73ae94bbc2e87b284c8 Mon Sep 17 00:00:00 2001 From: Tanner Van De Walle Date: Thu, 25 Sep 2025 17:06:59 -0700 Subject: [PATCH] Don't add wait to queue when the queue is the one owned by the command list manager Fixes #51 --- src/device.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/device.cpp b/src/device.cpp index eff38ff..d63d07e 100644 --- a/src/device.cpp +++ b/src/device.cpp @@ -1163,6 +1163,11 @@ namespace D3D11On12 auto* pCommandListManager = ImmCtx.GetCommandListManager(static_cast(i)); if (pCommandListManager) { + if(pCommandListManager->GetCommandQueue() == pCommmandQueue) + { + // Don't wait on the queue owned by the command list manager. This would cause a wait to be placed before the signal, causing a deadlock. + continue; + } UINT64 WaitValue = pResource->m_LastUsedCommandListID[i]; if (WaitValue > pCommandListManager->GetCompletedFenceValue())