Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
dd6f75a
GPU: compile the indirect-argument clamp with DXC when the system com…
Ortomanic Nov 24, 2026
0012266
Build: compile and test the workspace on Linux again
spidercraft Nov 24, 2026
dbbe37d
Wine: fall back where ws2_32 lacks exports; hook and cfg fixes
Naitrate Nov 24, 2026
920cc3f
CI: interim Linux check/test for crates that already build
Nov 24, 2026
f435ad1
GPU: look for dxcompiler.dll explicitly; log DXC errors
Ortomanic Nov 24, 2026
e72d9dd
Loader: skip the load_probe cargo build under Wine
Nov 24, 2026
e532431
CI: widen the Linux subset to clippy and more tests
Nov 24, 2026
78a6ad1
CI: type-check the Windows target from Linux; clearer load_probe preb…
Nov 24, 2026
e325f70
CI: clippy the hle-probe fixture for the Windows target
Nov 24, 2026
26b4892
Loader: pin load_probe's fixture build to the test's Windows target
Nov 24, 2026
70ef98d
CI: clippy victory-gpu's library for the Windows target
Nov 24, 2026
b89f5db
Loader: load_probe finds version.dll under %SystemRoot%
Nov 24, 2026
8649d1b
CI: keep checkout token out of .git, save rust-cache only from main, …
Nov 24, 2026
4420e2b
CI: deny rustc warnings in the Windows-target job
Nov 24, 2026
fab4a2c
CI: never cancel main runs; rustfmt-check the hle-probe fixture
Nov 24, 2026
89f5c17
CI: pin actions to commit SHAs; print backtraces on failure
Nov 24, 2026
2030972
CI: rustfmt-check the packages that are already clean
Nov 24, 2026
75db3aa
Loader: build load_probe's fixture under CARGO_TARGET_TMPDIR
Nov 24, 2026
14e3c18
CI: lint the workflow with a pinned, checksum-verified actionlint
Nov 24, 2026
1d7718d
CI: deny rustdoc warnings for the doc-clean crates; retry the actionl…
Nov 24, 2026
8348b59
Loader: name the cargo path and exit status when load_probe's fixture…
Nov 24, 2026
7e18008
CI: deny rustdoc warnings for the Windows target's doc-clean crates
Nov 24, 2026
0e8fa31
CI: lint private items' rustdoc too; put the fixture rustfmt comment …
Nov 24, 2026
e05bebf
CI: deny rustdoc warnings for victory-shader and victory-gpu on both …
Nov 24, 2026
b99e2a2
CI: clippy all of victory-gpu's targets for Windows; document the WAR…
Nov 24, 2026
48e319f
CI: build and lint the diagnostics feature code too
Nov 24, 2026
e79f454
CI: lint the rustdoc of feature-gated (diagnostics, host) code too
Nov 24, 2026
da1c8cd
CI: hle-probe fixture gets the workspace lints; SAFETY comments on it…
Nov 24, 2026
4630313
CI: clippy victory-shader's test target on Linux too
Nov 24, 2026
07f3e6f
CI: clippy victory-hle and apps/victory for the Windows target
Nov 24, 2026
1cd16cf
CI: audit the workflows with a pinned zizmor (template injection, per…
Nov 24, 2026
f668779
CI: catch unquoted shell expansions across workflows
Nov 24, 2026
5cf48e1
CI: fail actionlint when shellcheck is missing instead of skipping ru…
Nov 24, 2026
462e66d
CI: run every step under pipefail and enable ShellCheck's optional ch…
Nov 24, 2026
01cbc06
CI: run steps under nounset and require braced variable references
Nov 24, 2026
87e687a
CI: pin ShellCheck for actionlint and enable its two newer optional c…
Nov 24, 2026
7811add
CI: inherit errexit in command substitutions; HTTPS-only tool downloads
Nov 24, 2026
d2eb9b6
CI: run zizmor with the pedantic persona; name both jobs after their ids
Nov 24, 2026
6ae56fc
Merge remote-tracking branch 'upstream/main' into fj232
Nov 24, 2026
68b569a
CI: clippy victory-hle and apps/victory with the other Windows crates
Nov 24, 2026
13f69fc
CI: per-job token permissions; zizmor auditor persona with strict col…
Nov 24, 2026
79d7950
CI: pin the runner image to ubuntu-24.04 instead of ubuntu-latest
Nov 24, 2026
cde5de3
CI: actionlint 1.7.12; cap each release download's connect and total …
Nov 24, 2026
5e2ec61
Merge remote-tracking branch 'upstream/main' into fj232
Nov 24, 2026
2deb039
Merge remote-tracking branch 'upstream/main' into fj232
Nov 24, 2026
9b9c45d
CI: ShellCheck ignores .shellcheckrc; rustup never self-updates
Nov 24, 2026
f615147
CI: actionlint and zizmor ignore repo config files
Nov 24, 2026
b7df94a
CI: ShellCheck the git hooks and tracked shell scripts, not only run:…
Nov 24, 2026
6d23435
CI: ShellCheck also finds extensionless shell scripts by shebang; NUL…
Nov 24, 2026
177b55e
CI: the asset-policy step runs xtask with --locked, so it cannot rewr…
Nov 24, 2026
f13ac59
CI: rustdoc lints victory-formats and victory-loader too, now that bo…
Nov 24, 2026
537dd36
Merge remote-tracking branch 'upstream/main' into HEAD
Nov 24, 2026
55ff7bd
CI: pin ci.yml's actions so linux-subset's zizmor step passes
Nov 24, 2026
21dd7d9
CI: fail when a workspace member is missing from the hand-written cra…
Nov 24, 2026
bf0afda
CI: fail when a LINUX_CRATES crate is missing from RUSTDOC_CRATES
Nov 24, 2026
41f3ce2
CI: run the Linux tests with all features on too
Nov 24, 2026
05842bc
CI: fail when the Linux build or tests change the checkout
Nov 24, 2026
18dfbfa
CI: fail when the Windows-target check changes the checkout
Nov 24, 2026
5d10ec7
CI: fail when a crate or the hle-probe fixture drifts from the worksp…
Nov 24, 2026
493ea1b
CI: fail when a step leaves gitignored files outside target/ in the c…
Nov 24, 2026
036c260
CI: fail on text files stored with CRLF endings or left with conflict…
Nov 24, 2026
f7a0075
CI: fail on tracked symlinks and on executable files without a #! line
Nov 24, 2026
ce3303d
CI: type-check with the declared rust-version (MSRV), not only the pi…
Nov 24, 2026
03122f0
CI: fail when a member stops inheriting edition, license or publish, …
Nov 24, 2026
906f5c8
CI: fail on trailing spaces or tabs, or a last line with no newline, …
Nov 24, 2026
f472144
CI: fail on UTF-8 byte-order marks (U+FEFF) in tracked text files
Nov 24, 2026
495c3f0
CI: fail on tracked paths Windows cannot check out (case-only collisi…
Nov 24, 2026
ce69883
Merge remote-tracking branch 'origin/main' into expand-232-mr
Nov 24, 2026
29338a3
CI: check each crate on its own, so workspace feature unification can…
Nov 24, 2026
e9c5607
CI: fail on a locked dependency that is not a checksummed crates.io r…
Nov 24, 2026
1599f2c
CI: fail when rust-toolchain.toml is not one exact release no older t…
Nov 24, 2026
befea76
CI: run cargo test with a fresh TMPDIR and fail when a test leaves fi…
Nov 24, 2026
3de9d70
CI: run cargo test with a fresh HOME and no XDG dirs, and fail when a…
Nov 24, 2026
ab9dec3
CI: run cargo test with no network, in its own network namespace with…
Nov 24, 2026
555c109
CI: run cargo test in the release and diag profiles too, without debu…
Nov 24, 2026
eb635f7
GPU: sign unsigned indirect-clamp DXIL from the fallback compiler
aycow Nov 24, 2026
a3a4c10
CI: run cargo test in an empty environment, keeping only what Cargo, …
Nov 24, 2026
30fb5d6
CI: run the hermetic #[ignore] benchmarks, and fail on an ignored tes…
Nov 24, 2026
78d1449
CI: run cargo test with HOME and TMPDIR under a path with a space and…
Nov 24, 2026
51d272d
CI: run cargo test under umask 077, and fail unless the tests see it
Nov 24, 2026
e3bf436
CI: serial release tests under hermetic env; guard msrv checkout
Nov 24, 2026
2c83383
CI: pin POSIX locale and reconcile ignores in all four test passes
Nov 24, 2026
4828716
GPU: build the indirect argument clamp with Wine's compiler too
Nov 24, 2026
e5a8c2f
GPU: ask for an empty pipeline library with a null blob
Nov 24, 2026
d469fe9
HLE: fail WSAConnectByList and GetAddrInfoExA where the host lacks them
Nov 24, 2026
4782660
Shader tests: skip the DXIL hash refusal check under Wine
Nov 24, 2026
45aceea
Shaders: one returning block per program
Nov 24, 2026
6f732b6
GPU: mirror heap slots the title writes into its own memory
Nov 24, 2026
c69bd9a
GPU: bind root SRVs as bounded one-view tables
Nov 24, 2026
4f9aa10
Watch: ask the kernel once per range per submission under Wine
Nov 24, 2026
b7cc788
Docs: running on Linux under Proton
Nov 24, 2026
27eefe4
Watch: under Wine, ask about whole allocations, cached, once per subm…
Nov 24, 2026
9823139
GPU diagnostics: VICTORY_SHOW_TARGET presents an intermediate target
Nov 24, 2026
45e24f9
Shaders, GPU: a debug pixel shader for geometry, and as a fallback
Nov 24, 2026
0496398
GPU: VICTORY_PIPELINE_WAIT_MS sets the per-frame pipeline wait
Nov 24, 2026
2115124
Docs: system Wine on Linux, and the new diagnostics switches
Nov 24, 2026
3b02433
Add Linux GE-Proton development workflow
MiguVT Nov 24, 2026
118e42f
Fix the Linux build and clippy gates
Jitheswar Nov 24, 2026
993dff8
GPU: refresh title heap writes inside the submission lock
Nov 24, 2026
b0933f5
Preserve Windows imports in the cross-platform build
Nov 24, 2026
67f8034
xtask: wine-test runs the Windows tests on a Linux host under Wine
neonbyte1 Nov 24, 2026
b3e39e7
xtask: wine-test keeps an xwin directory with spaces in one argument
neonbyte1 Nov 24, 2026
1bca68e
Merge upstream PR #994: Linux under Proton + world GPU fault fixes
Personed Nov 24, 2026
f4a8dcf
Merge upstream PR #1218
Personed Nov 24, 2026
d5a0201
Merge upstream PR #1011
Personed Nov 24, 2026
55ce19f
Merge upstream PR #217
Personed Nov 24, 2026
229da87
Merge upstream PR #178
Personed Nov 24, 2026
6e789bd
Merge upstream PR #232
Personed Nov 24, 2026
e065d18
Merge upstream PR #523
Personed Nov 24, 2026
ed51523
Merge upstream PR #1017
Personed Nov 24, 2026
eecb006
xtask(policy): allow .nix dev-env files (upstream #1011 ships shell.nix)
Personed Nov 24, 2026
ca3e2a1
Scripts: brace all variable references (shellcheck SC2250)
Personed Nov 24, 2026
42997ad
cargo fmt (satisfy linux CI format check)
Personed Nov 24, 2026
ff8ffdc
gpu(tests): place SAFETY comments on unsafe blocks (clippy)
Personed Nov 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .githooks/pre-commit
100644 → 100755
Empty file.
31 changes: 25 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,44 @@ on:
push:
branches: [main]

permissions:
contents: read
# No token permissions by default; the job grants only what it uses.
permissions: {}

# A newer push to a PR cancels its older run. Runs on main are never
# cancelled: only main saves the rust-cache, so a cancelled main run would
# leave PRs restoring a stale cache.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

env:
CARGO_TERM_COLOR: always

jobs:
# The name repeats the id, so the required check stays `check`.
check:
name: check
runs-on: windows-latest
# checkout only.
permissions:
contents: read
timeout-minutes: 60
steps:
- uses: actions/checkout@v5
# Actions are pinned to full commit SHAs (tag in the trailing comment):
# a tag can be moved to other code, a commit cannot. Bump both together.
# Nothing here pushes; keep the token out of .git/config.
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
persist-credentials: false
# The version and components pinned in rust-toolchain.toml.
- run: rustup toolchain install
- uses: Swatinem/rust-cache@v2
# --no-self-update: rustup would otherwise replace itself with whatever
# release is newest that day, unpinned and mid-job.
- run: rustup toolchain install --no-self-update
# Save the cache only from main: PR runs restore it but do not write
# their own entries, which would evict main's from the 10 GB quota.
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Clippy
run: cargo clippy --workspace --all-targets --locked -- -D warnings
- name: Clippy, diagnostics build
Expand Down
1,149 changes: 1,149 additions & 0 deletions .github/workflows/linux-subset.yml

Large diffs are not rendered by default.

45 changes: 42 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ loads the world, where rendering fails.
| Loading into the world (about 50 s) | works |
| The world (first mission's intro) | reached and runs with indirect draws; its title card renders, the scene after it is still dark; 0.5-1.8 s per frame |

Tested on one machine: Windows 11, AMD RX 6700 XT.
Tested on one machine: Windows 11, AMD RX 6700 XT; and on Linux under
Proton Experimental: CachyOS, AMD RX 9070 XT (see
[docs/linux-proton.md](docs/linux-proton.md)).

> **Warning.** Entering the world on a real GPU can currently hang it, and
> Windows then resets the display driver (every monitor goes black for a
Expand All @@ -46,19 +48,43 @@ What each part does today and what it still needs:

## Getting started

Requirements: Windows 10/11 x64, a CPU with AVX2, a Direct3D 12 GPU with
Community reports show the Windows-target build running on Linux under
Wine/Proton with vkd3d-proton. This is experimental; see
[Linux + Wine/Proton](docs/linux-wine.md) for the reported setup and caveats.
The project does not currently build as a native Linux application; cross-build
the Windows executable and run it under Wine/Proton instead.

Windows requirements: Windows 10/11 x64, a CPU with AVX2, a Direct3D 12 GPU with
shader model 6.6 (and mesh shaders for the world), Rust (pinned in
`rust-toolchain.toml`).

Under Wine or Proton, indirect execution also needs DXC's `dxcompiler.dll` (with
its `dxil.dll`): Wine's `d3dcompiler_47` cannot compile the indirect-argument
clamp. It is looked for in `VICTORY_DXC` (the DLL or its folder), beside the
`dxil.dll` that shader validation finds, then the executable's folder and System32.

The title also needs several GiB of available Windows commit at startup.
Check **Committed** under **Task Manager → Performance → Memory**. If
`crashes.log` reports Windows error 1455, close other applications or increase
the Windows paging file size, then retry.

On Linux, enter the Nix development shell and build the Windows executable:

```sh
nix-shell
cargo xwin build --release -p victory --target x86_64-pc-windows-msvc
./scripts/run-ge-proton.sh
```

The launch helper defaults to the supplied game path and uses an installed
GE-Proton release; pass a different executable path to override it.

On Windows, run the workspace tests and install the asset-policy hook:

```powershell
cargo test --workspace # needs no game data
cargo xtask install-hooks # asset-policy check on every commit
copy victory.example.toml victory.toml # then set your paths (outside the repo)
cargo test --workspace # needs no game data
cargo run -p victory -- config # check your paths
```

Expand All @@ -85,6 +111,19 @@ title's window has focus:
| F / H | stick clicks |
| Esc, Tab | Menu, View |

### Linux (Proton)

VIctory also runs on Linux under Proton Experimental, built with
`cargo-xwin`, and gets as far there as on Windows: see
[docs/linux-proton.md](docs/linux-proton.md) and `scripts/proton-run.sh`.

Tests on a Linux host, under Wine: `cargo xtask wine-test` cross-builds the
Windows test binaries (clang-cl, lld-link and llvm-lib on `PATH`, the MSVC CRT
and Windows SDK from `xwin splat --output ~/.xwin`) and runs them in a Wine
prefix of their own under `target/`. `--vkd3d-proton <dir>` puts that
folder's `d3d12.dll` and `d3d12core.dll` into the prefix (Wine's own D3D12
has no shader model 6.6); arguments after `--` go to `cargo test`.

## Commands

```
Expand Down
2 changes: 1 addition & 1 deletion apps/victory/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use clap::{Parser, Subcommand, ValueEnum};
#[command(
name = "victory",
version,
about = "Run an Xbox Series title natively on Windows"
about = "Inspect and translate Xbox Series title files; run titles on Windows"
)]
struct Cli {
#[command(subcommand)]
Expand Down
4 changes: 3 additions & 1 deletion apps/victory/src/run.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use std::path::Path;

use anyhow::{Context, Result};
#[cfg(windows)]
use anyhow::Context;
use anyhow::Result;

use crate::{Console, Unimplemented};

Expand Down
113 changes: 97 additions & 16 deletions apps/victory/src/translate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ use std::sync::Mutex;
use std::sync::atomic::{AtomicUsize, Ordering};

use anyhow::Result;
#[cfg(not(windows))]
use unsupported::{Host, Validator, host};
use victory_shader::emit;
#[cfg(windows)]
use victory_shader::emit::host::{self, Host};
use victory_shader::emit::{self, validator::Validator};
#[cfg(windows)]
use victory_shader::emit::validator::Validator;
use victory_shader::structure::{self, Atom, LaneExit};
use victory_shader::{
Container, FourCC, HwStage, NativeProgram, RootType, ShaderError, ir, native_programs,
Expand Down Expand Up @@ -160,6 +165,12 @@ pub fn run(
jobs: Option<usize>,
) -> Result<()> {
let paths = crate::default_paths(paths)?;
// The validator and the host checks are Windows-only; on other hosts
// they are skipped with a note instead of failing.
let validate_requested = validate;
let pipelines_requested = pipelines;
let validate = validate && cfg!(windows);
let pipelines = pipelines && cfg!(windows);
let dll = validate.then(Validator::default_path).flatten();
if validate {
Validator::load(dll.as_deref()).map_err(anyhow::Error::msg)?;
Expand All @@ -168,9 +179,13 @@ pub fn run(
dll.as_ref()
.map_or("dxil.dll".into(), |p| p.display().to_string())
);
} else if validate_requested {
println!("validator skipped (Windows only)");
}
if pipelines {
Host::new(false).map_err(anyhow::Error::msg)?;
} else if pipelines_requested {
println!("host pipelines skipped (Windows only)");
}
let pairs: Vec<(String, String)> = std::env::var("VICTORY_PAIRS")
.unwrap_or_default()
Expand Down Expand Up @@ -271,22 +286,29 @@ pub fn run(
t.ms_emitted, t.ms_programs, t.ms_validated, t.ms_pipelines
);
if !pairs.is_empty() {
let host = Host::new(false).map_err(anyhow::Error::msg)?;
let kept = lock(&kept);
let find = |name: &str| kept.iter().find(|(l, _)| l.contains(name));
for (v, p) in &pairs {
let made = match (find(v), find(p)) {
(Some((_, vs)), Some((_, ps))) => if vs.stage == HwStage::Ms {
host.mesh_pipeline(vs, ps)
} else {
host.pipeline(vs, ps)
}
.map(|_| "pipeline created".to_owned())
.unwrap_or_else(|e| e),
_ => "not emitted".to_owned(),
};
println!("pair {v} + {p}: {made}");
// The host check is Windows-only: without a host device the
// pairs are not checked at all.
#[cfg(windows)]
{
let host = Host::new(false).map_err(anyhow::Error::msg)?;
let kept = lock(&kept);
let find = |name: &str| kept.iter().find(|(l, _)| l.contains(name));
for (v, p) in &pairs {
let made = match (find(v), find(p)) {
(Some((_, vs)), Some((_, ps))) => if vs.stage == HwStage::Ms {
host.mesh_pipeline(vs, ps)
} else {
host.pipeline(vs, ps)
}
.map(|_| "pipeline created".to_owned())
.unwrap_or_else(|e| e),
_ => "not emitted".to_owned(),
};
println!("pair {v} + {p}: {made}");
}
}
#[cfg(not(windows))]
println!("host pipelines skipped (Windows only)");
}
let mut lines = t.lines;
lines.sort();
Expand Down Expand Up @@ -669,3 +691,62 @@ fn tally_structured(program: &ir::Program, s: &structure::Structured, t: &mut Ta
fn lock<T>(m: &Mutex<T>) -> std::sync::MutexGuard<'_, T> {
m.lock().unwrap_or_else(|e| e.into_inner())
}

/// `--validate` and `--pipelines` need the host's DXIL validator and D3D12
/// device, which only Windows has; elsewhere they refuse to start.
#[cfg(not(windows))]
mod unsupported {
use std::path::{Path, PathBuf};

use victory_shader::emit::HostShader;

const WHY: &str = "needs Windows (the host DXIL validator and D3D12)";

pub struct Validator;

impl Validator {
pub fn default_path() -> Option<PathBuf> {
None
}

pub fn load(_: Option<&Path>) -> Result<Self, String> {
Err(WHY.into())
}

pub fn validate(&mut self, _: &mut [u8]) -> Result<(), String> {
Err(WHY.into())
}
}

pub struct Host;

impl Host {
pub fn new(_warp: bool) -> Result<Self, String> {
Err(WHY.into())
}

pub fn pipeline(&self, _: &HostShader, _: &HostShader) -> Result<(), String> {
Err(WHY.into())
}

pub fn mesh_pipeline(&self, _: &HostShader, _: &HostShader) -> Result<(), String> {
Err(WHY.into())
}

pub fn compute_pipeline(&self, _: &HostShader) -> Result<(), String> {
Err(WHY.into())
}
}

pub mod host {
use victory_shader::emit::HostShader;

pub fn stub_ps() -> HostShader {
unreachable!("Host::new fails first")
}

pub fn stub_vs(_: &HostShader) -> Result<HostShader, String> {
Err(super::WHY.into())
}
}
}
Loading
Loading