[idd] scheduler: republish after owner subscription

Consume subscription notifications from the private owner queues. When
any lane gains a subscriber, request a retained-frame publication for
the current timing owner so a static desktop cannot leave it waiting.
This commit is contained in:
Geoffrey McRae
2026-08-06 16:39:33 +10:00
parent 2ac49b6487
commit eaf8de5e1d
3 changed files with 25 additions and 0 deletions

View File

@@ -779,6 +779,21 @@ void CFrameScheduler::FrameRepublished(const Schedule& schedule,
ReleaseSRWLockExclusive(&m_lock); ReleaseSRWLockExclusive(&m_lock);
} }
void CFrameScheduler::RequestRepublish()
{
bool wake = false;
AcquireSRWLockExclusive(&m_lock);
if (m_scheduling)
{
++m_republishRequestTicket;
wake = true;
}
ReleaseSRWLockExclusive(&m_lock);
if (wake)
WakePublisher();
}
unsigned CFrameScheduler::GetSecondaryRecipients( unsigned CFrameScheduler::GetSecondaryRecipients(
const uint32_t * clientIDs, unsigned count, uint32_t frameSerial, const uint32_t * clientIDs, unsigned count, uint32_t frameSerial,
uint64_t now, uint32_t * recipients) const uint64_t now, uint32_t * recipients) const

View File

@@ -157,6 +157,7 @@ public:
uint64_t& target) const; uint64_t& target) const;
void FrameDelivered(const uint32_t * clientIDs, unsigned count, void FrameDelivered(const uint32_t * clientIDs, unsigned count,
uint32_t frameSerial, uint64_t now); uint32_t frameSerial, uint64_t now);
void RequestRepublish();
void NotifyPublisher() const { WakePublisher(); } void NotifyPublisher() const { WakePublisher(); }
void TryRecordFrameTiming(uint64_t duration); void TryRecordFrameTiming(uint64_t duration);
void LogStatistics(uint64_t now); void LogStatistics(uint64_t now);

View File

@@ -1410,6 +1410,15 @@ void CIndirectDeviceContext::LGMPTimer()
if (lgmpHostQueueNewSubs(m_frameQueue)) if (lgmpHostQueueNewSubs(m_frameQueue))
m_frameScheduler.NotifyPublisher(); m_frameScheduler.NotifyPublisher();
bool ownerSubscribed = false;
for (unsigned queueIndex = 0;
queueIndex < LGMP_Q_FRAME_LEN;
++queueIndex)
ownerSubscribed |=
lgmpHostQueueNewSubs(m_frameOwnerQueue[queueIndex]) != 0;
if (ownerSubscribed)
m_frameScheduler.RequestRepublish();
ProcessFrameDeliveries(); ProcessFrameDeliveries();
if (lgmpHostQueueNewSubs(m_pointerQueue)) if (lgmpHostQueueNewSubs(m_pointerQueue))