Repository navigation
Conversation
…ents, so agl's dynamic resolution stops swinging and distant detail stops flickering (issue seedds#1290) A span of timestamp reports read the gaps where the GPU waited for the host to translate the next segment (about 5-6 ms of a Mario Kart World frame on an M5), so agl's dynamic resolution saw the GPU over budget, stepped down, then back up. rep_ticks now subtracts the idle time before the report's segment (seg_gap_before). DM_NVN_GPU_TS=segment_gaps keeps the old times. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…om for a game's dynamic resolution (on seedds#1350) With gap-free segment timestamps Splatoon Raiders sees its real GPU time and fills the frame (GPU median 18.7 ms against 16.7 on a 16 GB M2 Air, docked), dropping frames. DM_NVN_GPU_TS_PAD=<factor> (1.0 to 2.0, default 1, off) stretches each report's time from the submission's first segment start, so the game lowers its resolution until the padded time fits: 1.10 leaves about 9 % of the frame for the host's own GPU work and spikes. A tuning switch, not a default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dpadr
marked this pull request as ready for review
November 6, 2026 04:19
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.
Stacked on #1350. Ready for review once #1350 is in; until then the diff shows its commit too. This branch is #1350's commit plus one commit. Review only the top commit,
cda83011.What and why
Once a game sees its real GPU time, through segment timestamps (#1130 for Splatoon Raiders) with the idle gaps left out (#1350), agl's dynamic resolution fills the frame budget exactly. The host's own GPU work and frame-to-frame spikes are not in that budget, so frames past 16.7 ms drop. On a 16 GB MacBook Air M2, docked, Splatoon Raiders' GPU median reached 18.7 ms against 16.7.
DM_NVN_GPU_TS_PAD=<factor>(1.0 to 2.0, default 1, so off) stretches each counter report's time from its submission's first segment start. The game then measures its GPU work that much longer and lowers its resolution until the padded time fits. With 1.10, the real GPU time stays about 9% under the frame.This is a tuning switch, not a default. It trades some resolution for headroom, which a Mac with plenty of GPU to spare does not need. It also stretches every timestamp a game reads, not only the ones its resolution controller uses.
Checked
make -C dm/host GAME=0400380020056000builds.test_docs.pyandtest_env_switches.pypass.0400380020056000, docked, on a 16 GB MacBook Air M2 (10-core GPU), macOS 27.0, withDM_NVN_GPU_TS=segmentandDM_NVN_GPU_TS_PAD=1.10. The host was main + PRAGMATA's opening load fits an 8 GB Mac's GPU working set: large-pool chunks retire, pools from 128 MB are chunked, and DM_NVN_TEX_MIP_SKIP #1319 + Splatoon Raiders (0400380020056000) holds its frame rate at the first boss's third stage: a submission's pending-write list holds 32,768 writes (past 8,192 it counted as writing everywhere) #1435 + GPU timestamps per segment leave out the GPU's idle time between segments (dynamic resolution flicker, issue #1290) #1350 + this commit, and the log showscounter timestamps: GPU times reported 1.10x. Over about 10,800 frames of the first level and its fights:DM_NVN_GPUPROF, GPU busy time in combat was 10.5-11.5 ms a frame (71-102 render passes). Without the pad, the game filled the frame: an 18.7 ms GPU median. The headroom is there.Presentation Thread, 350-410 ms/s, and NVN submit+present 5-6 ms), as the game's note already records for this Mac docked. The host also made 1,665 MetalFX scalers in the run as the resolution moved (DM_NVN_MFX_STEP=32).regress.py: not run. Off by default, so no game's behaviour changes unless the switch is set.Docs
docs/env_switches.tsvlists the switch🤖 Generated with Claude Code