fix(menu): the presets' VRAM budgets stay within Auto's rule, and no preset sets the Profile #2676

Open
github-sync wants to merge 1 commit from github/pr/2676 into main
Owner

@oscarlosu-lab opened this pull request on GitHub · 2026-11-12 05:49 UTC · original

The Quality presets set texture budgets past what the renderer's own Auto rule gives the card each is named for, so a player who picks the preset for their card gets more texture memory than the card holds beside the game's other ~3.5-3.8 GB. This brings the presets' budgets inside that rule and stops Minimum and Low from switching the Profile to handheld.

Why

texture_frame (gpu/vk/vk_texture.cpp) sizes Auto from what the driver allows: 45% on cards of 8 GB or less, 70% above, at most 6 GB. Each number cites a field case in its comment. The presets' budgets did not follow it:

Preset Was Auto on that card Now
Minimum (4GB) 2.2 GB ~1.5 GB 2.2 GB (kept: #1358 measured Auto's 1.5 GB too small for Kokiri Forest on an RX 5500M; 2.4 GB played at 30 fps and resumed from a pause at 60, 1.5 GB at 26 fps and 8.6 after the pause)
Low (6GB) 3.6 GB ~2.5 GB 3.6 GB (the 75% clamp already cuts it to ~3.5 GB on a 6 GB card)
Balanced (8GB) 4.8 GB ~3.3 GB 3.6 GB (4.8 GB plus the rest is the 5.1 GB that paged an RTX 3060 Ti and #1400's RTX 4050: 13 to 55 ms a frame)
High (12GB) 7.5 GB 6 GB (cap) 6 GB
Ultra (16GB+) 11 GB 6 GB (cap) 6 GB (11 GB on a 16 GB card is the fill-up of #105 and #106 that the cap was made for)

Each preset now takes the VRAM budget row's stop nearest above Auto's rule; the row's own stops are unchanged, so a saved vram_budget keeps its meaning and a player can still pick 7.5 or 11 GB on the row.

Profile

Minimum and Low also set the handheld Profile. That profile gave a GTX 1050 a black picture, which is why the first start (menu_first_start_for_gpu) already keeps docked while choosing those presets; the menu's own choice now agrees. The Profile row is preset_exempt, so changing it no longer turns the preset to Custom.

Changes

  • gpu/vk/vk_menu.cpp: preset_vram_budget table, apply_preset without handheld, the Profile row exempt, the VRAM budget and preset hints say what each gives.
  • gpu/vk/menu_i18n.h: the changed texts in the 13 languages, tables kept sorted.
  • readme.md: the preset and VRAM budget rows.
  • tests/test_preset_budget_caps.py (new): every preset's budget is at most Auto's 6 GB cap, Balanced at most the 45% rule's stop, Minimum 2.2 GB, and apply_preset leaves the Profile alone. test_vram_budget_row.py and test_preset_exempt.py follow the change.

Checks

python -I -B tests/run_all.py preset vram budget exempt menu framegen sections run_all_declarations utf8 i18n → 31 passed, 0 failed, 2 skipped (Windows, llvm-mingw clang++). Not run in the game yet: an RTX 3060 12 GB A/B (High 7.5 GB vs 6 GB, same spot) will be added when done.

> [@oscarlosu-lab](https://github.com/oscarlosu-lab) opened this pull request on GitHub · 2026-11-12 05:49 UTC · [original](https://github.com/NotRexed/Hookshot/pull/2676) The Quality presets set texture budgets past what the renderer's own Auto rule gives the card each is named for, so a player who picks the preset for their card gets more texture memory than the card holds beside the game's other ~3.5-3.8 GB. This brings the presets' budgets inside that rule and stops Minimum and Low from switching the Profile to handheld. ### Why `texture_frame` (gpu/vk/vk_texture.cpp) sizes Auto from what the driver allows: 45% on cards of 8 GB or less, 70% above, at most 6 GB. Each number cites a field case in its comment. The presets' budgets did not follow it: | Preset | Was | Auto on that card | Now | |---|---|---|---| | Minimum (4GB) | 2.2 GB | ~1.5 GB | **2.2 GB** (kept: #1358 measured Auto's 1.5 GB too small for Kokiri Forest on an RX 5500M; 2.4 GB played at 30 fps and resumed from a pause at 60, 1.5 GB at 26 fps and 8.6 after the pause) | | Low (6GB) | 3.6 GB | ~2.5 GB | 3.6 GB (the 75% clamp already cuts it to ~3.5 GB on a 6 GB card) | | Balanced (8GB) | 4.8 GB | ~3.3 GB | **3.6 GB** (4.8 GB plus the rest is the 5.1 GB that paged an RTX 3060 Ti and #1400's RTX 4050: 13 to 55 ms a frame) | | High (12GB) | 7.5 GB | 6 GB (cap) | **6 GB** | | Ultra (16GB+) | 11 GB | 6 GB (cap) | **6 GB** (11 GB on a 16 GB card is the fill-up of #105 and #106 that the cap was made for) | Each preset now takes the VRAM budget row's stop nearest above Auto's rule; the row's own stops are unchanged, so a saved `vram_budget` keeps its meaning and a player can still pick 7.5 or 11 GB on the row. ### Profile Minimum and Low also set the handheld Profile. That profile gave a GTX 1050 a black picture, which is why the first start (`menu_first_start_for_gpu`) already keeps docked while choosing those presets; the menu's own choice now agrees. The Profile row is `preset_exempt`, so changing it no longer turns the preset to Custom. ### Changes - `gpu/vk/vk_menu.cpp`: `preset_vram_budget` table, `apply_preset` without `handheld`, the Profile row exempt, the VRAM budget and preset hints say what each gives. - `gpu/vk/menu_i18n.h`: the changed texts in the 13 languages, tables kept sorted. - `readme.md`: the preset and VRAM budget rows. - `tests/test_preset_budget_caps.py` (new): every preset's budget is at most Auto's 6 GB cap, Balanced at most the 45% rule's stop, Minimum 2.2 GB, and `apply_preset` leaves the Profile alone. `test_vram_budget_row.py` and `test_preset_exempt.py` follow the change. ### Checks `python -I -B tests/run_all.py preset vram budget exempt menu framegen sections run_all_declarations utf8 i18n` → 31 passed, 0 failed, 2 skipped (Windows, llvm-mingw clang++). Not run in the game yet: an RTX 3060 12 GB A/B (High 7.5 GB vs 6 GB, same spot) will be added when done. <!-- github-sync:item:2676 -->
The Quality presets set texture budgets past what the renderer's own Auto rule gives the card each is named for
(vk_texture.cpp texture_frame: 45% of what the driver allows on 8 GB or less, 70% above, at most 6 GB): Balanced's
4.8 GB on an 8 GB card is the 5.1 GB that paged an RTX 3060 Ti and #1400's RTX 4050 (13 to 55 ms a frame), High's
7.5 GB is past the 6 GB cap, and Ultra's 11 GB on a 16 GB card is the fill-up of #105 and #106. Minimum keeps its
2.2 GB: #1358 measured Auto's 1.5 GB too small for Kokiri Forest on a 4 GB card.

- preset_vram_budget: Minimum 2.2 GB, Low and Balanced 3.6 GB, High and Ultra 6 GB, each the VRAM budget row's stop
  nearest above Auto's rule. The row's own stops are unchanged, so saved files keep their meaning.
- Minimum and Low no longer set the handheld Profile: it gave a GTX 1050 a black picture, which is why the first start
  already kept docked (menu_first_start_for_gpu); now the menu's own choice agrees. The Profile row is preset_exempt.
- The hints say what each stop and preset gives; menu_i18n.h carries the changed texts in the 13 languages, sorted.
- tests/test_preset_budget_caps.py checks the table against the rule and that apply_preset leaves the Profile alone;
  test_vram_budget_row and test_preset_exempt follow the change.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Author
Owner

@Joey-Magnus reviewed on GitHub · 2026-11-12 14:34 UTC · original

I merged this into current main and ran run_all.py preset vram budget exempt menu i18n: 26 passed, 1 skipped for Vulkan headers. CI is green. The code does what it says. preset_vram_budget (gpu/vk/vk_menu.cpp:621) maps Low and Balanced to 3.6 GB and High and Ultra to 6 GB. A saved vram_budget is still read as is (only a file without the row derives it from the preset), so existing players keep their value. Making the Profile row preset_exempt (:818) is consistent with no preset setting it any more, and the first-start path already forced docked.

This changes what players get when they pick High (7.5 to 6 GB), Ultra (11 to 6 GB) or Balanced (4.8 to 3.6 GB), so I think a maintainer should sign off on it. The cases cited (#105/#106, #1400, the 3060 Ti) support the lower numbers on cards that paged. But nothing here measures the cost on a 12 or 16 GB card that was fine at 7.5 or 11 GB, for example more texture streaming or pop-in. The promised RTX 3060 12 GB A/B (frame times and the texture budget log lines at the same spot) would settle it. Dropping the handheld profile from Minimum and Low looks right on its own, given the GTX 1050 black picture.

> [@Joey-Magnus](https://github.com/Joey-Magnus) reviewed on GitHub · 2026-11-12 14:34 UTC · [original](https://github.com/NotRexed/Hookshot/pull/2676#pullrequestreview-5876230159) I merged this into current main and ran `run_all.py preset vram budget exempt menu i18n`: 26 passed, 1 skipped for Vulkan headers. CI is green. The code does what it says. `preset_vram_budget` (gpu/vk/vk_menu.cpp:621) maps Low and Balanced to 3.6 GB and High and Ultra to 6 GB. A saved `vram_budget` is still read as is (only a file without the row derives it from the preset), so existing players keep their value. Making the Profile row `preset_exempt` (:818) is consistent with no preset setting it any more, and the first-start path already forced docked. This changes what players get when they pick High (7.5 to 6 GB), Ultra (11 to 6 GB) or Balanced (4.8 to 3.6 GB), so I think a maintainer should sign off on it. The cases cited (#105/#106, #1400, the 3060 Ti) support the lower numbers on cards that paged. But nothing here measures the cost on a 12 or 16 GB card that was fine at 7.5 or 11 GB, for example more texture streaming or pop-in. The promised RTX 3060 12 GB A/B (frame times and the texture budget log lines at the same spot) would settle it. Dropping the handheld profile from Minimum and Low looks right on its own, given the GTX 1050 black picture. <!-- github-sync:r:5876230159 -->
Commenting is not possible because the repository is archived.
No description provided.