VIctory Studio: a window inside victory.exe (library, shader preload, live switches, sessions) #2653

Open
github-bot wants to merge 12 commits from github-bot/gh-2653 into main AGit
Owner

@⁠Anorak-314 on GitHub · 2026-11-29 15:35 UTC · original
Anorak-314:studio → main · +4307 −155 · 13 files · 8 commits · open

What it changes

victory.exe gets a window: victory studio (or victory --gui) opens VIctory Studio. A start without either does exactly what it did (a double-click still plays), so nothing that exists changes its behaviour.

Four commits on top of #1988 and #2201 (the present queue, its trace and the pacer, which the Live page reads and sets; until those merge, their commits show in this diff too):

1. Live switches: every toggled! / asked_for! switch follows the VICTORY_HOT_AB file

#1619 gave the mechanism (a file of VICTORY_NAME=value lines, read again when it changes) for the switches that ask hot::over at their use. This makes both switch macros ask the file first, plus VICTORY_PACE and VICTORY_PIPELINE_WAIT_MS. Each switch keeps what it last read and asks again only when the file has been read anew (hot::flag, a generation count), so a check stays one atomic load. Asking the table under its lock at every check cost about 3 frames a second in 32 here, which is why the cache is there. With VICTORY_HOT_AB unset, a check is one load of ACTIVE more than before.

2. VIctory Studio (apps/victory-studio, egui/eframe, linked into victory.exe)

  • Library: titles with cover art and name read from the dump's own MicrosoftGame.Config (nothing shipped, nothing downloaded), profiles of arguments and switches per title, an optional launcher script, and a shader preload before play (victory preload, with its progress; it runs with the chosen profile's own layer and variables, and is remembered for each profile with the executable and the driver version, so it is offered again when any of them changes: shaders are translated differently under some variables, and a preload made without them left the title making pipelines while it played).
  • Live: frame rate, frame times (from VICTORY_PRESENT_TRACE), the card's load and memory (nvidia-smi, when present), and the switches that can change while the title runs, written to the VICTORY_HOT_AB file Studio sets up for the run.
  • Sessions: each run's numbers kept (frame rate, 1 % low, median and 95th-percentile frame time, the count of frames over 50, 100 and 300 ms) for comparing runs.
  • Logs: the layer's log (VICTORY_LOG_FILE), with a filter for warnings and errors.
  • For scripts: victory studio --play, --page live|sessions|logs, --set VICTORY_NAME=value, --preload.
  • Files live in %LOCALAPPDATA%\VIctory\studio. The README's quick start has a short section on it.

How it was tested

  • GPU and profile: RTX 5090, driver 621.40, Series X profile, 3840x2160, DLAA, no frame generation, no ray tracing.
  • This branch's build, started as victory studio --play --page live --set VICTORY_PIPELINE_WAIT_MS=100: the title started from Studio and the log shows hot-ab: following ...\live.txt and segment 1 starts: VICTORY_PIPELINE_WAIT_MS=100 (frame 1). The file was then changed while the title ran: segment 2 starts: VICTORY_PIPELINE_WAIT_MS=100 VICTORY_SUBMIT_SPLIT=0 (frame 37346), the run went on, and after the title was closed the session was kept (51,968 traced frames).
  • Cost of the switches following the file, measured on the same change in my working branch (native 3840x2160, same scene): 32.0 fps with the file followed, 32.3 without.
  • Same Studio code in my working branch: a start without arguments plays as before; studio and --gui open the window with no console left behind; a full preload started from Studio ran to its end (6,215 of 6,221 pipelines, 8.6 minutes) and the title was then offered without it.
  • cargo clippy -p victory-studio -- -D warnings: clean. The release build's warnings are the ones main has; none are in lines this touches.
  • cargo test, after merging main at 41adb551: victory-gpu hot 13 passed. shader_cache::tests::every_switch_of_the_translator_is_in_the_key fails ("VICTORY_SCALAR_SPLITS is not read by the translator any more"); it fails the same way on plain main at 41adb551, and this branch does not touch the shader cache or the translator. The whole victory-gpu suite was not rerun on this branch.
  • The preload by profile (fourth commit), in my working branch's build of the same Studio code: a profile with its own layer and five variables was preloaded from Studio (6,444 of 6,446 pipelines), the line kept for it names that layer and those variables, and PLAY then started the title without another preload.
  • Used by hand: the window has been played from over several sessions on this PC (the same Studio code in my working branch's build): picking a profile, PLAY, the pages, the Live page beside a running title, kept sessions. That use found the Live page's row of figures running past the window's edge, fixed in the third commit (the figures are a grid that fits the window's width; checked in a capture of this branch's build).
  • Not tested: One title only. No Series S run. Not run under Wine/Proton (the window-title and console calls are Windows calls; the crate is built for Windows only).

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #1619 (the file this builds on, merged), #1988 and #2201 (stacked on them), #982 (a graphical launcher too, in Tauri, as a separate program in apps/launcher: it starts the title through the scripts of a source checkout, edits the F1 menu's settings and the keyboard pad's keys, and updates the checkout). The two share no source file besides Cargo.lock and README.md. What this one does that #982 does not: it is inside the released victory.exe, changes switches while the title runs, shows the run's frame times and keeps sessions. What #982 does that this does not: key mapping, the F1 settings, updates. If #982 is the launcher you want, commit 1 stands on its own and the Live/Sessions pages could move there; say which you prefer. #1448 (rig launcher) is a script that picks settings for a PC and does not overlap.

🤖 Generated with Claude Code

**@⁠Anorak-314** on GitHub · 2026-11-29 15:35 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2653) `Anorak-314:studio` → `main` · +4307 −155 · 13 files · 8 commits · open ## What it changes `victory.exe` gets a window: `victory studio` (or `victory --gui`) opens **VIctory Studio**. A start without either does exactly what it did (a double-click still plays), so nothing that exists changes its behaviour. Four commits on top of #1988 and #2201 (the present queue, its trace and the pacer, which the Live page reads and sets; until those merge, their commits show in this diff too): **1. Live switches: every `toggled!` / `asked_for!` switch follows the `VICTORY_HOT_AB` file** #1619 gave the mechanism (a file of `VICTORY_NAME=value` lines, read again when it changes) for the switches that ask `hot::over` at their use. This makes both switch macros ask the file first, plus `VICTORY_PACE` and `VICTORY_PIPELINE_WAIT_MS`. Each switch keeps what it last read and asks again only when the file has been read anew (`hot::flag`, a generation count), so a check stays one atomic load. Asking the table under its lock at every check cost about 3 frames a second in 32 here, which is why the cache is there. With `VICTORY_HOT_AB` unset, a check is one load of `ACTIVE` more than before. **2. VIctory Studio (`apps/victory-studio`, egui/eframe, linked into `victory.exe`)** - **Library**: titles with cover art and name read from the dump's own `MicrosoftGame.Config` (nothing shipped, nothing downloaded), profiles of arguments and switches per title, an optional launcher script, and a shader preload before play (`victory preload`, with its progress; it runs with the chosen profile's own layer and variables, and is remembered for each profile with the executable and the driver version, so it is offered again when any of them changes: shaders are translated differently under some variables, and a preload made without them left the title making pipelines while it played). - **Live**: frame rate, frame times (from `VICTORY_PRESENT_TRACE`), the card's load and memory (`nvidia-smi`, when present), and the switches that can change while the title runs, written to the `VICTORY_HOT_AB` file Studio sets up for the run. - **Sessions**: each run's numbers kept (frame rate, 1 % low, median and 95th-percentile frame time, the count of frames over 50, 100 and 300 ms) for comparing runs. - **Logs**: the layer's log (`VICTORY_LOG_FILE`), with a filter for warnings and errors. - For scripts: `victory studio --play`, `--page live|sessions|logs`, `--set VICTORY_NAME=value`, `--preload`. - Files live in `%LOCALAPPDATA%\VIctory\studio`. The README's quick start has a short section on it. ## How it was tested - GPU and profile: RTX 5090, driver 621.40, Series X profile, 3840x2160, DLAA, no frame generation, no ray tracing. - This branch's build, started as `victory studio --play --page live --set VICTORY_PIPELINE_WAIT_MS=100`: the title started from Studio and the log shows `hot-ab: following ...\live.txt` and `segment 1 starts: VICTORY_PIPELINE_WAIT_MS=100 (frame 1)`. The file was then changed while the title ran: `segment 2 starts: VICTORY_PIPELINE_WAIT_MS=100 VICTORY_SUBMIT_SPLIT=0 (frame 37346)`, the run went on, and after the title was closed the session was kept (51,968 traced frames). - Cost of the switches following the file, measured on the same change in my working branch (native 3840x2160, same scene): 32.0 fps with the file followed, 32.3 without. - Same Studio code in my working branch: a start without arguments plays as before; `studio` and `--gui` open the window with no console left behind; a full preload started from Studio ran to its end (6,215 of 6,221 pipelines, 8.6 minutes) and the title was then offered without it. - `cargo clippy -p victory-studio -- -D warnings`: clean. The release build's warnings are the ones main has; none are in lines this touches. - `cargo test`, after merging main at 41adb551: `victory-gpu` `hot` 13 passed. `shader_cache::tests::every_switch_of_the_translator_is_in_the_key` fails ("VICTORY_SCALAR_SPLITS is not read by the translator any more"); it fails the same way on plain main at 41adb551, and this branch does not touch the shader cache or the translator. The whole `victory-gpu` suite was not rerun on this branch. - The preload by profile (fourth commit), in my working branch's build of the same Studio code: a profile with its own layer and five variables was preloaded from Studio (6,444 of 6,446 pipelines), the line kept for it names that layer and those variables, and PLAY then started the title without another preload. - Used by hand: the window has been played from over several sessions on this PC (the same Studio code in my working branch's build): picking a profile, PLAY, the pages, the Live page beside a running title, kept sessions. That use found the Live page's row of figures running past the window's edge, fixed in the third commit (the figures are a grid that fits the window's width; checked in a capture of this branch's build). - **Not tested**: One title only. No Series S run. Not run under Wine/Proton (the window-title and console calls are Windows calls; the crate is built for Windows only). ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #1619 (the file this builds on, merged), #1988 and #2201 (stacked on them), **#982** (a graphical launcher too, in Tauri, as a separate program in `apps/launcher`: it starts the title through the scripts of a source checkout, edits the F1 menu's settings and the keyboard pad's keys, and updates the checkout). The two share no source file besides `Cargo.lock` and `README.md`. What this one does that #982 does not: it is inside the released `victory.exe`, changes switches while the title runs, shows the run's frame times and keeps sessions. What #982 does that this does not: key mapping, the F1 settings, updates. If #982 is the launcher you want, commit 1 stands on its own and the Live/Sessions pages could move there; say which you prefer. #1448 (rig launcher) is a script that picks settings for a PC and does not overlap. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The NVIDIA driver lets Present return when the card has run the frame: it
sleeps in the call (an RTX 5090, driver 621.24: 7 ms a frame at 3840x2160 with
DLAA, 1.5 ms with DLSS Quality), and the thread that prepares the submissions
stood still for as long, the card with nothing to run while the next frame's
first submission was prepared. Maximum pre-rendered frames in the driver's
profile (0, 1, 3), three buffers, presents that may not tear and a window that
covers the screen change nothing; the call alone on another thread does not
either (VICTORY_PRESENT_ASIDE=1: the driver keeps its lock while it sleeps).

