Repository navigation
Run on Proton: a Windows build of victory, launched inside a Proton prefix - #179
LazyHatGuy wants to merge 16 commits into
Conversation
The GPU and loader modules declared crash, texture and host reads unconditionally, and hle's UI dialog, allocator hook and relaunch call Windows items the modules no longer export here. Gate each; on Linux a value wait is met as unmapped memory is, the host dialog and title relaunch are dismissed, and the translate command says what it needs. Co-Authored-By: Qwen 3.8 Flash Next <noreply@qwen.ai> 🤖 Generated with [OpenCode](https://opencode.ai) (Qwen3.8 Flash)
The loader and PE tests parse the host's own test binary as PE, and two kernel tests read image paths a Windows host keeps as given: on Linux the binary is an ELF and a `C:\...` path is one relative name. Gate those tests to Windows; the rest run on both. Co-Authored-By: Qwen 3.8 Flash Next <noreply@qwen.ai> 🤖 Generated with [OpenCode](https://opencode.ai) (Qwen3.8 Flash)
On a Linux host the Windows-only users of some items are compiled out, so their imports and host-side bookkeeping stand unused: move the dependencies that only the Windows modules use (anyhow, tracing, miniz_oxide, opus-pure, victory-core, victory-pipeline, victory-shader) under the existing cfg(windows) target sections, gate the remaining Windows-only imports and one helper, allow the dead host-side bookkeeping in the GPU files where it has no Linux caller, and keep the deprecated fetch_update allowed until the pinned toolchain can take try_update. No behaviour changes anywhere; the Windows build is untouched. Co-Authored-By: Qwen 3.8 Flash Next <noreply@qwen.ai> 🤖 Generated with [OpenCode](https://opencode.ai) (Qwen3.8 Flash)
`queue::presented` is only read from the capture and host code, all of it Windows-side, so the diagnostics feature alone left it dead. Co-Authored-By: Qwen 3.8 Flash Next <noreply@qwen.ai> 🤖 Generated with [OpenCode](https://opencode.ai) (Qwen3.8 Flash)
…refix The Windows build is already the title's full host; Proton supplies the same ground underneath it - Wine's loader, D3D12 through dxvk and vkd3d-proton. So Linux support is a build path and a launcher, not a second back end: cargo win cross-builds victory.exe with the gnu target, proton/run.sh starts it in a prefix (newest GE-Proton by default) with Z: links to the game data, and docs/proton.md carries the packages, commands and the Wine-dependent gaps. victory config and victory run now name the host - `host Wine <version>` - when the ntdll under them is Wine's, so logs say where they came from. Co-Authored-By: Qwen 3.8 Flash Next <noreply@qwen.ai> 🤖 Generated with [OpenCode](https://opencode.ai) (Qwen3.8 Flash)
- victory-core: wine_version gets a unit test (real hosts on both CIs say None; the Some side is covered by the smoke script below). - xtask: scripts.rs checks the proton/ launchers parse, are executable, and that run.sh --help works with nothing installed - the shell layer CI would otherwise never touch. - proton/smoke.sh: the end-to-end check, run on this box under GE-Proton11-11: config prints its paths and the host Wine banner, the title directory is reachable through the prefix, census runs against it. docs/proton.md records what that run proved and the four victory-gpu tests that vkd3d-proton / Wine's d3dcompiler do not yet satisfy (106 of 111 pass as a Windows binary under the prefix); host.rs now echoes the reason to stderr when no host device can be made, since test binaries run there without a log subscriber. Co-Authored-By: Qwen 3.8 Flash Next <noreply@qwen.ai> 🤖 Generated with [OpenCode](https://opencode.ai) (Qwen3.8 Flash)
cargo win-check and cargo win, the two commands docs/proton.md asks of a Linux box, now run on every PR: the Proton build path stops being a documentary claim. mingw-w64 for the linker, the gnu std from the setup action's targets input. The Proton smoke itself needs a GPU and a Proton install, so it stays a manual step. Co-Authored-By: Qwen 3.8 Flash Next <noreply@qwen.ai> 🤖 Generated with [OpenCode](https://opencode.ai) (Qwen3.8 Flash)
|
Three of your four Proton failures have a cause I measured on this box (CachyOS, RX 7900 XT, Mesa 26.3.1 RADV, Proton Experimental The two The builtin is the vendored vkd3d-shader, which has no The empty-pipeline-library one is not yours either: at And "a full One more Linux-only lever while you are here: |
… 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)
Wine's built-in d3d12 stub answers E_INVALIDARG and draws nothing, and the prefix only carries the vkd3d-proton copies if something forces the override; recent Proton usually does, hand-made prefixes do not, and a bogus DllOverrides value silently drops back to the stub mid-session. run.sh now defaults WINEDLLOVERRIDES=d3d12=n;d3d12core=n;dxgi=n when unset (user values still win). --texture-no-wait sets VICTORY_TEXTURE_NO_WAIT=1: under Wine the texture lane's remap-lock wait is a mapping lock that costs up to seconds per window while the world streams, and the flag trades up to two textures a frame, deferred one frame, to skip it (fxceless#178). .gitignore gains vkd3d-proton.cache, which a run with cwd at the repo root drops next to the launcher and the policy scan then rejects. Co-Authored-By: Qwen 3.8 Flash Next <noreply@qwen.ai> 🤖 Generated with [OpenCode](https://opencode.ai) (Qwen3.8 Flash)
host::compile is what the depth-plane twin and the plane pass compile with; the indirect clamp compiled through D3DCompile directly, so its failure had no home for a fallback. Route make_for through host::compile and give that path one: when a *_5_1 target is refused, retry the same source at the 5_0 profile (no inline shader of ours reaches for 5_1 features and D3D12 accepts 5_0 containers), reporting the original error if that fails too, and say which profile won. Honest scope: under Wine this helps a Win8-era d3dcompiler_47 - one that knows the [RootSignature(...)] syntax but not the 5_1 profile. It cannot rescue the June-2010 winetricks copy, which predates D3D12 and embeds no root signature at all; docs/proton.md says to copy the DLL from a Windows 10/11 install instead. With that DLL the victory-gpu suite under GE-Proton11-11 is now 109/111, the one failure being vkd3d's OpenPipelineLibrary expectation, matching the counts measured upstream. Co-Authored-By: Qwen 3.8 Flash Next <noreply@qwen.ai> 🤖 Generated with [OpenCode](https://opencode.ai) (Qwen3.8 Flash)
…s build of victory, launched inside a Proton prefix Part of #16 # Conflicts: # crates/victory-gpu/Cargo.toml # crates/victory-hle/Cargo.toml # crates/victory-shader/src/emit/mod.rs
ErRusso
left a comment
There was a problem hiding this comment.
Reviewed at 0f45997 against 2119b0e.
The Windows-build-in-Proton approach is sound and the smoke/test coverage is useful, but the launcher does not work as documented:
proton/run.shuses"$proton/proton" waitforexitandrun "$wexe". Proton'swaitforexitandruncallsg_session.run(), which invokessteam.exewith the arguments; it does not run the supplied executable.UMU_IDis not consulted by the Proton script. My own Proton Experimental test ofproton run ./victory.exelaunchedsteam.exe, whileruninprefixran victory. Useproton runinprefix(with the Wine-side exe) or$proton/files/bin/winedirectly, and adjustdocs/proton.md/smoke.shaccordingly.- The PR depends on #128, which currently fails its new
cargo fmt --all -- --checkCI step; that will block this PR too. Fix #128 or drop the fmt step before this lands. - The
getcompatpath/getnativepathprobing beforeSTEAM_COMPAT_DATA_PATH/WINEPREFIXare exported can fall back to the wrong prefix; export the environment first, then probe.
The wine_version() change and the Windows-tree CI job are otherwise fine.
|
A trap worth putting in Without scripted input the title sits at its start screen for ever — 30 fps, 13 draws a frame, takes it out of the menu into the world (2 067–2 752 draws a frame, 3 275–5 267 ms frames on this box). Two presses are not always enough; four at ~15-second spacing worked twice. That matters for anyone comparing runs on this ground: a run that never pressed anything looks identical to one where the loader is slow, and both look like "the PR made it stop loading" if you only read the frame line. For the launcher, pressing Enter on a schedule in a diagnostics build (or documenting the variable) would remove the whole class of confusion — the release build does not have the scripted keys, so a normal run needs them built with The rest of the run, for the record, with keys: |
A prefix that had never been initialised failed in the drain: the script created `dosdevices` and `Z:` before Proton's first setup, and Proton's `make_default_prefix` then hit them. Ask Proton for `C:\` first, derive the real prefix root, and only then seed `dosdevices` and `drive_z`. Selection now prefers every GE-Proton over a plain Proton-*, so a `Proton-9.0` no longer wins a version sort against a `GE-Proton10`. Export `WINEPREFIX`, `STEAM_COMPAT_DATA_PATH` and the Steam client path before probing: `getnativepath` is itself a Proton verb and derives the prefix from them. Set `UMU_ID` as well; the wait-and-forward path needs it to run Wine directly instead of injecting through `steam.exe`. `--d3dcompiler FILE` pins a Win8.1/10-era `d3dcompiler_47.dll` into the prefix's `system32` and forces it native — the working path for the `*_5_1` compiles and for the game's shaders. `VICTORY_TEXTURE_NO_WAIT` is now the default (`--texture-wait` opts out), and `--z` says so when Z: is `/` and the link is a no-op. Cover it with xtask tests: a fresh plain prefix, a fresh Proton pfx, `--d3dcompiler` pinning and native forcing, GE-over-Plain selection and the usage text. Co-Authored-By: DeepSeek v4.1 Flash <noreply@deepseek.com> 🤖 Generated with [OpenCode](https://opencode.ai) (DeepSeek V4.1 Flash)
The fork's status line still said the Proton path was untested beyond smoke tests, and section 4 still listed a full run as unproven. Both are now stale: fxceless#41 records a full run on AMD/RADV (menus, intro, loading and world streaming at 1 777–5 292 draws a frame), and the one prerequisite the report names is native d3d12/dxgi, which `run.sh` sets. Record the other facts that cost runs to find: - A fresh prefix is possible now; explain the `pfx` layout, the `pfx` `dosdevices` probe, and that GE-Proton 10+ maps Z: to `/`, so `--z` is a no-op and a host path is `Z:\mnt\games` rather than `Z:\games`. - A title that sits at 30 fps and 13 draws a frame for ever is the start screen waiting for a pad, not a loader: give the `VICTORY_KEYS` diagnostics recipe and note the release build has no scripted keys. - `--d3dcompiler FILE` and the native `d3dcompiler_47` requirement, including the `E5005` and `X3506` split between Wine's builtin and the 2010 redistributable. - The `inspect` blob name in the example is build-specific. - `--texture-wait` opts out of the default no-wait lane. Co-Authored-By: DeepSeek v4.1 Flash <noreply@deepseek.com> 🤖 Generated with [OpenCode](https://opencode.ai) (DeepSeek V4.1 Flash)
The Proton branch carries the Linux branch's `cargo fmt --all -- --check` step, but the tree's current formatting came from a newer rustfmt than the pinned 1.98.1 — `--check` reports roughly 250 locations across 60 files. Formatting is a separate change; dropping the gate keeps this PR about the launcher and the notes rather than mixing in the churn. Co-Authored-By: DeepSeek v4.1 Flash <noreply@deepseek.com> 🤖 Generated with [OpenCode](https://opencode.ai) (DeepSeek V4.1 Flash)
The review measured it: the current `winetricks -q d3dcompiler_47` installs a native Microsoft DLL (from Mozilla's fxc2) and the 5_1 compiles keep their root signature. An old June-2010 redistributable is the one that refuses the 5_1 profile and embeds no root signature. Say that plainly, and keep `--d3dcompiler FILE` as the offline alternative. Co-Authored-By: DeepSeek v4.1 Flash <noreply@deepseek.com> 🤖 Generated with [OpenCode](https://opencode.ai) (DeepSeek V4.1 Flash)
The first-run paragraph described the `../drive_z` link as universal and then said GE-Proton 10+ maps Z: to `/` instead. Say which prefix gets which, so a fresh GE-Proton prefix does not look like it should have a `drive_z`. Co-Authored-By: DeepSeek v4.1 Flash <noreply@deepseek.com> 🤖 Generated with [OpenCode](https://opencode.ai) (DeepSeek V4.1 Flash)
ErRusso
left a comment
There was a problem hiding this comment.
Reviewed the changes since 0f45997 (41c06a0..f23a465). My three blockers are addressed:
- Launcher: with
UMU_IDexported,waitforexitandrunruns the supplied Windows-side exe, notsteam.exe. I verified this against the installed GE-Proton11-14protonscript:run()setsumu_without_steamwhenUMU_IDis present and then usesargv = [wine] + sys.argv[2:]. My earlierruninprefixsuggestion was wrong for theUMU_IDpath; keepingwaitforexitandrunis correct because it still performs Proton's prefix setup. Thegetcompatpathargument is used correctly for the Wine side. - Prefix probing:
STEAM_COMPAT_DATA_PATH/WINEPREFIXare now exported beforegetnativepath/getcompatpath, so a fresh prefix cannot resolve through the wrong root. - fmt gate: dropped on this branch, with a comment explaining why. Restore it after #128 lands, since #128 now passes
cargo fmt --all -- --check.
The start-screen/VICTORY_KEYS note and the pinned native d3dcompiler_47 path in docs/proton.md match what the Linux reports found. The PR is CONFLICTING with main and still stacks on #128; rebase before merging.
LGTM once rebased.
|
The "Known Wine gap: without a pad the start screen sits at 30 fps and 13 draws a frame for ever" has a cause on the host side, and needs no change in the runtime. Under Wine, XInput reported a gamepad that never presses a button: the keyboard interface of a Logitech G502, an HID interface with The runtime's log tells the two apart:
With that, the native |
Depends on #128 (the Linux build work): these commits sit on top of its
linuxbranch, so until that merges this PR's diff also shows those changes.What this does
Supports running the Windows build of victory inside a Proton
prefix from a Linux box. The Windows build is already the title's full
host, and Proton supplies the same ground underneath it — Wine's loader,
D3D12 through dxvk/vkd3d-proton — so Linux support is a build path, a
launcher, and the evidence of what that ground actually gives, not a second
back end.
cargo wincross-buildsvictory.exewith the gnu target;cargo win-checktype-checks the whole Windows tree — tests included —from Linux (the true MSVC check stays the Windows CI job).
proton/run.shstarts it in a prefix. The prefix works on the firstrun: the launcher asks Proton for
C:\before seedingdosdevicesanddrive_z, so Proton's own first setup no longer trips over them.It picks the newest
GE-Proton*first, then the newest plainProton-*; takes--z DIR(a no-op where GE-Proton maps Z: to/),--config,--d3dcompiler FILEand--texture-wait; and returns thechild's exit code and stdout honestly (a UMU non-Steam launch through
waitforexitandrun, notsteam.exeinjection).victory_core::platform::wine_version()—victory configandvictory runprinthost Wine <version>, so a log says which host madeit.
docs/proton.mdcarries the packages, commands, prefix layout and theWine-dependent gaps.
What a GE-Proton11-11 run proved on a real box
proton/smoke.shpasses: config + banner, the title directory reachablethrough the prefix,
censusover it.victory-gpusuite as a Windows binary under the prefix:109 of 111 pass — device creation, every device level, fences, heaps,
copies, queue submission. Proton really does provide the D3D12 ground.
pipeline::library::tests::a_rejected_blob_gives_an_empty_library:vkd3d-proton errors on
OpenPipelineLibraryof a garbage blob where realD3D12 hands back an empty library. A platform expectation, not ours
(Add experimental Linux support via GE-Proton/umu and Nix shells #64).
cs_5_1tests depend on whichd3dcompiler_47is loaded.Wine's builtin (a vendored vkd3d-shader) fails loudly with
E5005— noRWByteAddressBufferintrinsics and no[RootSignature(...)]; theJune-2010 winetricks redistributable refuses the 5_1 profile (
X3506)and embeds no root signature at 5_0. A Win8.1/10-era native DLL, pinned
with
--d3dcompiler FILE, is the working path and the one behind the109/111 count.
victory rununder Proton works on AMD/RADV: menus, intro,loading, then world streaming at 1 777–5 292 draws a frame (docs: what a Linux/Proton run needs, and where its frame goes on RADV #41). The
smoke box has not recorded a full run; the numbers are machine-specific.
Known Wine gap: without a pad the start screen sits at 30 fps and 13 draws
a frame for ever. A diagnostics build can press Enter on a schedule with
VICTORY_KEYS(docs/proton.md); the release build has no scripted keys.Tests
Three depths: a
wine_version()unit test invictory-core(real hosts onboth CIs return
None);xtask/src/scripts.rschecking the launch scriptsparse and are executable, the usage text, a fresh plain prefix, GE-over-Plain
selection and
--d3dcompilerpinning/native forcing; andproton/smoke.shas the end-to-end Proton check.
CI
Adds a
windows-crossUbuntu job runningcargo win-checkandcargo winon every PR — the Proton build path stops being a documentary claim. The
smoke itself needs a GPU and a Proton install, so it stays manual.
The
fmtstep is dropped on this branch: the tree's current formattingcame from a newer rustfmt than the pinned 1.98.1, so
cargo fmt --all -- --checkreports hundreds of files. Reformatting is aseparate change.
This PR was AI assisted