Repository navigation
fix(menu): the presets' VRAM budgets stay within Auto's rule, and no preset sets the Profile - #2676
oscarlosu-lab wants to merge 1 commit into
Conversation
…preset sets the Profile 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 NotRexed#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 NotRexed#105 and NotRexed#106. Minimum keeps its 2.2 GB: NotRexed#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 <noreply@anthropic.com>
Joey-Magnus
left a comment
There was a problem hiding this comment.
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.
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: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_budgetkeeps 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 ispreset_exempt, so changing it no longer turns the preset to Custom.Changes
gpu/vk/vk_menu.cpp:preset_vram_budgettable,apply_presetwithouthandheld, 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, andapply_presetleaves the Profile alone.test_vram_budget_row.pyandtest_preset_exempt.pyfollow 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.