With VICTORY_PRESENT_QUEUE=1 the swap chain is made on a queue of its own. The
frame is drawn into one of two stand-in textures on the main queue; a thread
has the swap chain's queue wait for it on the card, copies it to the back
buffer and presents. Off unless asked for; not with frame generation, which
takes the swap chain itself.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Four conflicts in host.rs, both sides kept: the module beside main's eight
swap-chain buffers, the wait for the present handed over before main's
composer made aside, the hand-over before main's retry of a refused present,
and FidelityFX's swap chain with main's device argument.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
The frame-times line counts the submitting thread's hand-over, not the
present: with the swap chain on its own queue the two differ (hand-over
p95 40.7 ms, Present returned p95 34.8 ms at a median of 28 ms, RTX 5090,
3840x2160, 240 Hz). One line a present: frame, handed over, the wait for
the present before, the copy begun, Present called and returned, and the
swap chain's present and refresh counts.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
VICTORY_PACE=<n> or auto, on the thread that presents: the thread waits for
the card to have drawn the frame, then presents it right after the refresh n
after the one of the present before, with no tearing. Frames of menus and
loading screens are not paced. auto starts at the count nearest 30 frames a
second, goes one refresh up when more than a quarter of the frames are late,
and now and then tries one fewer.

RTX 5090, 3840x2160 with DLAA, 240 Hz, 100 s of the opening, two runs each
on this base: unpaced, 31.6 / 32.4 frames a second, Present returned every
30.6 / 29.9 ms at the median (28.4 to 37.5 / 26.1 to 36.3 from the fifth to
the ninety-fifth percentile), frames on the screen for 4 to 7 refreshes;
with auto, 28.7 / 29.2 frames a second, every 33.3 ms (33.1 to 43.2 / 32.7
to 37.6), 76 / 72 % of the frames on the screen for exactly 8 refreshes.
On a base where the frames have more room before the pace (my fork: the
submitting thread 24 ms a frame against 29 here), 99 % exact, 33.1 to
33.5 ms.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
A switch named in the file changes while the title runs, as do the frame
pacer's setting and the pipeline wait budget; one whose name is not there
reads the environment as before. Each switch keeps what it last read and
asks again only when the file has been read anew, so a check is one atomic
load (taking the table's lock at every check cost about 3 frames a second
in 32).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
A library of titles with cover art read from the dump's own
MicrosoftGame.Config, profiles of arguments and switches, a shader preload
before play with its progress, a live page (frame rate, frame times, the
card's load, and the switches that change without a restart), kept sessions
and the layer's log. A start without `studio` or `--gui` does what it did.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 15:35:57 +00:00
A row of eight cards did not wrap and widened the page past the window, so
everything under it was cut at the window's edge.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
With FSR 3 or DLSS frame generation the swap chain is not made on a queue
of its own, and VICTORY_PRESENT_QUEUE=1 then took the path of
VICTORY_PRESENT_ASIDE=1 (the call alone on the thread), which is no gain
and made a frame some 10 ms longer with FSR 3 on an RTX 3060 (measured in
the pull request's thread). Now the presents are called as without the
switch, and a line in the log says so.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Co-Authored-By: Claude Fable 5.2 <[email protected]>
This pull request has changes conflicting with the target branch.
  • Cargo.lock
  • crates/victory-gpu/src/host.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2653'
git switch 'github-bot/gh-2653'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2653'
git switch 'github-bot/gh-2653'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2653'
git switch 'main'
git merge --squash 'github-bot/gh-2653'
git switch 'main'
git merge --ff-only 'github-bot/gh-2653'
git switch 'main'
git merge 'github-bot/gh-2653'
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/trustno1-coder--VIctory-NVIDIA!2653
No description provided.