Skip to content

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

Open
MiguVT wants to merge 1 commit into
fxceless:mainfrom
MiguVT:work/fxceless-main
Open

MiguVT wants to merge 1 commit into
fxceless:mainfrom
MiguVT:work/fxceless-main

Conversation

@MiguVT

@MiguVT MiguVT commented Nov 24, 2026

Copy link
Copy Markdown

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.

Copilot AI balanced review requested due to automatic review settings November 24, 2026 21:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@rostaddotcc

Copy link
Copy Markdown

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.

Copy link
Copy Markdown

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 (comment)

#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.

@rostaddotcc

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

@MiguVT

MiguVT commented Nov 24, 2026

Copy link
Copy Markdown
Author

@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

MiguVT commented Nov 24, 2026

Copy link
Copy Markdown
Author

@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.

@ericomeehan

Copy link
Copy Markdown

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 Make host pipeline waits configurable and prewarm pending requests #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.
  • Linux: compile, test and run the analysis commands + format all files #128 also rewrites ci.yml (a Linux test matrix and SHA-pinned actions); the two will conflict. Add Linux build support and update .gitignore #37 adds a third launch script at the root. Picking one Linux path first would save rework.

Written with an AI assistant (Claude).

LazyHatGuy added a commit to LazyHatGuy/victory-fork that referenced this pull request Nov 24, 2026
… count

Measured on this box: winetricks installs a fixed June-2010
d3dcompiler_47 that predates D3D12 - it compiles [RootSignature(...)]
sources silently without embedding the root signature, so
CreateRootSignature E_FAILs; its 5_1 refusal is X3506. A Win10-era
native copy from the user's own Windows install is the requirement,
and with it the victory-gpu suite is 109/111 under Proton - the one
failure is vkd3d's OpenPipelineLibrary expectation (fxceless#64), not ours.

Also records the native-d3d12 override, HDR throttling that trips the
watchdog (fxceless#41), the texture-lane wait and its lever (fxceless#178), and the
full-run result measured upstream.

Co-Authored-By: Qwen 3.8 Flash Next <noreply@qwen.ai>

🤖 Generated with [OpenCode](https://opencode.ai) (Qwen3.8 Flash)

@ErRusso ErRusso left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 1daf346 against 2119b0e.

The umu/GE-Proton path is coherent: build-linux.sh cross-builds the MSVC binary, run-linux.sh keeps the terminal/exit status, converts the title path to Z:\..., defaults a dedicated prefix and passes STEAM_COMPAT_INSTALL_PATH. The Nix shell and the Linux guide are consistent with the scripts, and the reported RTX 3090 result is clearly labelled as not playable.

Non-blocking: this overlaps the CI/README/docs work in #128, #179 and #41. Rebase/coordinate the CI job and README Linux section so only one lands first; otherwise the three Linux PRs conflict. The cargo install cargo-xwin step on every CI run is also expensive — consider caching it.

LGTM for the umu path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants