Diagnostics: opt-in native Graphics settings tab and menu traces #2863

Open
github-bot wants to merge 6 commits from github-bot/gh-2863 into main AGit
Owner

@⁠AwkGrep256 on GitHub · 2026-11-25 22:37 UTC · original
AwkGrep256:pc-graphics-menu-draft → main · +3913 −30 · 33 files · 6 commits · draft

Draft · Native Graphics settings on Windows

@⁠Marvisak, the first VIctory setting now works inside the game's own Settings → Graphics menu. The Upscaler row uses the native arrows and counter, saves to victory.toml, and applies on restart. It gives render scale and frame generation a place to go when those controls are ready. Related discussion #2862.

📊 What works

Status Result
✅ In game · f40ffdf8 The Graphics tab and Upscaler row have names. The arrows update the counter, the choice saves, and reopening Settings shows the saved choice.
✅ Local checks · 8dfc6b51 Clippy and tests passed, including 48 core tests. The follow-up protects the config, keeps the old choice if saving fails, and verifies that the game appended a row before using it.
🧪 Ready for a retest On 8dfc6b51, try both choices, reopen Settings, then relaunch. A successful host-upscale log on the AMD FSR choice would confirm renderer activation.
🟡 Next Show Title default / AMD FSR in place of Low / Medium. Give the blank stock rows readable labels using the row mapping from #2862.

🌍 Localization proposal

Would you like VIctory to ship its own wording for all languages the title supports? The mapping gives us enough to write an English label for each of the 76 visible stock Graphics rows. The first pass is roughly 88 short labels per language when the VIctory controls and other menu labels are included. I can put together the English list for review and use it as the source for the translations.

🧪 Try the draft

Use a Windows diagnostics build, Series X mode, title build 1.0.2.1, and a copied profile and config. Enable VICTORY_MENU_GRAPHICS=1 and VICTORY_MENU_UPSCALING_PROBE=1. Open Settings → Graphics → Upscaling and change only the VIctory Upscaler row. Applying a stock Graphics change previously caused an OOM, so please leave stock options and reset alone.

The menu and save test can run without the SDK. For host FSR after relaunch, point VICTORY_FIDELITYFX_DIR at the signed DX12 DLL folder and leave the manual upscaler and scale overrides unset.

@⁠kotekompotek, @⁠Jrjy3, and @⁠z395977743-svg, thanks for the previous review and testing. A quick check on another setup would help. Please include the commit, GPU, and whether the counter and saved choice behaved as expected.

Developer guide · Related Series X FSR work #1793 · The null placed-resource fix is a separate commit, 69e80cd1.

**@⁠AwkGrep256** on GitHub · 2026-11-25 22:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/2863) `AwkGrep256:pc-graphics-menu-draft` → `main` · +3913 −30 · 33 files · 6 commits · draft **Draft · Native Graphics settings on Windows** @⁠Marvisak, the first VIctory setting now works inside the game's own **Settings → Graphics** menu. The **Upscaler** row uses the native arrows and counter, saves to `victory.toml`, and applies on restart. It gives render scale and frame generation a place to go when those controls are ready. Related discussion #2862. ## 📊 What works | Status | Result | | --- | --- | | ✅ In game · `f40ffdf8` | The Graphics tab and Upscaler row have names. The arrows update the counter, the choice saves, and reopening Settings shows the saved choice. | | ✅ Local checks · `8dfc6b51` | Clippy and tests passed, including 48 core tests. The follow-up protects the config, keeps the old choice if saving fails, and verifies that the game appended a row before using it. | | 🧪 Ready for a retest | On `8dfc6b51`, try both choices, reopen Settings, then relaunch. A successful host-upscale log on the AMD FSR choice would confirm renderer activation. | | 🟡 Next | Show **Title default / AMD FSR** in place of **Low / Medium**. Give the blank stock rows readable labels using the [row mapping from #2862](https://git.gtahub.st/github/Marvisak--VIctory/issues/2862). | ## 🌍 Localization proposal Would you like VIctory to ship its own wording for **all languages the title supports**? The mapping gives us enough to write an English label for each of the 76 visible stock Graphics rows. The first pass is roughly **88 short labels per language** when the VIctory controls and other menu labels are included. I can put together the English list for review and use it as the source for the translations. ## 🧪 Try the draft Use a Windows diagnostics build, Series X mode, title build 1.0.2.1, and a copied profile and config. Enable `VICTORY_MENU_GRAPHICS=1` and `VICTORY_MENU_UPSCALING_PROBE=1`. Open **Settings → Graphics → Upscaling** and change only the VIctory **Upscaler** row. Applying a stock Graphics change previously caused an OOM, so please leave stock options and reset alone. The menu and save test can run without the SDK. For host FSR after relaunch, point `VICTORY_FIDELITYFX_DIR` at the signed DX12 DLL folder and leave the manual upscaler and scale overrides unset. @⁠kotekompotek, @⁠Jrjy3, and @⁠z395977743-svg, thanks for the previous review and testing. A quick check on another setup would help. Please include the commit, GPU, and whether the counter and saved choice behaved as expected. [Developer guide](https://github.com/AwkGrep256/VIctory/blob/8dfc6b51daf6f1a256b66153712323793622733b/docs/native-settings.md) · Related Series X FSR work #1793 · The null placed-resource fix is a separate commit, `69e80cd1`.
VICTORY_MENU_GRAPHICS=1 registers the title's hidden Graphics section
right after Video through its own section-registration code, on builds
whose call sites match the validated byte patterns. Unrecognized builds
are left alone.

