A frame is timed at six different moments, and none of them is when it reaches the screen #1518
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot#1518
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?
Type: measurement · Area: frame metrics, in the renderer and the host · Part of: #1493
TL;DR
Every tool that reports "frame time" reads a different moment of the frame, and not from the same clock: the FPS counter and the field data read the renderer's present entry, the frame trace reads the render thread, the frame log (and so the test farm's p99) reads the return of the present call, and the game's own time step reads the host. Only PresentMon and the driver's Reflex timings get near the screen. We propose one record per game frame, stamped from one clock, that every reader takes its number from, with the shown time added where the platform gives it.
Breakdown
Evidence
Read at forge main
310e7c9df(18 Nov 2026), not run. The research pass that found this read347aa6e82. Four commits landed in between (#1235, #1486, #1487, #1209); the moments below did not change, only line numbers.vi:lines (613-617), HOS_PRESENT_TRACE (547-574)vk: status:lineat_nscolumn carries the host's clock (vk_replay.cpp:4904-4906), but the frame log's time column starts at its own first present (4948), so matching a log row to a trace row or a PresentMon row means guessing the offset.Base Nand the field summary count game frames (vk_fps.cpp:146). The frame log writes a row for every present call: made frames are presented by present_commit (vk_replay.cpp:6019-6030, called from vk_framegen.cpp:819), which ends in present_finish and so in the log.Proposed change
How we would test it
Related
New on this forge; not opened on GitHub.
Possibly related, for context:
Picking up the compatible frame-record design and a synthetic timestamp fixture. I’ll align the simulation, render, queue-present, and optional display-confirmation events by game-frame ID, preserve current consumer semantics, and coordinate the producer boundary with the existing v2 telemetry PR.
The local frame-record contract and synthetic fixture are complete. All nine game-free cases passed. The contract uses one host monotonic clock and a game-frame ID to associate simulation, submit, replay and present events. Generated outputs retain their own identities under the parent frame. Display confirmation is optional and carries the matching ID, so a stale or unavailable confirmation cannot be mistaken for the current frame's display time.
The first runtime slice proposed is an opt-in renderer-entry-to-replay diagnostic, estimated at two clock reads and one bounded publication per captured game present, with roughly 32 KiB of event storage. We still need to measure overhead and validate synchronous and threaded token transfer, overflow, disabled-path behavior, and legacy output parity. I checked the boundary against Gab’s v2 telemetry PR. The existing producer, CSV and pacing semantics remain in use.
The opt-in Windows frame-state trace is in WIP PR #1625.
On the same build, capture off produced no sidecar and all three legacy CSV headers matched capture on. The trace separated gameplay from Pause, Items and Insert within Kokiri Forest and detected the decoded title movie. Insert's open and close crossings went to
transition. Gameplay resumed after closing the menu and after loading Hyrule Field. The load window went tounknownwhere it lacked a qualifying player update.The next checks are disabled and enabled overhead against current main, Linux runtime, and an in-game load that produces a positive loading hint. The trace labels host-present intervals. Linking those intervals to renderer replay and confirmed display times remains part of this issue.