mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-07-21 23:02:05 +00:00
[idd] publish frames after copy submission
Submit the D3D12 copy before exposing the frame through LGMP, preventing clients from waiting on work that has not yet been queued. Track the last published buffer separately for safe subscriber resends and handle submission failures.
This commit is contained in:
@@ -224,7 +224,8 @@ bool CSwapChainProcessor::SwapChainThreadCore()
|
||||
if (frameNumber != lastFrameNumber)
|
||||
{
|
||||
lastFrameNumber = frameNumber;
|
||||
SwapChainNewFrame(surface, dirtyRectCount, colorSpace, sdrWhiteLevel);
|
||||
if (!SwapChainNewFrame(surface, dirtyRectCount, colorSpace, sdrWhiteLevel))
|
||||
DEBUG_WARN("Failed to submit frame");
|
||||
|
||||
// report that all GPU processing for this frame has been queued
|
||||
hr = IddCxSwapChainFinishedProcessingFrame(m_hSwapChain);
|
||||
@@ -582,9 +583,10 @@ bool CSwapChainProcessor::SwapChainNewFrame(ComPtr<IDXGIResource> acquiredBuffer
|
||||
memcpy(m_dirtyRects, currentDirtyRects, nbDirtyRects * sizeof(*m_dirtyRects));
|
||||
m_nbDirtyRects = nbDirtyRects;
|
||||
|
||||
copyQueue->Execute();
|
||||
if (!copyQueue->Execute())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return m_devContext->PublishFrameBuffer(buffer.frameIndex);
|
||||
}
|
||||
|
||||
DWORD CALLBACK CSwapChainProcessor::_CursorThread(LPVOID arg)
|
||||
|
||||
Reference in New Issue
Block a user