Linux/Proton: portable launcher, optional view-tree wineserver build, 64 MiB stack for pipeline workers #4219

Closed
github-bot wants to merge 11 commits from github-bot/gh-4218 into main AGit
Owner

@⁠ProgramaGrueso on GitHub · 2026-11-30 17:30 UTC · original
ProgramaGrueso:linux-proton-launcher → main · +1143 −820 · 35 files · 11 commits · closed without merging

What it changes

Adds a small, self-contained Linux/Proton layer. Nothing under apps/, crates/ or the Windows launchers changes except the one 5-line edit in crates/victory-gpu/src/pipeline/make.rs described below.

  • linux/run-victory.sh: a portable launcher. It finds Proton (PROTON_DIR, a patched copy under linux/proton-patched, or the usual Steam locations), keeps its own prefix under linux/pfx, sets the NVIDIA/VKD3D-Proton environment (NVAPI, NGX updater, feature level 12_2, shader model 6_7, DLL overrides for runinprefix) and starts victory.exe with --cwd pointing at the user's own dump. Every variable can be overridden from the environment. The extra play settings it adds can be turned off with VICTORY_LINUX_OPT=0.
  • linux/wineserver/build-wineserver.sh + wineserver-view-tree.patch: optional script that builds a patched wineserver (red-black-tree view lookup) against ValveSoftware/wine experimental_11.0 and installs it into a reflink copy of Proton Experimental. The patch is the one from FiveNine/victory-proton; credit to its author.
  • crates/victory-gpu/src/pipeline/make.rs: the victory-pipelines-* worker threads now reserve a 64 MiB stack (stack_size). Under Proton, vkd3d-proton's DXIL-to-SPIR-V recursion can overflow the default 2 MiB stack and silently kill workers. It is reserved address space, committed on demand. Note that this line is not Linux-only: it also applies on Windows.
  • .gitignore: ignores linux/pfx/, linux/proton-patched/ and linux/*.log.

No game files, NVIDIA files or dumps are included.

How it was tested

  • Checked here: bash -n on both scripts, and patch -p1 --dry-run of the wineserver patch against server/mapping.c from experimental_11.0 (applies cleanly).
  • Not checked in this PR: I did not compile the make.rs change or run the title for this submission, so there are no before/after frame times or GPU numbers to report. The Rust edit is a plain std::thread::Builder::stack_size call.
  • cargo test for the crates touched: not run.

Checked for overlap

  • I searched the open pull requests. Related Linux/Proton PRs: #3367 (view-tree Wine server build), #1630 (Proton cross-build CI and launcher), #2434 (restart victory.exe without PowerShell), #627, #1702, #4134. #3367 covers the same wineserver idea, so if it lands first I will drop that part from this PR.

If this does not fit the main repository, that is fine: it stays available as a standalone Linux fork at https://github.com/ProgramaGrueso/LinuxVIctory-NVIDIA.

**@⁠ProgramaGrueso** on GitHub · 2026-11-30 17:30 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4218) `ProgramaGrueso:linux-proton-launcher` → `main` · +1143 −820 · 35 files · 11 commits · closed without merging ## What it changes Adds a small, self-contained Linux/Proton layer. Nothing under `apps/`, `crates/` or the Windows launchers changes except the one 5-line edit in `crates/victory-gpu/src/pipeline/make.rs` described below. - `linux/run-victory.sh`: a portable launcher. It finds Proton (`PROTON_DIR`, a patched copy under `linux/proton-patched`, or the usual Steam locations), keeps its own prefix under `linux/pfx`, sets the NVIDIA/VKD3D-Proton environment (NVAPI, NGX updater, feature level 12_2, shader model 6_7, DLL overrides for `runinprefix`) and starts `victory.exe` with `--cwd` pointing at the user's own dump. Every variable can be overridden from the environment. The extra `play` settings it adds can be turned off with `VICTORY_LINUX_OPT=0`. - `linux/wineserver/build-wineserver.sh` + `wineserver-view-tree.patch`: optional script that builds a patched `wineserver` (red-black-tree view lookup) against ValveSoftware/wine `experimental_11.0` and installs it into a reflink copy of Proton Experimental. The patch is the one from FiveNine/victory-proton; credit to its author. - `crates/victory-gpu/src/pipeline/make.rs`: the `victory-pipelines-*` worker threads now reserve a 64 MiB stack (`stack_size`). Under Proton, vkd3d-proton's DXIL-to-SPIR-V recursion can overflow the default 2 MiB stack and silently kill workers. It is reserved address space, committed on demand. Note that this line is not Linux-only: it also applies on Windows. - `.gitignore`: ignores `linux/pfx/`, `linux/proton-patched/` and `linux/*.log`. No game files, NVIDIA files or dumps are included. ## How it was tested - Checked here: `bash -n` on both scripts, and `patch -p1 --dry-run` of the wineserver patch against `server/mapping.c` from `experimental_11.0` (applies cleanly). - Not checked in this PR: I did not compile the `make.rs` change or run the title for this submission, so there are no before/after frame times or GPU numbers to report. The Rust edit is a plain `std::thread::Builder::stack_size` call. - `cargo test` for the crates touched: not run. ## Checked for overlap - [x] I searched the open pull requests. Related Linux/Proton PRs: #3367 (view-tree Wine server build), #1630 (Proton cross-build CI and launcher), #2434 (restart `victory.exe` without PowerShell), #627, #1702, #4134. #3367 covers the same wineserver idea, so if it lands first I will drop that part from this PR. If this does not fit the main repository, that is fine: it stays available as a standalone Linux fork at https://github.com/ProgramaGrueso/LinuxVIctory-NVIDIA.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 18:08:50 +00:00
Author
Owner

@⁠Kassadd on GitHub · 2026-11-30 17:49 UTC · original

Thanks for putting this together, and especially for testing what you could check and saying
plainly what you could not — that made it easy to pick up and try.

I built the whole PR on main (84bd61e) and ran it under Proton here, then separately
looked at the three parts. A few observations that I hope are useful, and one suggestion at
the end.

Environment: RTX 4080 SUPER 16 GiB, i9-14900K, 62 GiB, CachyOS, NVIDIA 620.73.04,
Proton Experimental experimental-bleeding-edge-11.0-482815-20261128-pdd4cb8-w0be231-d1011dd-v71cae0,
Series X 1.0.2.1, --res 1440 with VICTORY_NATIVE_1440P=0 (draws and shows at 4K, no
upscaler), --dlss off.

The stack_size change is the one I was most interested in, because this title logs a
steady dropped N draws or dispatches (0 being made) and we have never worked out why. That
looked like a promising explanation. On this machine it did not move: 343 dropped a frame
with your build against 319 without it
(medians over world frames, 7 and 27 samples). So
either the workers are not dying here, or the drops come from somewhere else — but I would
not read that as the change being pointless, only that it did not show up in this one
measurement.

The wineserver part did not get tested, and I think the reason may be worth knowing: the
script clones experimental_11.0, and the installed Proton here is
…-w0be231-d1011dd-…, which is newer. The build succeeded, but starting with it gave

wine client error:0: version mismatch 931/968.

WINE_BRANCH is already a variable, so pinning it to whatever the installed Proton's
version file names might be enough — the same trouble #3367 hit with tag names, where the
-x86_64-unstripped suffix had to be trimmed before the tag resolved.

A small thing about VICTORY_PORT_CONSTANTS=1 in the launcher's option set: main turned
that off by default in ffe92c5 ("port constants off unless set (in-place memory read over
the bus: 3 fps)"), so the launcher currently asks for something the tree just decided against
by default. Maybe worth a re-measure before re-enabling it there.

What I did not see — and this is only my machine, one session, so take it as a question
rather than a finding — is a gain from the five VICTORY_LINUX_OPT switches together:
13.9 fps against 15.4 without the PR. Seven samples is not enough to say anything solid. If
you have numbers from your own runs, they would be worth more than mine here.

A suggestion. The part that seems most likely to land on its own is linux/run-victory.sh
as a convenience for people on Linux, without the two other pieces: it is self-contained, it
does not change anything under crates/, and it is the sort of thing that is useful to have
whether or not the rest is accepted. The stack_size line is a separate question worth its
own discussion, since it is not Linux-only and would want a measurement on the machine where
the workers actually died. And with #3367 open for the same wineserver idea, the third part
may be better off waiting for that one to settle.

Thanks again — the scripts are clear and the comments in them explain why, which is more than
a lot of launchers manage.

**@⁠Kassadd** on GitHub · 2026-11-30 17:49 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4218#issuecomment-7286893681) Thanks for putting this together, and especially for testing what you could check and saying plainly what you could not — that made it easy to pick up and try. I built the whole PR on `main` (`84bd61e`) and ran it under Proton here, then separately looked at the three parts. A few observations that I hope are useful, and one suggestion at the end. **Environment:** RTX 4080 SUPER 16 GiB, i9-14900K, 62 GiB, CachyOS, NVIDIA 620.73.04, Proton Experimental `experimental-bleeding-edge-11.0-482815-20261128-pdd4cb8-w0be231-d1011dd-v71cae0`, Series X `1.0.2.1`, `--res 1440` with `VICTORY_NATIVE_1440P=0` (draws and shows at 4K, no upscaler), `--dlss off`. **The `stack_size` change is the one I was most interested in**, because this title logs a steady `dropped N draws or dispatches (0 being made)` and we have never worked out why. That looked like a promising explanation. On this machine it did not move: **343 dropped a frame with your build against 319 without it** (medians over world frames, 7 and 27 samples). So either the workers are not dying here, or the drops come from somewhere else — but I would not read that as the change being pointless, only that it did not show up in this one measurement. **The wineserver part did not get tested**, and I think the reason may be worth knowing: the script clones `experimental_11.0`, and the installed Proton here is `…-w0be231-d1011dd-…`, which is newer. The build succeeded, but starting with it gave ```text wine client error:0: version mismatch 931/968. ``` `WINE_BRANCH` is already a variable, so pinning it to whatever the installed Proton's `version` file names might be enough — the same trouble #3367 hit with tag names, where the `-x86_64-unstripped` suffix had to be trimmed before the tag resolved. **A small thing about `VICTORY_PORT_CONSTANTS=1`** in the launcher's option set: `main` turned that off by default in `ffe92c5` ("port constants off unless set (in-place memory read over the bus: 3 fps)"), so the launcher currently asks for something the tree just decided against by default. Maybe worth a re-measure before re-enabling it there. **What I did not see** — and this is only my machine, one session, so take it as a question rather than a finding — is a gain from the five `VICTORY_LINUX_OPT` switches together: 13.9 fps against 15.4 without the PR. Seven samples is not enough to say anything solid. If you have numbers from your own runs, they would be worth more than mine here. **A suggestion.** The part that seems most likely to land on its own is `linux/run-victory.sh` as a convenience for people on Linux, without the two other pieces: it is self-contained, it does not change anything under `crates/`, and it is the sort of thing that is useful to have whether or not the rest is accepted. The `stack_size` line is a separate question worth its own discussion, since it is not Linux-only and would want a measurement on the machine where the workers actually died. And with #3367 open for the same wineserver idea, the third part may be better off waiting for that one to settle. Thanks again — the scripts are clear and the comments in them explain why, which is more than a lot of launchers manage.
github-bot closed this pull request 2026-12-01 18:50:27 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:45 UTC · original

Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

**@⁠trustno1-coder** on GitHub · 2026-12-01 18:45 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4218#issuecomment-7321486878) Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

Pull request closed

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!4219
No description provided.