upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/bcpack.cpp
diff options
context:
space:
mode:
authorJan Trencansky <jan.trencansky@protonmail.com>2026-11-23 15:19:53 -0500
committerJan Trencansky <jan.trencansky@protonmail.com>2026-11-24 06:13:38 -0500
commitb464a2c529d784c952f795fef5298e7ad5f79e4f (patch)
treeafafa8d3ce267c0a47e3ab6ab5e4a4af974a1723 /runtime/src/bcpack.cpp
parent21625bca8c675c62f9dbffc318ce6a59d57faf31 (diff)
FramePacer: at most `latency` frames in flight while armed (mailbox replace)
commit_present_token and note_untokened_present appended a slot for every present, each one period after the last, so presents made with no WaitFrameEventX between them grew the queue without limit and the next wait blocked until the first of them was shown: at latency 2, 1000 blank presents left 1000 frames in flight and the next wait passed 999 periods later. A present into a full queue now replaces the newest queued frame and takes its vblank, like a mailbox: the replaced frame is never shown (no display statistic), the older frames keep their vblanks, and the queue never reaches further than `latency` vblanks ahead, so the next wait passes when the oldest frame is shown. A queue longer than a lowered latency is cut back the same way at the next present. Presents before the event is armed stay unpaced (old upstream PR 4419), and a frame behind a queued one still cannot be shown at once. frame_pacer_test: 1000 untokened presents after one wait at latency 1, 2 and 3, tokened presents beyond the latency (the older ones keep their vblanks, the replaced one has no display statistic), the one-present-per-wait cadence, and a lowered latency. xbox_present_test expected the blank present after a frame at latency 1 to make 2 frames in flight; it is 1 now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/bcpack.cpp')
0 files changed, 0 insertions, 0 deletions