You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Performance findings on a 16 GB M2 Air (Splatoon Raiders, Donkey Kong Bananza): GPU timestamps without idle gaps, and what else helped or did not #1290
Findings from bringing Splatoon Raiders (0400380020056000) and Donkey Kong Bananza (040074A01BF12000) to an M2 MacBook Air (16 GB), 2026-11-03 to 11-04. The host changes are local, not yet a PR; posting so the findings are not lost and to agree on what to upstream.
The big one: GPU timestamps without the idle gaps
Problem: a game's dynamic resolution steers by the GPU time its timestamp reports give. With gpu_timestamps segment those times included the GPU's idle gaps between a submission's segments, where the GPU waits for the host to translate and commit. SR read about 16 ms of GPU time where the GPU worked about 8, and held its view at 0.50-0.57 of full size.
Change (nvn_mtl.m, rep_ticks, seg_gaps): segment times are moved back by the gaps before them, so the time between two reports is the GPU's own work. DM_NVN_GPU_TS=segment_gaps keeps the old behaviour.
Result, played: SR's render width median 0.57 -> 0.94 of full size, a third of frames at full size; dropped frames 4 -> 35 per 300. A large visual gain, still very playable.
Side effect: the game now fills its measured budget, but the host's own GPU work after its last report (present copy, MetalFX) is not counted, so the real span settles near 18.7 ms. DM_NVN_GPU_TS_PAD=<factor> adds headroom (1.10: drops 11.5% -> 6.0%, width 1568 -> 1344 of 1920).
Reaches every game with gpu_timestamps segment (SR, Breath of the Wild); BotW not yet checked.
A scripted run that stands still hid it: SR had hardly any gaps there.
Other wins (local)
MetalFX scaler sizes in 16 px steps: scalers made 306 -> 147 per 1,000 frames, submit median 13.2 -> 7.0 ms, hitches gone.
bf_fn keyed by binary keys: instructions per draw 71k -> 47k.
Per-pool indexes of the sharing table and live descriptions: no walks over ~2,000 textures and ~100,000 serials per creation (~4% of the submit thread).
Argument slots copied when only uniform buffers changed: CPU per draw 4.88 -> 4.31 us (one comparison).
MetalFX colour for sRGB upscalers (upscaler_color srgb; upstream cee6514 derives it from the shader).
DM_PRESENT_INTERVAL=game: Bananza's speed no longer oscillates.
The first finding landed in 3304d6a0: segment timestamps leave out the GPU's idle time between a submission's command buffers, and they are the default for every game now (DM_NVN_GPU_TS=segment_gaps keeps the gaps, submission gives one time per submission). It is written against today's segment clock (heap timestamps at boundaries, commits only once the GPU has run out), so it differs from your local seg_gaps. The pad factor (DM_NVN_GPU_TS_PAD) was not taken: it is a tuning knob over host GPU work the game's span does not see, which is better found and removed. Splatoon Raiders was not rerun on main; a run on your M2 Air would tell whether the width and dropped-frame numbers hold. The other findings stay open here.
Activity
GPU timestamps per segment leave out the GPU's idle time between segm…
Merge seedds#1350 into upstream-prs: GPU timestamps per segment leave…
An argument block whose only change is what its uniform slots point a…
Timestamp reports record their segment's GPU time for every game, wit…
seedds commentedon Nov 10, 2026
The first finding landed in 3304d6a0: segment timestamps leave out the GPU's idle time between a submission's command buffers, and they are the default for every game now (
DM_NVN_GPU_TS=segment_gapskeeps the gaps,submissiongives one time per submission). It is written against today's segment clock (heap timestamps at boundaries, commits only once the GPU has run out), so it differs from your localseg_gaps. The pad factor (DM_NVN_GPU_TS_PAD) was not taken: it is a tuning knob over host GPU work the game's span does not see, which is better found and removed. Splatoon Raiders was not rerun on main; a run on your M2 Air would tell whether the width and dropped-frame numbers hold. The other findings stay open here.