[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:
Geoffrey McRae
2026-07-18 04:30:21 +10:00
parent de68e5ae97
commit 5adc22ebca
5 changed files with 108 additions and 16 deletions

View File

@@ -147,6 +147,10 @@ bool CSwapChainProcessor::SwapChainThreadCore()
m_lastShapeId = 0;
m_thread[1].Attach(CreateThread(nullptr, 0, _CursorThread, this, 0, nullptr));
// The replacement swap chain is fully initialized and no frame has been
// acquired yet, so a coalesced follow-up replug may now proceed safely.
m_devContext->OnSwapChainReady();
// postpone sending this to ensure we dont spam messages if we end up in a
// restart loop while waiting for a valid configuration
g_pipe.SetGPUStatus(m_dx11Device->IsSoftware());