fix(dev): dev.py ab holds the Render resolution at 67 % where the options leave it at Auto, so a GPU change shows in frames (--dynamic keeps Auto) #2066

Merged
HumanBean merged 2 commits from HumanBean/Longshot:fix/ab-fixed-render-resolution into main 2026-11-21 16:56:19 +00:00
Owner

Summary

dev.py ab gave confident verdicts on noise for any change that saves (or costs) GPU time. It pins every menu row at
its default, and the default Render resolution is Auto: the game's dynamic resolution, which sizes the 3D to the GPU's
load. A GPU saving then comes out as a larger picture, not as frames, and each run settles at a 3D size of its own.

Measured on one switch (dropping the renderer's barriers between back-to-back compute dispatches), Hyrule Field at 4K on
an RTX 3090:

  • at Auto: +6.0 %, every B run above every A run; the same comparison again: −6.5 %, every B run below every A
    run;
  • at a fixed 67 %: +1.1 %, each side's three runs within 1 %.

This PR makes dev.py ab write resolution=3 (67 %, DLSS's and FSR's Quality share) into the pinned options file when
the options leave the Render resolution at Auto, and say so in the plan it prints. A player's own fixed share
(--options with resolution=N) is kept. --dynamic keeps Auto, to see what a player on Auto gets. The Setup line
already names the resolution each run used (resolution 67% (2560x1440)).

Read first: pin_options and dynamic_resolution in scripts/devtools/ab.py.

Open perf PRs that quote dev.py ab --scene ... with the defaults (for example #2002, #2004) may want their numbers
taken again with this.

Testing

Tested: Linux (CachyOS, kernel 7.3.3), RTX 3090 (NVIDIA 620.70.06), main 9dd41326. The six-run comparisons above:
two at Auto (the defaults), one with --options holding resolution=3, which is what this change writes; plus a Market
comparison at 67 %. dev.py ab --dry-run prints the new line, dev.py ab --help lists --dynamic. The test commit
comes first: tests/test_dev_ab.py's test_pin_options and the new test_pin_options_resolution fail on main
(resolution=3 missing, pin_options takes no dynamic) and pass with the fix, per CI.

Still to test:

  • None: a developer tool; the game is unchanged.

Measurements

Nothing to measure in the game: this changes how dev.py ab sets up its runs, not the game; the spread it removes is in the Summary.

Risks

  • A comparison now runs at 67 % where it ran at the game's dynamic resolution before: numbers taken before and after
    this aren't comparable. The Setup line says which.
  • On a PC whose GPU is far from the load at 67 %, the fixed size can make a scene heavier or lighter than a player on
    Auto sees; --dynamic keeps Auto.
  • Revert the fix commit to go back.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named). (waiting for CI)
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here.
  • A check under tests/ that reads changed source is updated, not weakened.
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

https://claude.ai/code/session_017vw8dyLUnPP6CBn2bn8Gub

## Summary `dev.py ab` gave confident verdicts on noise for any change that saves (or costs) GPU time. It pins every menu row at its default, and the default Render resolution is Auto: the game's dynamic resolution, which sizes the 3D to the GPU's load. A GPU saving then comes out as a larger picture, not as frames, and each run settles at a 3D size of its own. Measured on one switch (dropping the renderer's barriers between back-to-back compute dispatches), Hyrule Field at 4K on an RTX 3090: - at Auto: **+6.0 %**, every B run above every A run; the same comparison again: **−6.5 %**, every B run below every A run; - at a fixed 67 %: **+1.1 %**, each side's three runs within 1 %. This PR makes `dev.py ab` write `resolution=3` (67 %, DLSS's and FSR's Quality share) into the pinned options file when the options leave the Render resolution at Auto, and say so in the plan it prints. A player's own fixed share (`--options` with `resolution=N`) is kept. `--dynamic` keeps Auto, to see what a player on Auto gets. The Setup line already names the resolution each run used (`resolution 67% (2560x1440)`). Read first: `pin_options` and `dynamic_resolution` in `scripts/devtools/ab.py`. Open perf PRs that quote `dev.py ab --scene ...` with the defaults (for example #2002, #2004) may want their numbers taken again with this. ## Testing **Tested:** Linux (CachyOS, kernel 7.3.3), RTX 3090 (NVIDIA 620.70.06), main 9dd41326. The six-run comparisons above: two at Auto (the defaults), one with `--options` holding `resolution=3`, which is what this change writes; plus a Market comparison at 67 %. `dev.py ab --dry-run` prints the new line, `dev.py ab --help` lists `--dynamic`. The test commit comes first: `tests/test_dev_ab.py`'s `test_pin_options` and the new `test_pin_options_resolution` fail on main (`resolution=3` missing, `pin_options` takes no `dynamic`) and pass with the fix, per CI. **Still to test:** - None: a developer tool; the game is unchanged. ## Measurements Nothing to measure in the game: this changes how `dev.py ab` sets up its runs, not the game; the spread it removes is in the Summary. ## Risks - A comparison now runs at 67 % where it ran at the game's dynamic resolution before: numbers taken before and after this aren't comparable. The Setup line says which. - On a PC whose GPU is far from the load at 67 %, the fixed size can make a scene heavier or lighter than a player on Auto sees; `--dynamic` keeps Auto. - Revert the fix commit to go back. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [ ] `mise run test` passes (any failure that also fails on `main` is named). (waiting for CI) - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here. - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017vw8dyLUnPP6CBn2bn8Gub
Fails on main: pin_options leaves resolution= out, and takes no dynamic.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyLUnPP6CBn2bn8Gub
fix(dev): dev.py ab holds the Render resolution at 67 % where the options leave it at Auto, so a GPU change shows in frames (--dynamic keeps Auto)
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 7s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 10s
CI / Workflow lint (actionlint) (pull_request) Successful in 11s
Third-party parts / As their notes say (pull_request) Successful in 12s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Website build and checks (pull_request) Successful in 2m9s
PR description / Description follows the template (pull_request_target) Failing after 4s
b6bc782165
The game's dynamic resolution (Render resolution Auto, the default) sizes the 3D to the
GPU's load: a change that saves GPU time comes out as a larger picture, and each run
settles at a size of its own. One switch, Hyrule Field at 4K on an RTX 3090, came out
+6.0 % and then -6.5 % at Auto, every run of one side past every run of the other both
times; at 67 % it was +1.1 %, each side's runs within 1 %.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dyLUnPP6CBn2bn8Gub
Author
Owner

Tested in game: Linux (CachyOS 7.3.3), RTX 3090, NVIDIA 620.70.06, main 9dd41326: dev.py ab in Hyrule Field at 4K, one switch, three interleaved pairs each: at Auto (the defaults) +6.0 % then -6.5 % on the same comparison, every run of one side past the other both times; with resolution=3 pinned (what this change writes) +1.1 %, each side within 1 %. Market at 67 % too. dev.py ab --dry-run prints the new line.

Tested in game: Linux (CachyOS 7.3.3), RTX 3090, NVIDIA 620.70.06, main 9dd41326: dev.py ab in Hyrule Field at 4K, one switch, three interleaved pairs each: at Auto (the defaults) +6.0 % then -6.5 % on the same comparison, every run of one side past the other both times; with resolution=3 pinned (what this change writes) +1.1 %, each side within 1 %. Market at 67 % too. dev.py ab --dry-run prints the new line.
Member

Possibly related, for context:

  • PR #1998 feat(dev): dev.py ab adds a hitch row, a Spread line, --threads and where the time went — Open PR also changes dev.py ab and tests; check for interactions in shared A/B script.
Possibly related, for context: - PR #1998 feat(dev): dev.py ab adds a hitch row, a Spread line, --threads and where the time went — Open PR also changes dev.py ab and tests; check for interactions in shared A/B script.
HumanBean changed title from WIP: fix(dev): dev.py ab holds the Render resolution at 67 % where the options leave it at Auto, so a GPU change shows in frames (--dynamic keeps Auto) to fix(dev): dev.py ab holds the Render resolution at 67 % where the options leave it at Auto, so a GPU change shows in frames (--dynamic keeps Auto) 2026-11-21 16:56:09 +00:00
HumanBean deleted branch fix/ab-fixed-render-resolution 2026-11-21 16:56:19 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!2066
No description provided.