From dcc7579273c677d2b5909591120b2105902b3002 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Sat, 12 Sep 2026 19:45:14 +0200 Subject: [PATCH] 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. --- server/driver/app_pacer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/driver/app_pacer.cpp b/server/driver/app_pacer.cpp index af8b2444..86a50c68 100644 --- a/server/driver/app_pacer.cpp +++ b/server/driver/app_pacer.cpp @@ -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;