Avoid pacer immediate return when achievable

In case of discarded frames (no end frame or no layers) we don't get
called on mark_gpu_done, so times don't get updated. If the game
continues to call waitFrame, we advance the predicted display time, but
may enter the immediate return, accumulating delay.
This commit is contained in:
Patrick Nicolas
2026-09-19 17:23:52 +02:00
parent 312a7b2373
commit dcc7579273
+1 -1
View File
@@ -139,7 +139,7 @@ void app_pacer::predict(int64_t now_ns,
// Sync phase with compositor
last_display_time = compositor_display_time + period * ((period / 2 + last_display_time - compositor_display_time) / period);
if (cpu_time > period or gpu_time > period or (min_ready > last_display_time and min_ready < last_display_time + period))
if (min_ready > last_display_time and min_ready < last_display_time + period)
{
// We are limited by app time, don't wait
*out_wake_up_time = now_ns;