[idd] capture: replay only completed frames

Track the newest submitted and completed frame independently. Only
retain or replay a frame after its copy callback succeeds.

Keep the prior completed frame when a newer copy fails, and compare
publication sequences so out-of-order callbacks cannot move backward.
This commit is contained in:
Geoffrey McRae
2026-08-06 14:02:39 +10:00
parent 160c5fd1fa
commit f6c72b0bc5
3 changed files with 42 additions and 18 deletions

View File

@@ -744,7 +744,7 @@ void CSwapChainProcessor::CompletionFunction(
sc->m_devContext->RecordFrameTiming(readyEnd - publishStart);
sc->m_devContext->SetFrameTiming(fbRes->GetFrameIndex(),
fbRes->GetCaptureTime(), postProcessTime, copyTime, readyTime);
sc->m_devContext->CompleteFrameBuffer(fbRes->GetFrameIndex());
sc->m_devContext->CompleteFrameBuffer(fbRes->GetFrameIndex(), true);
sc->ReleaseCandidate(candidateIndex);
}