Linux and Proton: Linux build and CI, a log file, early pipelines without a pipeline library #1056

Open
github-bot wants to merge 9 commits from github-bot/gh-1056 into main AGit
Owner

@⁠nullexxx on GitHub · 2026-11-25 17:49 UTC · original
nullexxx:pr/linux-proton → main · +218 −41 · 23 files · 9 commits · open

Summary

Changes for running the fork under Linux (GE-Proton with vkd3d-proton, NVIDIA RTX 5080) and for building and testing it on Linux:

Build and test on Linux again. The platform-level crates are meant to build off Windows (upstream VIctory keeps them so), but newer code had broken that. Windows-only pieces are gated (crash, view_format, a value wait's read of title memory, the text-entry dialog, the D3D12.X allocator hookup, XLaunchNewGame's relaunch, translate). Tests that read their own executable as a PE image or use Windows path rules run on Windows only. A Linux CI job runs cargo test --workspace.
Clippy clean on Windows. The Windows CI job failed on lints in recent code (manual is_multiple_of, sort_unstable_by_key, map_entry, two unused items).
VICTORY_LOG_FILE=<path>. Writes the log to a file (appended) instead of stderr. Under Proton a program Steam starts has no terminal: none of the layer's log reached a 2> redirect or Proton's log.
Early pipelines under Proton. The early list (title pipelines earlier runs drew with, made as soon as the title creates them) was only written beside the host pipeline library. vkd3d-proton refuses CreatePipelineLibrary (E_INVALIDARG, now logged), so the list was never kept and every run started cold. It is now saved without a library. The pipelines it starts early are found in vkd3d-proton's and the driver's own caches.
translate --cache. The same as --warm all (VIctory's name for it). Progress and summary also go to the log, since under Proton stdout goes nowhere either.

Testing

cargo test --workspace --locked on Linux: passes.
cargo clippy --workspace --all-targets [--all-features] --target x86_64-pc-windows-msvc -- -D warnings: clean in both configurations (checked from Linux).
Run under GE-Proton 11-14 on an RTX 5080: the log file, the early list (1,586 pipelines kept and started early on the next run) and translate --cache (25,985 shaders) were seen working.
**@⁠nullexxx** on GitHub · 2026-11-25 17:49 UTC · [original](https://github.com/fxceless/victory-fork/pull/1056) `nullexxx:pr/linux-proton` → `main` · +218 −41 · 23 files · 9 commits · open Summary Changes for running the fork under Linux (GE-Proton with vkd3d-proton, NVIDIA RTX 5080) and for building and testing it on Linux: Build and test on Linux again. The platform-level crates are meant to build off Windows (upstream VIctory keeps them so), but newer code had broken that. Windows-only pieces are gated (crash, view_format, a value wait's read of title memory, the text-entry dialog, the D3D12.X allocator hookup, XLaunchNewGame's relaunch, translate). Tests that read their own executable as a PE image or use Windows path rules run on Windows only. A Linux CI job runs cargo test --workspace. Clippy clean on Windows. The Windows CI job failed on lints in recent code (manual is_multiple_of, sort_unstable_by_key, map_entry, two unused items). VICTORY_LOG_FILE=<path>. Writes the log to a file (appended) instead of stderr. Under Proton a program Steam starts has no terminal: none of the layer's log reached a 2> redirect or Proton's log. Early pipelines under Proton. The early list (title pipelines earlier runs drew with, made as soon as the title creates them) was only written beside the host pipeline library. vkd3d-proton refuses CreatePipelineLibrary (E_INVALIDARG, now logged), so the list was never kept and every run started cold. It is now saved without a library. The pipelines it starts early are found in vkd3d-proton's and the driver's own caches. translate --cache. The same as --warm all (VIctory's name for it). Progress and summary also go to the log, since under Proton stdout goes nowhere either. Testing cargo test --workspace --locked on Linux: passes. cargo clippy --workspace --all-targets [--all-features] --target x86_64-pc-windows-msvc -- -D warnings: clean in both configurations (checked from Linux). Run under GE-Proton 11-14 on an RTX 5080: the log file, the early list (1,586 pipelines kept and started early on the next run) and translate --cache (25,985 shaders) were seen working.
The platform-level crates are meant to build off Windows (upstream keeps
rustdoc building there), but this fork's newer code broke that:
- loader: `crash` is Windows-only; gate it like `console_insn`.
- gpu: `view_format` and `ValueWait::holds` read host objects and title
  memory; Windows-only, and off Windows every value wait counts as met.
- hle: the text-entry dialog, the D3D12.X allocator hookup and
  XLaunchNewGame's relaunch are Windows-only.
- app: `translate` checks against host D3D12 and dxil.dll; off Windows the
  command says so.
- Tests that read their own executable as a PE image, or use Windows path
  rules (`C:\..`, `X:\`), run on Windows only.

`cargo test --workspace` now passes on Linux; a CI job keeps it so.

Also fixes the four clippy errors that failed the Windows CI job
(an unused field and function, sort_unstable_by_key, is_multiple_of).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SEGb51RnUN5wf49ozEtinL
(cherry picked from commit 6a5b7a3d2adbe21d3640b569a35493f41b6543b4)
Under Wine or Proton a program Steam starts has no terminal, and its
stderr goes nowhere: none of the layer's log reached the user's Proton
log or a `2>` redirect. With `VICTORY_LOG_FILE=<path>` the log is
appended to that file instead (no colour codes); if it cannot be opened,
the log stays on stderr.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SEGb51RnUN5wf49ozEtinL
(cherry picked from commit 3e5d837114b3434a74fe34a0900575255ebf1964)
The Windows CI job runs clippy with -D warnings; six lints in recent code
failed it: five manual is_multiple_of and one map_entry (fpsbox, whose
entry is made after an early return).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SEGb51RnUN5wf49ozEtinL
- The early list (title pipelines drawn with in earlier runs, made as
  soon as the title creates them) was only written beside the host
  pipeline library. vkd3d-proton under Wine makes no library, so the list
  was never kept and every run started cold. It is now saved without a
  library too; the pipelines the next run starts early are then found in
  vkd3d-proton's and the driver's own caches. Why the host makes no
  library is logged.
- `translate --cache`: every shader found goes into the run's shader
  cache (the same as `--warm all`, VIctory's name for it).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SEGb51RnUN5wf49ozEtinL
(cherry picked from commit 6ba63d9ab3a3462e04d24db8b2e8549714c390c3)
Under Wine or Proton a program Steam starts has no stdout either.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SEGb51RnUN5wf49ozEtinL
A log names the title's files, so a path inside a VIctory source tree is
refused like other output (ensure_outside_repo); the log then goes to
stderr after a line saying why. VICTORY_LOG_FILE= (empty) is ignored
instead of printing an open error. Tests: appending, the empty value, a
path under a .victory-root marker.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SEGb51RnUN5wf49ozEtinL
The dirty flag was cleared before the write, so after a failed write the
list was not saved again until a new pipeline was drawn with.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SEGb51RnUN5wf49ozEtinL
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SEGb51RnUN5wf49ozEtinL
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:56:48 +00:00
Author
Owner

@⁠ArturoWolff on GitHub · 2026-11-25 18:16 UTC · original · edited 2026-11-25 18:32 UTC

The early-list change addresses a real symptom on our desktop RTX 4060 (8 GB VRAM, 16 GB host RAM, GE-Proton11-14): retained logs from fxceless/victory-fork 0b0074e and two DexNom/VIctory 921d8d3 runs all contain no host pipeline library: pipelines are not kept. All three runs ended at our external host-RAM guard; no host OOM kill and no verified controllable world. That is why keeping the separate early list is valuable here, not proof of a memory saving or of a cold driver cache.

I exercised the no-library branch of pipeline/library.rs on Linux, with synthetic pipeline keys and real temporary directories. The small Rust fixture copies the exact save prefix up to the library-present branch and the note_used, wanted_early, used, and write_atomically functions from each clean revision; library() returns None by construction. No D3D12 device, Proton runtime, title, or GPU was used for this fixture. Fresh processes wrote and read the same cache directory; two unique keys plus a duplicate were supplied, and the reader checked both keys plus an absent decoy.

Revision / source-slice variant Normal save + fresh-process read Transient write failure, then retry without any new key
Main d510ee4 No early file; reader fails Fails
This PR c5820ac Both keys persisted; reader passes Fails
Same PR, mark the list dirty again on write error Both keys persisted; reader passes Passes; fresh reader also passes

The retry fixture creates a directory at early-pipelines.tmp to force the real filesystem write to fail, removes that obstruction, and calls save(true) again. On the PR, USED_CHANGED.swap(false, ...) clears the only dirty notice before the failing write; subsequent saves do nothing unless a different key is noted. Restoring USED_CHANGED.store(true, Ordering::Relaxed) in the Err(e) branch of the no-library write_atomically match resolves this specific retry test. The first two columns are independent of render timing or driver-cache hits. This is a hostless source-slice regression, not a build/run of the entire DLL; the native library-present path and concurrency remain untested.

Retail save/reload verification (separate from the fixture). On the same RTX 4060 / 16 GB Linux machine, GE-Proton11-14, diagnostic release Windows GNU/LLVM cross-builds (Rust 1.98.1), I tried exactly d510ee4 and unmodified c5820ac in separate sequential, offline game runs. Both received independent copies of the same initialized Series X profile, shader/driver caches and saves (matching cache/save/driver hashes before launch; no initial early list). VICTORY_DISPLAY_MODE=1920x1080, VICTORY_TEXTURE_GUARD=0, VICTORY_TEXTURE_NO_WAIT=1 in both. No other engine patches.

Observation Main d510ee4 PR c5820ac
Initial early-list count 0 0
early-pipelines.txt after exit absent 31 unique keys
Elapsed before wrapper returned 136 s 142 s
Game service memory peak / swap peak 8,335 / 4,040 MiB 7,911 / 5,476 MiB
Whole-GPU peak used (includes desktop) 5,045 MiB 5,033 MiB

On the PR: the host makes no pipeline library error=Invalid parameter. (0x80070057), followed by early pipeline list saved (no host pipeline library) early=31. Both runs ended at an external 768 MiB host-available-memory floor (not a host OOM kill), after visible loading artwork. A was recorded at the visible account picker in the base; the PR reached the artwork without a captured matching prompt/press. Hence the elapsed and memory numbers are observations, not a matched performance A/B or evidence of memory savings. No verified 3D world, player control, or in-world FPS.

Fresh-process reload: cloned the original profile/cache seed a third time, added only the exact 31-entry file from the PR run, and launched the identical PR executable. The completed log showed title pipelines to start early pipelines=31. The file retained its 31 unique keys. This short run ended at a scheduled stop, with no input sent or OOM kill. (Our live stop detector missed the colored log line; the post-run parser stripped ANSI escapes and verified the actual log.) This independently confirms real persistence and reload on a smaller NVIDIA/Proton machine. It does not demonstrate how many pipelines completed early, whether the driver cache hit, or whether the change improves world entry or frame time.

AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol).

**@⁠ArturoWolff** on GitHub · 2026-11-25 18:16 UTC · [original](https://github.com/fxceless/victory-fork/pull/1056#issuecomment-7170685995) · edited 2026-11-25 18:32 UTC The early-list change addresses a real symptom on our desktop RTX 4060 (8 GB VRAM, 16 GB host RAM, GE-Proton11-14): retained logs from `fxceless/victory-fork` `0b0074e` and two `DexNom/VIctory` `921d8d3` runs all contain `no host pipeline library: pipelines are not kept`. All three runs ended at our external host-RAM guard; no host OOM kill and no verified controllable world. That is why keeping the separate early list is valuable here, not proof of a memory saving or of a cold driver cache. I exercised the no-library branch of `pipeline/library.rs` on Linux, with synthetic pipeline keys and real temporary directories. The small Rust fixture copies the exact `save` prefix up to the library-present branch and the `note_used`, `wanted_early`, `used`, and `write_atomically` functions from each clean revision; `library()` returns `None` by construction. No D3D12 device, Proton runtime, title, or GPU was used for this fixture. Fresh processes wrote and read the same cache directory; two unique keys plus a duplicate were supplied, and the reader checked both keys plus an absent decoy. | Revision / source-slice variant | Normal save + fresh-process read | Transient write failure, then retry without any new key | |---|---|---| | Main `d510ee4` | No early file; reader fails | Fails | | This PR `c5820ac` | Both keys persisted; reader passes | Fails | | Same PR, mark the list dirty again on write error | Both keys persisted; reader passes | Passes; fresh reader also passes | The retry fixture creates a directory at `early-pipelines.tmp` to force the real filesystem write to fail, removes that obstruction, and calls `save(true)` again. On the PR, `USED_CHANGED.swap(false, ...)` clears the only dirty notice before the failing write; subsequent saves do nothing unless a different key is noted. Restoring `USED_CHANGED.store(true, Ordering::Relaxed)` in the `Err(e)` branch of the no-library `write_atomically` match resolves this specific retry test. The first two columns are independent of render timing or driver-cache hits. This is a hostless source-slice regression, not a build/run of the entire DLL; the native library-present path and concurrency remain untested. **Retail save/reload verification (separate from the fixture).** On the same RTX 4060 / 16 GB Linux machine, GE-Proton11-14, diagnostic release Windows GNU/LLVM cross-builds (Rust 1.98.1), I tried exactly `d510ee4` and unmodified `c5820ac` in separate sequential, offline game runs. Both received independent copies of the same initialized Series X profile, shader/driver caches and saves (matching cache/save/driver hashes before launch; no initial early list). `VICTORY_DISPLAY_MODE=1920x1080`, `VICTORY_TEXTURE_GUARD=0`, `VICTORY_TEXTURE_NO_WAIT=1` in both. No other engine patches. | Observation | Main `d510ee4` | PR `c5820ac` | |---|---:|---:| | Initial early-list count | 0 | 0 | | `early-pipelines.txt` after exit | absent | 31 unique keys | | Elapsed before wrapper returned | 136 s | 142 s | | Game service memory peak / swap peak | 8,335 / 4,040 MiB | 7,911 / 5,476 MiB | | Whole-GPU peak used (includes desktop) | 5,045 MiB | 5,033 MiB | On the PR: `the host makes no pipeline library error=Invalid parameter. (0x80070057)`, followed by `early pipeline list saved (no host pipeline library) early=31`. Both runs ended at an external 768 MiB host-available-memory floor (not a host OOM kill), after visible loading artwork. A was recorded at the visible account picker in the base; the PR reached the artwork without a captured matching prompt/press. Hence the elapsed and memory numbers are **observations, not a matched performance A/B or evidence of memory savings**. No verified 3D world, player control, or in-world FPS. **Fresh-process reload:** cloned the original profile/cache seed a third time, added only the exact 31-entry file from the PR run, and launched the identical PR executable. The completed log showed `title pipelines to start early pipelines=31`. The file retained its 31 unique keys. This short run ended at a scheduled stop, with no input sent or OOM kill. (Our live stop detector missed the colored log line; the post-run parser stripped ANSI escapes and verified the actual log.) This independently confirms real persistence and reload on a smaller NVIDIA/Proton machine. It does not demonstrate how many pipelines completed early, whether the driver cache hit, or whether the change improves world entry or frame time. AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol).
This pull request has changes conflicting with the target branch.
  • .github/workflows/ci.yml
  • crates/victory-gpu/src/fpsbox.rs
  • crates/victory-gpu/src/indirect.rs
  • crates/victory-gpu/src/pipeline/library.rs
  • crates/victory-gpu/src/resource.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/1056/head:github-bot/gh-1056'
git switch 'github-bot/gh-1056'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1056'
git switch 'github-bot/gh-1056'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1056'
git switch 'github-bot/gh-1056'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1056'
git switch 'main'
git merge --squash 'github-bot/gh-1056'
git switch 'main'
git merge --ff-only 'github-bot/gh-1056'
git switch 'main'
git merge 'github-bot/gh-1056'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.