Launchers: the CPU sides of card copies in files (VICTORY_CARD_CPU_FILE=1), as victory play has them #4841

Open
mcozcan wants to merge 1 commit from upstream-pr/4841 into main
mcozcan commented 2026-12-01 11:03:23 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by mcozcan on 2026-12-01T11:03:23Z.


Refs #4462

What it changes

Every title buffer with a copy on the card also has a CPU side of the same size, in the process's private memory. With the card's own memory, which NVIDIA also counts in the process's commit (#4288), and the title's own pages, such a buffer is committed about three times. On 32 GB PCs the commit is what runs out first: the page file grows and the game stalls (#3443).

VICTORY_CARD_CPU_FILE=1 already puts those CPU sides in files under the cache (cpu-mirrors) instead of the page file (docs/windows-memory.md, "Optional file-backed CPU mirrors"). victory play has had it on since c71899d9 (the 2026-11-30 bench set), but neither script launcher sets it, so players who start with scripts\play-nvidia.ps1 (and PLAY_FRAMEGEN.cmd through it) or Play-VIctory.cmd run without it.

This sets it in both launchers:

  • scripts/play-nvidia.ps1: in $settings after the memory stack, so the F1 menu and -More can still turn it off.
  • Play-VIctory.cmd: if not defined, as its other settings.
  • Not under Wine (HKCU\Software\Wine present): there the files are ordinary Linux files and the opening cutscene lost its first 15 s (#4275, which does the same for victory play).

What it does not do: the pages are still in RAM as the file's cache. What changes is that they leave the private commit, and Windows can write them back to their files instead of growing the page file. docs/windows-memory.md asks to compare commit and frame times before keeping it on; victory play has been the place where that was done.

How it was tested

  • GPU and profile: not run in the game with this launcher change.
  • Before / After: none measured here. The setting is the one victory play ships since c71899d9; this only makes the two script launchers match it.
  • For shader changes: none.
  • cargo test: not affected (launcher scripts only). The script was read for where its settings are applied: the new line comes before the F1 menu ($menu) and -More overrides, and before Set-Item "Env:$k".
  • Note: main's CI fails at clippy since #4634 (too_many_arguments, is_multiple_of, a collapsible if), so this PR's CI will show that failure too.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #4275 (VICTORY_CARD_CPU_FILE off under Wine for victory play; this keeps the launchers in line with it), #4815 and #4771 (other play defaults in the same launcher, not this setting). None found that sets VICTORY_CARD_CPU_FILE in the launchers.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5584355263 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4841). Originally posted by [mcozcan](https://github.com/mcozcan) on 2026-12-01T11:03:23Z. --- Refs #4462 ## What it changes Every title buffer with a copy on the card also has a CPU side of the same size, in the process's private memory. With the card's own memory, which NVIDIA also counts in the process's commit (#4288), and the title's own pages, such a buffer is committed about three times. On 32 GB PCs the commit is what runs out first: the page file grows and the game stalls (#3443). `VICTORY_CARD_CPU_FILE=1` already puts those CPU sides in files under the cache (`cpu-mirrors`) instead of the page file (`docs/windows-memory.md`, "Optional file-backed CPU mirrors"). `victory play` has had it on since c71899d9 (the 2026-11-30 bench set), but neither script launcher sets it, so players who start with `scripts\play-nvidia.ps1` (and `PLAY_FRAMEGEN.cmd` through it) or `Play-VIctory.cmd` run without it. This sets it in both launchers: - `scripts/play-nvidia.ps1`: in `$settings` after the memory stack, so the F1 menu and `-More` can still turn it off. - `Play-VIctory.cmd`: `if not defined`, as its other settings. - Not under Wine (`HKCU\Software\Wine` present): there the files are ordinary Linux files and the opening cutscene lost its first 15 s (#4275, which does the same for `victory play`). What it does not do: the pages are still in RAM as the file's cache. What changes is that they leave the private commit, and Windows can write them back to their files instead of growing the page file. `docs/windows-memory.md` asks to compare commit and frame times before keeping it on; `victory play` has been the place where that was done. ## How it was tested - GPU and profile: not run in the game with this launcher change. - Before / After: none measured here. The setting is the one `victory play` ships since c71899d9; this only makes the two script launchers match it. - For shader changes: none. - `cargo test`: not affected (launcher scripts only). The script was read for where its settings are applied: the new line comes before the F1 menu (`$menu`) and `-More` overrides, and before `Set-Item "Env:$k"`. - Note: `main`'s CI fails at clippy since #4634 (`too_many_arguments`, `is_multiple_of`, a collapsible `if`), so this PR's CI will show that failure too. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #4275 (`VICTORY_CARD_CPU_FILE` off under Wine for `victory play`; this keeps the launchers in line with it), #4815 and #4771 (other play defaults in the same launcher, not this setting). None found that sets `VICTORY_CARD_CPU_FILE` in the launchers.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/4841:upstream-pr/4841'
git switch 'upstream-pr/4841'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/4841'
git switch 'upstream-pr/4841'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/4841'
git switch 'upstream-pr/4841'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/4841'
git switch 'main'
git merge --squash 'upstream-pr/4841'
git switch 'main'
git merge --ff-only 'upstream-pr/4841'
git switch 'main'
git merge 'upstream-pr/4841'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
trustno1-coder/VIctory-NVIDIA!4841
No description provided.