mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:30:53 +01:00
[PR #2037] Preserve first-present timestamps for repeated frame tokens (FRAME-PACER-REPEATED-TOKEN-STATS) #2041
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2041
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2037
Author: @alexandersato0830
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:codex/frame-pacer-repeated-token-stats📝 Commits (1)
ac2fff2Preserve first-present timestamps for repeated frame tokens📊 Changes
2 files changed (+50 additions, -13 deletions)
View changed files
📝
runtime/src/frame_pacer.h(+18 -13)📝
runtime/test/frame_pacer_test.cpp(+32 -0)📄 Description
Claimed in the coordination issue as: FRAME-PACER-REPEATED-TOKEN-STATS
Depends on: #1198 (overlapping FramePacer record lookup). This fix is based on
main. The two changes can land in either order, with the later one resolving the overlap.What and why
PresentX accepts repeat tokens so a repeat does not stall presentation. Repeating a token after its first frame displayed currently overwrites
present_uswhile leaving the first frame'sdisplay_us.GetFrameStatisticsXcan then report a display before the present.Keep the first present and its display together in the token record. Repeat frames still enter the pacing queue and count toward the frame summary. Reuse the lookup already performed for timing samples.
Tested
73cc1a2baafter the second present overwrites the first timestamp. It checks both timestamps before and after the repeat retires, then checks an uncapped repeat.frame_pacer_testwith MSVC 19.51 on Windows 11 and ran the CMakeframe_pacertest in RelWithDebInfo. All cases passed.git diff --checkand the source-only check passed.GPUs tested: n/a (fake clock, CPU-only)
AI-assisted: yes (Codex)
Checklist
main.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.