mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-07-21 06:42:02 +00:00
[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:
@@ -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