mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-07-21 14:52:04 +00:00
[idd] avoid release frame timeouts during replug
Drop frames when the LGMP queue is full instead of blocking while holding an IddCx surface. Always finish every acquired frame, including duplicate frame numbers, so replug teardown cannot trigger the release-frame watchdog.
This commit is contained in:
@@ -923,13 +923,19 @@ void CIndirectDeviceContext::LGMPTimer()
|
||||
ResendCursor();
|
||||
}
|
||||
|
||||
bool CIndirectDeviceContext::FrameBufferAvailable() const
|
||||
{
|
||||
return m_lgmp && m_frameQueue &&
|
||||
lgmpHostQueuePending(m_frameQueue) < LGMP_Q_FRAME_LEN;
|
||||
}
|
||||
|
||||
CIndirectDeviceContext::PreparedFrameBuffer CIndirectDeviceContext::PrepareFrameBuffer(
|
||||
unsigned pitch, const D12FrameFormat& srcFormat, const D12FrameFormat& dstFormat,
|
||||
const RECT * dirtyRects, unsigned nbDirtyRects)
|
||||
{
|
||||
PreparedFrameBuffer result = {};
|
||||
|
||||
if (!m_lgmp || !m_frameQueue)
|
||||
if (!FrameBufferAvailable())
|
||||
return result;
|
||||
|
||||
if (m_width != dstFormat.desc.Width ||
|
||||
@@ -988,10 +994,6 @@ CIndirectDeviceContext::PreparedFrameBuffer CIndirectDeviceContext::PrepareFrame
|
||||
|
||||
KVMFRFrame * fi = m_frame[m_frameIndex];
|
||||
|
||||
// wait until there is room in the queue
|
||||
while (lgmpHostQueuePending(m_frameQueue) == LGMP_Q_FRAME_LEN)
|
||||
Sleep(0);
|
||||
|
||||
if (dstFormat.format == FRAME_TYPE_INVALID)
|
||||
{
|
||||
DEBUG_ERROR("Unsupported frame format, skipping frame");
|
||||
|
||||
Reference in New Issue
Block a user