Add experimental Linux support via GE-Proton/umu and Nix shells #64

Open
github-bot wants to merge 1 commit from github-bot/gh-64 into main AGit
Owner

@⁠MiguVT on GitHub · 2026-11-24 21:03 UTC · original
MiguVT:work/fxceless-main → main · +326 −1 · 9 files · 1 commits · open

Summary

  • Add Linux-to-Windows cross-build and GE-Proton/umu launch scripts, preserving terminal output through a direct Wine launch path.
  • Add non-flake Nix development shells and Linux cross-build CI.
  • Document setup and MiguVT's RTX 3090 / Ryzen 9 5950X test: cinematic loads but is mostly dark, approximately 6,275 ms/frame (0.16 FPS), not playable.
  • Allow Nix source files in the asset policy and ignore local vkd3d-proton caches.

Validation

  • Windows MSVC release cross-build passed on Linux.
  • ShellCheck and all four xtask tests passed.
  • Launcher checks covered quoting, Windows path conversion and exit-status forwarding.
  • GE-Proton11-14 smoke test returned victory 0.1.0 through terminal output.

Linux remains experimental; this does not fix the rendering or performance issues.

**@⁠MiguVT** on GitHub · 2026-11-24 21:03 UTC · [original](https://github.com/fxceless/victory-fork/pull/64) `MiguVT:work/fxceless-main` → `main` · +326 −1 · 9 files · 1 commits · open ## Summary - Add Linux-to-Windows cross-build and GE-Proton/umu launch scripts, preserving terminal output through a direct Wine launch path. - Add non-flake Nix development shells and Linux cross-build CI. - Document setup and MiguVT's RTX 3090 / Ryzen 9 5950X test: cinematic loads but is mostly dark, approximately 6,275 ms/frame (0.16 FPS), not playable. - Allow Nix source files in the asset policy and ignore local vkd3d-proton caches. ## Validation - Windows MSVC release cross-build passed on Linux. - ShellCheck and all four xtask tests passed. - Launcher checks covered quoting, Windows path conversion and exit-status forwarding. - GE-Proton11-14 smoke test returned victory 0.1.0 through terminal output. Linux remains experimental; this does not fix the rendering or performance issues.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:35:28 +00:00
Author
Owner

@⁠rostaddotcc on GitHub · 2026-11-24 21:17 UTC · original

The linux-cross job builds but does not test. If you want tests on Linux in the same job, here is what a Linux host actually gets today — measured on main at 4e17478 (CachyOS, rustc stable, x86-64) just now, crate by crate:

crate cargo test -p <crate> --lib on Linux
victory-core 11 passed
victory-pipeline 4 passed
victory-shader 170 passed, 2 ignored
victory-pe 3 passed, 4 failed
victory-gpu does not compile (cannot find function 'host_resource', cannot find 'host' in 'crate', cannot find 'texture' in 'crate')
victory-loader does not compile (6 errors in the lib, 9 in the lib test: windows_sys unresolved, console_insn gated)
victory-hle does not compile, depends on victory-gpu

Two of those are worth fixing here rather than in a follow-up:

  • victory-pe's four failures are a platform assumption, not a parser bug. image::tests reads std::env::current_exe() and calls it "a real MSVC-linked PE32+ image" (crates/victory-pe/src/image.rs:407-412). On a Linux host the test binary is an ELF, so all four fail with Malformed("Unknown file magic"). Either gate them on cfg(windows) or check in a small synthetic PE — the asset policy allows synthetic test data, and a hand-built 1 KiB PE with two sections would test the same paths on both platforms.
  • victory-gpu's test module reaches Windows-only items. cargo test on Windows is unaffected; a Linux job simply cannot see these tests, which means a change to texture.rs or host.rs today has no unit coverage off Windows. Worth knowing before merging anyone's victory-gpu PR on "tests pass".

So the minimum viable Linux test step is cargo test -p victory-core -p victory-pipeline -p victory-shader — that is 185 tests, none of which need a GPU, a prefix or the disc image, and all of which pass here. I can open that as a small PR against this branch if you would rather not touch the workflow twice.

Related: #41 documents what a Linux/Proton run otherwise needs (the d3d12 override, HDR off) and where its frame time goes on RADV.

**@⁠rostaddotcc** on GitHub · 2026-11-24 21:17 UTC · [original](https://github.com/fxceless/victory-fork/pull/64#issuecomment-7144736929) The `linux-cross` job builds but does not test. If you want tests on Linux in the same job, here is what a Linux host actually gets today — measured on `main` at `4e17478` (CachyOS, rustc stable, x86-64) just now, crate by crate: | crate | `cargo test -p <crate> --lib` on Linux | |---|---| | victory-core | 11 passed | | victory-pipeline | 4 passed | | victory-shader | 170 passed, 2 ignored | | victory-pe | 3 passed, **4 failed** | | victory-gpu | does not compile (`cannot find function 'host_resource'`, `cannot find 'host' in 'crate'`, `cannot find 'texture' in 'crate'`) | | victory-loader | does not compile (6 errors in the lib, 9 in the lib test: `windows_sys` unresolved, `console_insn` gated) | | victory-hle | does not compile, depends on victory-gpu | Two of those are worth fixing here rather than in a follow-up: - **`victory-pe`'s four failures are a platform assumption, not a parser bug.** `image::tests` reads `std::env::current_exe()` and calls it "a real MSVC-linked PE32+ image" (`crates/victory-pe/src/image.rs:407-412`). On a Linux host the test binary is an ELF, so all four fail with `Malformed("Unknown file magic")`. Either gate them on `cfg(windows)` or check in a small synthetic PE — the asset policy allows synthetic test data, and a hand-built 1 KiB PE with two sections would test the same paths on both platforms. - **`victory-gpu`'s test module reaches Windows-only items.** `cargo test` on Windows is unaffected; a Linux job simply cannot see these tests, which means a change to `texture.rs` or `host.rs` today has no unit coverage off Windows. Worth knowing before merging anyone's victory-gpu PR on "tests pass". So the minimum viable Linux test step is `cargo test -p victory-core -p victory-pipeline -p victory-shader` — that is 185 tests, none of which need a GPU, a prefix or the disc image, and all of which pass here. I can open that as a small PR against this branch if you would rather not touch the workflow twice. Related: #41 documents what a Linux/Proton run otherwise needs (the `d3d12` override, HDR off) and where its frame time goes on RADV.
Author
Owner

@⁠ThomasHFWright on GitHub · 2026-11-24 21:22 UTC · original

A pinned runtime datapoint for the Linux guide: RTX 5090 / NVIDIA 620.73.04 / CachyOS 7.3.6, fork base 4e17478b, GE-Proton11-14 through umu 1.4.3, SteamRT4 4.0.20261110.268882, bundled vkd3d-proton 3.2.0 cae8353ed7959c4+. Used an isolated offline launcher, not this PR's scripts, so this is runtime evidence rather than exact-head validation.

The version smoke test passes and the title loads, but the builtin HLSL compiler rejects InterlockedMax, dropping indirect commands. Our run then hits a GPU execution fault. Integrating #20 restores the clamp and depth-plane helper compilation, with 2,147 bounded indirect commands/frame in one sample and no missing-clamp drops; a GPU fault still prevents normal world visuals. Full comparison and checks: #20

#20 plus explicit DXC/validator paths looks worth mentioning in the guide for affected compiler builds. This does not establish gameplay or that the Linux workflow PR fixes rendering. AI-assisted testing; no game data attached.

**@⁠ThomasHFWright** on GitHub · 2026-11-24 21:22 UTC · [original](https://github.com/fxceless/victory-fork/pull/64#issuecomment-7144848348) A pinned runtime datapoint for the Linux guide: RTX 5090 / NVIDIA 620.73.04 / CachyOS 7.3.6, fork base `4e17478b`, GE-Proton11-14 through umu 1.4.3, SteamRT4 4.0.20261110.268882, bundled vkd3d-proton 3.2.0 `cae8353ed7959c4+`. Used an isolated offline launcher, not this PR's scripts, so this is runtime evidence rather than exact-head validation. The version smoke test passes and the title loads, but the builtin HLSL compiler rejects `InterlockedMax`, dropping indirect commands. Our run then hits a GPU execution fault. Integrating #20 restores the clamp and depth-plane helper compilation, with 2,147 bounded indirect commands/frame in one sample and no missing-clamp drops; a GPU fault still prevents normal world visuals. Full comparison and checks: https://git.gtahub.st/github/fxceless--victory-fork/pulls/20 #20 plus explicit DXC/validator paths looks worth mentioning in the guide for affected compiler builds. This does not establish gameplay or that the Linux workflow PR fixes rendering. AI-assisted testing; no game data attached.
Author
Owner

@⁠rostaddotcc on GitHub · 2026-11-24 21:24 UTC · original

Correction to what I wrote above: I said a Linux job cannot run the victory-gpu tests. It can — it just cannot link them natively. Build the test binary for the Windows target and run it under the runner that ships with the tree's Linux support:

cargo xwin test --no-run -p victory-gpu --target x86_64-pc-windows-msvc
wine target/x86_64-pc-windows-msvc/debug/deps/victory_gpu-<hash>.exe

Measured here (CachyOS, RX 7900 XT, Proton Experimental experimental-11.0-20261112, WINEDLLOVERRIDES="d3dcompiler_47=b" forcing the builtin compiler): 110 passed, 0 failed, 1 ignored, 0.7 s. The same binary without the override gives the same result. So a linux-cross job could run:

cargo xwin test --no-run -p victory-gpu -p victory-hle --target x86_64-pc-windows-msvc
# then each binary under wine/Proton

That is strictly more coverage than the native path, and it never touches a GPU, a prefix or the disc image. victory-loader still needs its windows_sys import fixed before it builds at all — that one is a real gap on both platforms.

The victory-pe half of my earlier table is the same story: four image::tests read current_exe() and expect PE32+ (crates/victory-pe/src/image.rs:407-412), which is an ELF when the binary is native. Run the same way:

cargo xwin test --no-run -p victory-pe --target x86_64-pc-windows-msvc

then under wine: 7 passed, 0 failed — against 3 passed, 4 failed natively. So nothing here needs a code change, only the right runner; my earlier "gate them on cfg(windows)" suggestion would have thrown away four working tests.

**@⁠rostaddotcc** on GitHub · 2026-11-24 21:24 UTC · [original](https://github.com/fxceless/victory-fork/pull/64#issuecomment-7144897612) Correction to what I wrote above: I said a Linux job cannot run the `victory-gpu` tests. It can — it just cannot *link* them natively. Build the test binary for the Windows target and run it under the runner that ships with the tree's Linux support: ``` cargo xwin test --no-run -p victory-gpu --target x86_64-pc-windows-msvc wine target/x86_64-pc-windows-msvc/debug/deps/victory_gpu-<hash>.exe ``` Measured here (CachyOS, RX 7900 XT, Proton Experimental `experimental-11.0-20261112`, `WINEDLLOVERRIDES="d3dcompiler_47=b"` forcing the builtin compiler): **110 passed, 0 failed, 1 ignored, 0.7 s**. The same binary without the override gives the same result. So a `linux-cross` job could run: cargo xwin test --no-run -p victory-gpu -p victory-hle --target x86_64-pc-windows-msvc # then each binary under wine/Proton That is strictly more coverage than the native path, and it never touches a GPU, a prefix or the disc image. `victory-loader` still needs its `windows_sys` import fixed before it builds at all — that one is a real gap on both platforms. The `victory-pe` half of my earlier table is the same story: four `image::tests` read `current_exe()` and expect PE32+ (`crates/victory-pe/src/image.rs:407-412`), which is an ELF when the binary is native. Run the same way: ``` cargo xwin test --no-run -p victory-pe --target x86_64-pc-windows-msvc ``` then under wine: **7 passed, 0 failed** — against 3 passed, 4 failed natively. So nothing here needs a code change, only the right runner; my earlier "gate them on `cfg(windows)`" suggestion would have thrown away four working tests.
Author
Owner

@⁠rostaddotcc on GitHub · 2026-11-24 21:27 UTC · original

One condition on the recipe above, because it decides between a real pass and a silent no-op: the tests only do anything when a device exists, and argument_clamp_builds starts with

if super::host().is_none() { return; }

so with Wine's d3d12 stub in the chain every GPU test returns green without running. The working invocation also has to let vkd3d-proton serve d3d12, and — for the HLSL half — point at Microsoft's compiler:

WINEDLLOVERRIDES="d3d12=n;d3d12core=n;dxgi=n;d3dcompiler_47=n" wine victory_gpu-….exe

With that: argument_clamp_builds passes in 0.40 s and the card compare in 0.26 s. With d3dcompiler_47=b (Wine's builtin) the clamp test fails with E5005 from vkd3d-shader, which is the real state of things and is what #6 is about.

So the honest Linux test line for CI is d3d12 from vkd3d-proton plus d3dcompiler_47 from fxc; a suite that reports 110 passed in 0.7 s is reporting that no device was created.

**@⁠rostaddotcc** on GitHub · 2026-11-24 21:27 UTC · [original](https://github.com/fxceless/victory-fork/pull/64#issuecomment-7144958288) One condition on the recipe above, because it decides between a real pass and a silent no-op: the tests only do anything when a device exists, and `argument_clamp_builds` starts with ```rust if super::host().is_none() { return; } ``` so with Wine's `d3d12` stub in the chain every GPU test returns green without running. The working invocation also has to let vkd3d-proton serve `d3d12`, and — for the HLSL half — point at Microsoft's compiler: ``` WINEDLLOVERRIDES="d3d12=n;d3d12core=n;dxgi=n;d3dcompiler_47=n" wine victory_gpu-….exe ``` With that: `argument_clamp_builds` passes in 0.40 s and the card compare in 0.26 s. With `d3dcompiler_47=b` (Wine's builtin) the clamp test **fails** with `E5005` from vkd3d-shader, which is the real state of things and is what #6 is about. So the honest Linux test line for CI is `d3d12` from vkd3d-proton plus `d3dcompiler_47` from `fxc`; a suite that reports 110 passed in 0.7 s is reporting that no device was created.
Author
Owner

@⁠rostaddotcc on GitHub · 2026-11-24 21:38 UTC · original

One more data point for the test step: on main (4e17478) the full victory-gpu suite is 109 passed, 1 failed, 1 ignored on Linux once it is run properly (vkd3d-proton serving d3d12, Microsoft's d3dcompiler_47 as the native override). The failure is real and would break a Linux CI on the first run:

pipeline::library::tests::a_rejected_blob_gives_an_empty_library
panicked at crates/victory-gpu/src/pipeline/library.rs:731: an empty library

The test feeds 336 bytes of garbage to CreatePipelineLibrary and expects an empty library back (library.rs:731-734). On vkd3d-proton the call is refused, open() returns None, and the expect fires; on native D3D12 the same input yields an empty library. So the expectation is D3D12-version-specific, not a bug in the layer.

Two ways to make a Linux job green without hiding anything: accept either outcome on that one assertion (ok(None) means "refused", which is also a safe state), or #[cfg(windows)] that single test with a comment saying why. What I would not do is skip the suite — the other 109 tests are exactly the coverage this repo currently lacks off Windows, and they pass.

For the record, the recipe that actually exercises the device (this is the difference between a real run and a vacuous one, since every GPU test starts with if super::host().is_none() { return; }):

WINEDLLOVERRIDES="d3d12=n;d3d12core=n;dxgi=n;d3dcompiler_47=n" wine victory_gpu-<hash>.exe
**@⁠rostaddotcc** on GitHub · 2026-11-24 21:38 UTC · [original](https://github.com/fxceless/victory-fork/pull/64#issuecomment-7145187113) One more data point for the test step: on `main` (`4e17478`) the full `victory-gpu` suite is **109 passed, 1 failed, 1 ignored** on Linux once it is run properly (vkd3d-proton serving `d3d12`, Microsoft's `d3dcompiler_47` as the native override). The failure is real and would break a Linux CI on the first run: ``` pipeline::library::tests::a_rejected_blob_gives_an_empty_library panicked at crates/victory-gpu/src/pipeline/library.rs:731: an empty library ``` The test feeds 336 bytes of garbage to `CreatePipelineLibrary` and expects an empty library back (`library.rs:731-734`). On vkd3d-proton the call is refused, `open()` returns `None`, and the `expect` fires; on native D3D12 the same input yields an empty library. So the expectation is D3D12-version-specific, not a bug in the layer. Two ways to make a Linux job green without hiding anything: accept either outcome on that one assertion (`ok(None)` means "refused", which is also a safe state), or `#[cfg(windows)]` that single test with a comment saying why. What I would not do is skip the suite — the other 109 tests are exactly the coverage this repo currently lacks off Windows, and they pass. For the record, the recipe that actually exercises the device (this is the difference between a real run and a vacuous one, since every GPU test starts with `if super::host().is_none() { return; }`): ``` WINEDLLOVERRIDES="d3d12=n;d3d12core=n;dxgi=n;d3dcompiler_47=n" wine victory_gpu-<hash>.exe ```
Author
Owner

@⁠MiguVT on GitHub · 2026-11-24 22:17 UTC · original

@⁠rostaddotcc Thanks for the test results. The Linux job intentionally checks the scripts and cross-compiles; the existing Windows job runs the tests. I’m not adding Wine/D3D12 test execution in this PR.

**@⁠MiguVT** on GitHub · 2026-11-24 22:17 UTC · [original](https://github.com/fxceless/victory-fork/pull/64#issuecomment-7146036850) @⁠rostaddotcc Thanks for the test results. The Linux job intentionally checks the scripts and cross-compiles; the existing Windows job runs the tests. I’m not adding Wine/D3D12 test execution in this PR.
Author
Owner

@⁠MiguVT on GitHub · 2026-11-24 22:17 UTC · original

@⁠ThomasHFWright Thanks for the datapoint. Since it’s from a different base and launcher, I’m treating it as context, not validation of this PR. The guide already describes Linux as unplayable, so I’m leaving it unchanged.

**@⁠MiguVT** on GitHub · 2026-11-24 22:17 UTC · [original](https://github.com/fxceless/victory-fork/pull/64#issuecomment-7146045551) @⁠ThomasHFWright Thanks for the datapoint. Since it’s from a different base and launcher, I’m treating it as context, not validation of this PR. The guide already describes Linux as unplayable, so I’m leaving it unchanged.
Author
Owner

@⁠ericomeehan on GitHub · 2026-11-24 22:23 UTC · original

A review of the parts outside docs/, since this PR touches CI and the asset policy:

  • cargo install --locked cargo-xwin is unpinned. Every CI run installs whatever cargo-xwin version is newest that day, so CI can change or break without a commit here. Pinning it (cargo install --locked cargo-xwin --version <x.y.z>) keeps CI reproducible.
  • The cross-compile job downloads Microsoft's CRT and Windows SDK at build time (that's what xwin does), which means accepting Microsoft's licence for them on every run. That's the normal way to cross-build for MSVC, but it's a licensing decision the maintainer should make knowingly rather than inherit from a CI step.
  • xtask/src/policy.rs adds nix to the asset-policy allowlist. Harmless for two small shell files, but it's a change to rule #1's allowlist, so it deserves an explicit OK rather than riding along in a Linux PR.
  • The new job keeps the workflow's top-level permissions: contents: read and uses no secrets, so it's safe to run on pull requests.
  • #128 also rewrites ci.yml (a Linux test matrix and SHA-pinned actions); the two will conflict. #37 adds a third launch script at the root. Picking one Linux path first would save rework.

Written with an AI assistant (Claude).

**@⁠ericomeehan** on GitHub · 2026-11-24 22:23 UTC · [original](https://github.com/fxceless/victory-fork/pull/64#issuecomment-7146180363) A review of the parts outside `docs/`, since this PR touches CI and the asset policy: - **`cargo install --locked cargo-xwin` is unpinned.** Every CI run installs whatever cargo-xwin version is newest that day, so CI can change or break without a commit here. Pinning it (`cargo install --locked cargo-xwin --version <x.y.z>`) keeps CI reproducible. - **The cross-compile job downloads Microsoft's CRT and Windows SDK at build time** (that's what xwin does), which means accepting Microsoft's licence for them on every run. That's the normal way to cross-build for MSVC, but it's a licensing decision the maintainer should make knowingly rather than inherit from a CI step. - **`xtask/src/policy.rs` adds `nix` to the asset-policy allowlist.** Harmless for two small shell files, but it's a change to rule #1's allowlist, so it deserves an explicit OK rather than riding along in a Linux PR. - The new job keeps the workflow's top-level `permissions: contents: read` and uses no secrets, so it's safe to run on pull requests. - **#128 also rewrites `ci.yml`** (a Linux test matrix and SHA-pinned actions); the two will conflict. #37 adds a third launch script at the root. Picking one Linux path first would save rework. Written with an AI assistant (Claude).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
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/64/head:github-bot/gh-64'
git switch 'github-bot/gh-64'

Merge

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