[idd] serialize monitor replugs with swap chain teardown
Keep the replug lifecycle gated until the old swap chain has drained and released its pending frame, and the replacement swap chain is fully initialized. Coalesce additional requests into a follow-up replug to prevent overlapping topology changes and IddCx release-frame timeout bugchecks.
This commit is contained in:
1 parent
de68e5ae97
commit
5adc22ebca
5 files changed
+108
-16
No files matched your search
@@ -78,6 +78,7 @@ void CIndirectMonitorContext::AssignSwapChain(IDDCX_SWAPCHAIN swapChain, LUID re
|
||||
break;
|
||||
}
|
||||
|
||||
m_devContext->OnSwapChainAssigned();
|
||||
std::unique_ptr<CSwapChainProcessor> processor(new CSwapChainProcessor(
|
||||
m_monitor, m_devContext, swapChain, dx11Device, dx12Device, newFrameEvent));
|
||||
|
||||
@@ -103,7 +104,11 @@ void CIndirectMonitorContext::UnassignSwapChain()
|
||||
dx12Device = std::move(m_dx12Device);
|
||||
ReleaseSRWLockExclusive(&m_lock);
|
||||
|
||||
const bool hadSwapChain = !!processor;
|
||||
processor.reset();
|
||||
dx11Device.reset();
|
||||
dx12Device.reset();
|
||||
}
|
||||
|
||||
if (hadSwapChain)
|
||||
m_devContext->OnSwapChainReleased();
|
||||
}
|
||||
Reference in new issue
Block a user