Repository navigation
Preserve first-present timestamps for repeated frame tokens (FRAME-PACER-REPEATED-TOKEN-STATS) - #2037
Open
alexandersato0830 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.