VICTORY_MENU_ROW_TRACE=1 logs the row IDs created for Video and
Graphics. VICTORY_MENU_TRACE=1 logs section registration, controller
changes and the settings save path.

All switches are off by default. Confirming a change to a stock
Graphics option can crash the title, so the tab is for browsing only.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:16:11 +00:00
Author
Owner

@⁠AwkGrep256 on GitHub · 2026-11-25 22:55 UTC · original

Thanks for the review. One correction: the xgamesave change is also behind the switch. It only builds with the diagnostics feature and only runs with VICTORY_MENU_TRACE=1. It records what a settings save writes, compared with the blob it replaces, and adds no new API. Default runs are unchanged.

**@⁠AwkGrep256** on GitHub · 2026-11-25 22:55 UTC · [original](https://github.com/Marvisak/VIctory/pull/2863#issuecomment-7176946315) Thanks for the review. One correction: the xgamesave change is also behind the switch. It only builds with the `diagnostics` feature and only runs with `VICTORY_MENU_TRACE=1`. It records what a settings save writes, compared with the blob it replaces, and adds no new API. Default runs are unchanged.
alias_source read the resource behind a null handle and faulted at
startup (read of address 0x30). Return None for a null handle, like
host_resource does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
VIctory settings are now fieldless enums implementing `Choice`
(victory-core::settings): options, menu labels and victory.toml spelling
in one impl. From it follow the native ◀ ▶ row in Settings → Graphics,
loading at startup and saving when the player changes the value.

- settings::text: const joaat, `Text::own` rejects non-`victory_` keys
  at compile time so our labels cannot replace the title's.
- settings::choice: `Choice`, `validate()` (unique options, plain
  spellings, default among them).
- settings::file: rewrites one `[section] key` line of victory.toml,
  keeping comments and layout; replaces the file in one rename.
- menu_trace::native_list: the only unsafe part. Turns a pooled title row
  into a list row with an empty descriptor and a copy of the quality
  list's function table (refresh, enabled, publish, commit are ours).
  Commit saves the pick and posts the title's "settings changed" event so
  the counter follows. The UI context passed to publish lives on the
  caller's stack and is never kept.
- menu_trace::settings_list / upscaling: the settings as rows, the
  Upscaling section built from them.
- The hidden Graphics tab is named: a tab shows its screen ID's text.
- The menu text scan reads through read_memory, so a region the title
  decommits mid-scan is skipped instead of faulting.

Behind VICTORY_MENU_GRAPHICS and VICTORY_MENU_UPSCALING_PROBE. How to add
or tweak a setting: docs/native-settings.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
From review:
- Saving parses the edited victory.toml and refuses unless only the one
  key changed (inline tables and dotted keys are refused, not mangled);
  unique temp file, removed if the replace fails.
- A pick is saved before it becomes the choice: a failed save keeps the
  old choice and can be retried.
- The config path is made absolute at load (the title can change the
  working directory).
- Native list rows check that the commit-side table is the primary
  table's slot 10 and that what they read lies in the image; unaligned
  reads.
- A row is adopted only if the helper appended exactly one, non-null row.
- One registry of list settings for loading and for the section's rows.
- Docs: the `victory_` prefix is a naming rule, not collision-proof;
  upscaling.rs also touches title memory.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

@⁠kotekompotek on GitHub · 2026-11-25 22:52 UTC · original · reviewed

Scoped review: +1500 but almost all additive — new opt-in menu_trace/settings_trace modules plus plumbing, flag-gated behind a diagnostics switch, so it can't affect a default run. The xgamesave extension (listing container contents) is the only behavioral surface outside the flag; reads like an additive query API. Worth a maintainer pass on the trace-format stability, but the risk profile is low.

**@⁠kotekompotek** on GitHub · 2026-11-25 22:52 UTC · [original](https://github.com/Marvisak/VIctory/pull/2863#pullrequestreview-6066084018) · **reviewed** Scoped review: +1500 but almost all additive — new opt-in menu_trace/settings_trace modules plus plumbing, flag-gated behind a diagnostics switch, so it can't affect a default run. The xgamesave extension (listing container contents) is the only behavioral surface outside the flag; reads like an additive query API. Worth a maintainer pass on the trace-format stability, but the risk profile is low.
Author
Owner

@⁠AwkGrep256 on GitHub · 2026-11-26 18:32 UTC · original

Belobug/VIctory-Belobug-AMD#274 tracks a test port of the native Graphics settings on Belobug’s current AMD fork. It links back here and has the menu, FSR and frame-generation test matrix. The upstream menu’s working save flow is the starting point. Fork gameplay results will go on Belobug/VIctory-Belobug-AMD#118 with the exact tested build.

**@⁠AwkGrep256** on GitHub · 2026-11-26 18:32 UTC · [original](https://github.com/Marvisak/VIctory/pull/2863#issuecomment-7200583546) Belobug/VIctory-Belobug-AMD#274 tracks a test port of the native Graphics settings on Belobug’s current AMD fork. It links back here and has the menu, FSR and frame-generation test matrix. The upstream menu’s working save flow is the starting point. Fork gameplay results will go on Belobug/VIctory-Belobug-AMD#118 with the exact tested build.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2863/head:github-bot/gh-2863'
git switch 'github-bot/gh-2863'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2863'
git switch 'github-bot/gh-2863'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2863'
git switch 'github-bot/gh-2863'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2863'
git switch 'main'
git merge --squash 'github-bot/gh-2863'
git switch 'main'
git merge --ff-only 'github-bot/gh-2863'
git switch 'main'
git merge 'github-bot/gh-2863'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
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
github/Marvisak--VIctory!2863
No description provided.