Docs: Linux tests, cross-build, running under Proton; ignore vkd3d/DXVK caches #149

Closed
github-bot wants to merge 7 commits from gh-pr/149/head into gh-pr/149/base
Owner

@⁠SkippySteve on GitHub · 2026-11-24 00:58 UTC · original
docs/linux-proton → main · +250 −1 · 4 files · 7 commits · closed without merging

Linux/Proton contributor docs, plus the .gitignore entries for the shader caches Proton leaves in a checkout. Absorbs #220.

Summary

Adds docs/linux-proton.md and one link to it in the README's Getting started. Docs only, no code.

  • Where Linux stands: short status list: #90 (main doesn't build the whole workspace), #235 (cfg gates, closes #90), #232 (interim Linux CI subset + load_probe under Wine), #112, #191 (replaced #195), #241 (XDG data dir, config-relative paths).
  • Host tests: the exact commands #232's CI job runs (clippy on 7 crates + xtask, victory-shader lib, cargo test with the PE self-parse --skips), a note that TMPDIR must be outside the checkout, gh pr checkout 235 for the full workspace, and how to run the Windows test binaries under Wine. Tests use synthetic data only.
  • Native tools and #241: where the tools keep files on main (data under ~/.cache) vs with #241 (XDG cache/data, ~ expansion, Windows drive paths refused); none of it changes victory.exe under Proton.
  • Cross-build: victory.exe (release and diag) for x86_64-pc-windows-msvc with xwin, lld-link and clang-cl.
  • Running under Proton: umu-run, Z: paths for the VICTORY_* variables, and cmd.exe /c redirection because Proton drops the console. D3D12 goes through vkd3d-proton.
  • Wine-specific PRs: #41 and #53 are already on main. #76 is still open and needs a rebase.
  • Diagnostics: WARP, VICTORY_KEYS and VICTORY_STACKS take effect only in the diag build.
  • Not playable. Users supply their own files. Links to docs/asset-policy.md.

The outcomes in the doc come from one NVIDIA machine. They are listed only as observations.

Test plan

  • Current main (d2a4bae) on Arch Linux: #232's exact CI commands (policy, both clippy steps, cargo test with the skips) pass; test run gives 96 passed, 0 failed, 3 ignored

  • With TMPDIR inside the checkout, policy::tests::accepts_unrelated_directories fails with InsideRepo, as the doc says

  • main's default_dir puts the data folder under the cache base when LOCALAPPDATA is unset, as the doc says; the #241 behaviour is taken from its diff and description

  • Current main (d2a4bae) on Arch Linux: the doc's native subset (cargo check --all-targets on 7 crates, cargo test on 5) gives 89 passed, 0 failed, 3 ignored; cargo xtask policy 152 files ok

  • Current main (9aef3d9) on Arch Linux: cargo check -p victory-gpu fails with the E0425 the doc quotes

  • #112's head: cargo test --workspace --locked gives 165 passed, 0 failed, 3 ignored

  • Current main: the doc's cross-build commands build both release/victory.exe and diag/victory.exe

  • git merge-tree against main: #39, #112 and #76 each conflict, as the doc says

  • cargo xtask policy reports 152 files ok

  • No game files, paths, hashes or logs in the diff


