mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-09 16:51:31 +00:00
[client/obs] scheduler: correct phase feedback
Only report the client queue lead when JIT rendering provides a valid measurement. Clamp linear phase errors instead of wrapping them into the opposite direction at half of a refresh period. Timestamp OBS frames after the shared framebuffer becomes ready.
This commit is contained in:
@@ -434,17 +434,12 @@ static void frameTimingFinishRender(const LG_RendererFrameTiming * timing,
|
||||
}
|
||||
LG_UNLOCK(l_frameTiming.lock);
|
||||
|
||||
if (feedbackFrameSerial && feedbackGeneration)
|
||||
if (g_state.jitRender && feedbackFrameSerial && feedbackGeneration &&
|
||||
feedbackQueueStart && prepareStart >= feedbackQueueStart)
|
||||
{
|
||||
uint64_t measuredPhase = timing->swapTime;
|
||||
if (g_state.jitRender)
|
||||
{
|
||||
if (!feedbackQueueStart || prepareStart < feedbackQueueStart)
|
||||
return;
|
||||
measuredPhase = prepareStart - feedbackQueueStart;
|
||||
}
|
||||
frameScheduler_feedback(
|
||||
feedbackFrameSerial, feedbackGeneration, measuredPhase);
|
||||
feedbackFrameSerial, feedbackGeneration,
|
||||
prepareStart - feedbackQueueStart);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user