Also: ignore Wine/Proton shader caches (was #220)

Running VIctory under Wine/Proton from a checkout leaves vkd3d-proton / DXVK shader caches in the working directory. Because cargo xtask policy checks untracked-but-not-ignored files too (git ls-files --others --exclude-standard), a stray vkd3d-proton.cache makes the policy check (and the pre-commit hook) fail:

POLICY: vkd3d-proton.cache: file type not on the allowlist
POLICY: vkd3d-proton.cache: binary content (NUL bytes)

Change

  • .gitignore: ignore vkd3d-proton.cache, vkd3d-proton.cache.write, vkd3d_shader_cache/, *.dxvk-cache, next to the other derived-data entries.
  • docs/asset-policy.md: one paragraph under "Where data lives" noting these are derived data and how to redirect them (VKD3D_SHADER_CACHE_PATH, DXVK_STATE_CACHE_PATH).

Testing

  • With dummy binary vkd3d-proton.cache before the change: cargo xtask policy fails as above.
  • After the change, with dummy vkd3d-proton.cache, vkd3d-proton.cache.write, x.dxvk-cache and vkd3d_shader_cache/a present: cargo xtask policy → asset policy: 151 files ok, and git status shows none of them.

No assets or binaries added.

**@⁠SkippySteve** on GitHub · 2026-11-24 00:58 UTC · [original](https://github.com/Marvisak/VIctory/pull/149) `docs/linux-proton` → `main` · +250 −1 · 4 files · 7 commits · closed without merging Linux/Proton contributor docs, plus the `.gitignore` entries for the shader caches Proton leaves in a checkout. Absorbs #220. ## Summary Adds `docs/linux-proton.md` and one link to it in the README's Getting started. Docs only, no code. - **Where Linux stands:** short status list: #90 (main doesn't build the whole workspace), #235 (cfg gates, closes #90), #232 (interim Linux CI subset + `load_probe` under Wine), #112, #191 (replaced #195), #241 (XDG data dir, config-relative paths). - **Host tests:** the exact commands #232's CI job runs (clippy on 7 crates + xtask, `victory-shader` lib, `cargo test` with the PE self-parse `--skip`s), a note that `TMPDIR` must be outside the checkout, `gh pr checkout 235` for the full workspace, and how to run the Windows test binaries under Wine. Tests use synthetic data only. - **Native tools and #241:** where the tools keep files on `main` (data under `~/.cache`) vs with #241 (XDG cache/data, `~` expansion, Windows drive paths refused); none of it changes `victory.exe` under Proton. - **Cross-build:** `victory.exe` (release and `diag`) for `x86_64-pc-windows-msvc` with xwin, `lld-link` and `clang-cl`. - **Running under Proton:** `umu-run`, `Z:` paths for the `VICTORY_*` variables, and `cmd.exe /c` redirection because Proton drops the console. D3D12 goes through vkd3d-proton. - **Wine-specific PRs:** #41 and #53 are already on `main`. #76 is still open and needs a rebase. - **Diagnostics:** WARP, `VICTORY_KEYS` and `VICTORY_STACKS` take effect only in the `diag` build. - **Not playable.** Users supply their own files. Links to `docs/asset-policy.md`. The outcomes in the doc come from one NVIDIA machine. They are listed only as observations. ## Test plan - [x] Current `main` (d2a4bae) on Arch Linux: #232's exact CI commands (policy, both clippy steps, `cargo test` with the skips) pass; test run gives 96 passed, 0 failed, 3 ignored - [x] With `TMPDIR` inside the checkout, `policy::tests::accepts_unrelated_directories` fails with `InsideRepo`, as the doc says - [x] `main`'s `default_dir` puts the data folder under the cache base when `LOCALAPPDATA` is unset, as the doc says; the #241 behaviour is taken from its diff and description - [x] Current `main` (d2a4bae) on Arch Linux: the doc's native subset (`cargo check --all-targets` on 7 crates, `cargo test` on 5) gives 89 passed, 0 failed, 3 ignored; `cargo xtask policy` 152 files ok - [x] Current `main` (9aef3d9) on Arch Linux: `cargo check -p victory-gpu` fails with the E0425 the doc quotes - [x] #112's head: `cargo test --workspace --locked` gives 165 passed, 0 failed, 3 ignored - [x] Current `main`: the doc's cross-build commands build both `release/victory.exe` and `diag/victory.exe` - [x] `git merge-tree` against `main`: #39, #112 and #76 each conflict, as the doc says - [x] `cargo xtask policy` reports 152 files ok - [x] No game files, paths, hashes or logs in the diff --- ## Also: ignore Wine/Proton shader caches (was #220) Running VIctory under Wine/Proton from a checkout leaves vkd3d-proton / DXVK shader caches in the working directory. Because `cargo xtask policy` checks untracked-but-not-ignored files too (`git ls-files --others --exclude-standard`), a stray `vkd3d-proton.cache` makes the policy check (and the pre-commit hook) fail: ``` POLICY: vkd3d-proton.cache: file type not on the allowlist POLICY: vkd3d-proton.cache: binary content (NUL bytes) ``` ## Change - `.gitignore`: ignore `vkd3d-proton.cache`, `vkd3d-proton.cache.write`, `vkd3d_shader_cache/`, `*.dxvk-cache`, next to the other derived-data entries. - `docs/asset-policy.md`: one paragraph under "Where data lives" noting these are derived data and how to redirect them (`VKD3D_SHADER_CACHE_PATH`, `DXVK_STATE_CACHE_PATH`). ## Testing - With dummy binary `vkd3d-proton.cache` before the change: `cargo xtask policy` fails as above. - After the change, with dummy `vkd3d-proton.cache`, `vkd3d-proton.cache.write`, `x.dxvk-cache` and `vkd3d_shader_cache/a` present: `cargo xtask policy` → `asset policy: 151 files ok`, and `git status` shows none of them. No assets or binaries added.
The Proton example ran $PWD/victory.exe, which only exists if copied
there, and wrote host.out.log/host.err.log into the repository root.
Point it at target/x86_64-pc-windows-msvc/release/victory.exe and put
the logs in a per-run folder under ~/.local/share/victory/logs.
The host-test block now lists exactly what #232's job runs (clippy on
seven crates plus xtask, victory-shader lib, cargo test with the PE
self-parse skips). Add the TMPDIR-inside-checkout failure, and a section
on where native tools keep files on main versus with #241.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:52:15 +00:00
github-bot closed this pull request 2026-11-26 03:52:15 +00:00
Author
Owner

@⁠SkippySteve on GitHub · 2026-11-24 01:09 UTC · original

@⁠LaunchDoesntCode thanks for the review. You're right on both counts: those were copy-paste mistakes from my own setup. Fixed in 1fdb325.

What changed

  • The run command now uses the cargo output directly: VICTORY_BIN=$PWD/target/x86_64-pc-windows-msvc/release/victory.exe (swap in .../diag/victory.exe for the diagnostics build). If you copy the exe somewhere else, point VICTORY_BIN at that copy instead. It should still be outside the repo.
  • host.out.log / host.err.log now go to a per-run folder outside the checkout: LOGS=$HOME/.local/share/victory/logs/$(date +%Y%m%d-%H%M%S), created with mkdir -p before the run.

How the Linux/Proton flow fits together, in case it helps when you try it:

  1. On Linux you cross-build a Windows PE, victory.exe. That is the host, and the title runs inside that Windows process. Nothing in this flow is a native Linux binary.
  2. Under Proton/umu, the Linux filesystem appears as the Z: drive. So every path the host sees (game dir, cache, data, the exe itself, log files) is an absolute Linux path written as Z:\home\.... The little z() helper in the example does that conversion: $HOME/.local/share/victory/logs/<run>/host.out.log becomes Z:\home\<you>\.local\share\victory\logs\<run>\host.out.log.
  3. Proton doesn't pass the host console through, so the example wraps the run in cmd.exe /c and redirects stdout/stderr to files. Otherwise you get no host log at all.
  4. Asset policy: game files, cache, data and host logs all stay outside the git checkout, and the VICTORY_* variables just point at those folders. The only thing the example reads from inside the repo is the build output under target/, which is already gitignored.

If you get umu-run installed and something still doesn't line up, let me know.

**@⁠SkippySteve** on GitHub · 2026-11-24 01:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/149#issuecomment-7118806972) @⁠LaunchDoesntCode thanks for the [review](https://git.gtahub.st/github/Marvisak--VIctory/pulls/149). You're right on both counts: those were copy-paste mistakes from my own setup. Fixed in 1fdb325. **What changed** - The run command now uses the cargo output directly: `VICTORY_BIN=$PWD/target/x86_64-pc-windows-msvc/release/victory.exe` (swap in `.../diag/victory.exe` for the diagnostics build). If you copy the exe somewhere else, point `VICTORY_BIN` at that copy instead. It should still be outside the repo. - `host.out.log` / `host.err.log` now go to a per-run folder outside the checkout: `LOGS=$HOME/.local/share/victory/logs/$(date +%Y%m%d-%H%M%S)`, created with `mkdir -p` before the run. **How the Linux/Proton flow fits together**, in case it helps when you try it: 1. On Linux you cross-build a Windows PE, `victory.exe`. That is the host, and the title runs inside that Windows process. Nothing in this flow is a native Linux binary. 2. Under Proton/umu, the Linux filesystem appears as the `Z:` drive. So every path the host sees (game dir, cache, data, the exe itself, log files) is an absolute Linux path written as `Z:\home\...`. The little `z()` helper in the example does that conversion: `$HOME/.local/share/victory/logs/<run>/host.out.log` becomes `Z:\home\<you>\.local\share\victory\logs\<run>\host.out.log`. 3. Proton doesn't pass the host console through, so the example wraps the run in `cmd.exe /c` and redirects stdout/stderr to files. Otherwise you get no host log at all. 4. Asset policy: game files, cache, data and host logs all stay outside the git checkout, and the `VICTORY_*` variables just point at those folders. The only thing the example reads from inside the repo is the build output under `target/`, which is already gitignored. If you get `umu-run` installed and something still doesn't line up, let me know.
Author
Owner

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

Added a short section, Tools on Linux vs running the title: the file-only subcommands (inspect, census, lib-exports, shader-info, translate, config) can build as a native Linux ELF once the workspace Linux gates land (#112, tracking #90), while victory run stays the cross-built victory.exe under Proton. It mentions a local, unmerged test where shader translation ran on the host without Wine; it does not claim that work is merged.

**@⁠SkippySteve** on GitHub · 2026-11-24 01:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/149#issuecomment-7119012222) Added a short section, **Tools on Linux vs running the title**: the file-only subcommands (`inspect`, `census`, `lib-exports`, `shader-info`, `translate`, `config`) can build as a native Linux ELF once the workspace Linux gates land (#112, tracking #90), while `victory run` stays the cross-built `victory.exe` under Proton. It mentions a local, unmerged test where shader translation ran on the host without Wine; it does not claim that work is merged.
Author
Owner

@⁠DaviTostes on GitHub · 2026-11-24 01:28 UTC · original

Docs-only, so nothing to run, but I checked the claims it makes:

  • main at d2a4bae still fails on Linux with E0425: cannot find function 'host_resource' in this scope (victory-gpu/src/resource.rs), so the note is accurate; #39 and #112 are both still open.
  • The xwin/lld-link/clang-cl cross-build instructions match the setup used here (Arch, cargo-xwin 0.24.1, lld-link from LLVM) and work.
  • Overlap: #191 adds a Proton launcher + smoke test and #195 adds cross-compile docs; this doc, #191 and #195 cover the same Linux/Proton material. One of them should own it.

No game data used.

**@⁠DaviTostes** on GitHub · 2026-11-24 01:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/149#issuecomment-7119136847) Docs-only, so nothing to run, but I checked the claims it makes: - `main` at `d2a4bae` **still fails** on Linux with `E0425: cannot find function 'host_resource' in this scope` (`victory-gpu/src/resource.rs`), so the note is accurate; #39 and #112 are both still open. - The xwin/`lld-link`/`clang-cl` cross-build instructions match the setup used here (Arch, cargo-xwin 0.24.1, `lld-link` from LLVM) and work. - Overlap: **#191** adds a Proton launcher + smoke test and **#195** adds cross-compile docs; this doc, #191 and #195 cover the same Linux/Proton material. One of them should own it. No game data used.
Author
Owner

@⁠SkippySteve on GitHub · 2026-11-24 01:29 UTC · original

Polished in bcf732a after reviewing #195 (docs only, branch is current with main):

  • The Proton run steps now set VKD3D_SHADER_CACHE_PATH to a folder outside the checkout, so a stray vkd3d-proton.cache no longer trips cargo xtask policy.
  • Points to the open PRs #195 (Linux cross-build, Wine host stubs) and #191 (Proton launcher, smoke test). This page keeps the Proton/umu run steps.
  • Short note on indirect draws under Wine: D3DCompile can refuse the argument clamp (#170). The open fixes #178 (DXC fallback) and #190 (hand-written DXIL) conflict, so only one should be merged. Measurements are in the comments on those PRs.
**@⁠SkippySteve** on GitHub · 2026-11-24 01:29 UTC · [original](https://github.com/Marvisak/VIctory/pull/149#issuecomment-7119156928) Polished in bcf732a after reviewing #195 (docs only, branch is current with `main`): - The Proton run steps now set `VKD3D_SHADER_CACHE_PATH` to a folder outside the checkout, so a stray `vkd3d-proton.cache` no longer trips `cargo xtask policy`. - Points to the open PRs #195 (Linux cross-build, Wine host stubs) and #191 (Proton launcher, smoke test). This page keeps the Proton/umu run steps. - Short note on indirect draws under Wine: `D3DCompile` can refuse the argument clamp (#170). The open fixes #178 (DXC fallback) and #190 (hand-written DXIL) conflict, so only one should be merged. Measurements are in the comments on those PRs.
Author
Owner

@⁠Dathinel on GitHub · 2026-11-24 06:16 UTC · original

One small PR-description edit would keep the Linux build issue open until the build fix lands. GitHub currently lists #90 in this PR's closingIssuesReferences. Could you change #235 (cfg gates, closes #90) to #235 (cfg gates for #90)? That preserves both links and lets #235 close the issue when its code merges.

**@⁠Dathinel** on GitHub · 2026-11-24 06:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/149#issuecomment-7123759101) One small PR-description edit would keep the Linux build issue open until the build fix lands. GitHub currently lists #90 in this PR's `closingIssuesReferences`. Could you change `#235 (cfg gates, closes #90)` to `#235 (cfg gates for #90)`? That preserves both links and lets #235 close the issue when its code merges.

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/Marvisak--VIctory!149
No description provided.