Skip to content

Build: pin Rust toolchain to 1.96.0 and enforce Cargo.lock (FIx #2214) - #2295

Open
WASDeKeys wants to merge 27 commits into
xcl-dev:mainfrom
WASDeKeys:pin-rust-toolchain
Open

WASDeKeys wants to merge 27 commits into
xcl-dev:mainfrom
WASDeKeys:pin-rust-toolchain

Conversation

@WASDeKeys

@WASDeKeys WASDeKeys commented Nov 25, 2026 •

Copy link
Copy Markdown

Fixes #2214 — https://github.com/xcl-de
v/xcl/issues/2214

What is in it

  • Pin Rust toolchain to 1.96.0 and
    enforce Cargo.lock in CI and
    scripts/test.ps1 — Cargo.toml,
    Cargo.lock, rust-toolchain.toml

Tested

  • hardware (GPU + driver, CPU), Windows
    11 Home Single Language 10.0.26200,
    NVIDIA GeForce RTX 3050 6GB Laptop GPU,
    Rust 1.96.0, release
  • cargo test --workspace -- --test-threads=4: 1098 passed, 0
    failed, 26 ignored, 24 skipped
  • SKIPPED GPU tests on your adapter:
    24 (no wave64, etc.)
  • game checked: 21222967 — smoke tests
    ran on both branches with 60 seconds
    each

Regression run

  • main:
xcl-smoke v1
commit: 082944135cd2b96288470a595861fa608eee08dc
gpu: NVIDIA GeForce RTX 3050 6GB Laptop GPU
title: 2b8d9c34
seconds: 60
exit: 0x0
frames shown: 3500 (PresentX 3500)
presents per 2 s (last 3): 120 118 119
device removals: 0
crashes: 0
peak commit: 2573 MB
  • PR head (pin-rust-toolchain):
xcl-smoke v1
commit: 8bd87ea4f126ab3ec13635aef78351da2496df7f
gpu: NVIDIA GeForce RTX 3050 6GB Laptop GPU
title: 2b8d9c34
seconds: 60
exit: 0x0
frames shown: 3507 (PresentX 3507)
presents per 2 s (last 3): 120 120 120
device removals: 0
crashes: 0
peak commit: 2572 MB

Not tested

  • AMD GPUs, NVIDIA desktop GPUs,
    wave32-only GPUs

AI use

  • Claude Code with Claude Sonnet 5.5,
    helped write the PR description, ran
    tests and reviewed the diff.

WASDeKeys and others added 21 commits November 24, 2026 16:01
Under `--test-threads=4`, the full test suite exhausted VRAM (0x8007000E) on
a 6 GB GPU when `d32s8_targets_take_their_own_size_of_video_memory` placed
14 4K D32S8 targets (~935 MB) concurrently with other GPU tests. The
mutex poison from that failure then cascaded into title_textures tests.
All tests pass at `--test-threads=1` and `--test-threads=2`.

Check the adapter's dedicated video memory and call `skip_test("< 8 GB VRAM")`
when under 8 GiB so the suite completes cleanly on 6 GB and smaller adapters.

Fixes xcl-dev#42
Assisted by : Antigravity IDE (Claude Sonnet 4.6)
…-dev#42)

Move the `< 8 GB VRAM` skip check before acquiring `VRAM_TEST_LOCK`.
On GPUs under 8 GiB, the test now skips immediately without contending for
or risking poisoning from `VRAM_TEST_LOCK`.

Fixes xcl-dev#42
Assisted by : Antigravity IDE (Claude Sonnet 4.6)
…s/test.ps1\n\nFixes xcl-dev#2214\n\nCo-Authored-By: Claude Code <noreply@anthropic.com>\nAssisted-by: OpenAI Codex (GPT-6)
…cl-dev#2214\n\nCo-Authored-By: Claude Code <noreply@anthropic.com>
…sion

crates/xcl, tests/testtitle and tests/testgamedll each picked up a
rust-rust-version.workspace line (not a real Cargo key) and lost
version.workspace = true, so the packages drifted to 0.0.0 in Cargo.lock
and --locked builds no longer agree with the manifests. Restore
version.workspace = true and drop the bogus key; Cargo.lock is back to
0.1.0 across all three packages.

Also fold out the unrelated d32s8 VRAM test change from vram.rs: it has
nothing to do with pinning the toolchain and belongs in its own change.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@WASDeKeys WASDeKeys changed the title Build: pin Rust toolchain to 1.96.0 and enforce Cargo.lock (#2214) Build: pin Rust toolchain to 1.96.0 and enforce Cargo.lock (FIx #2214) Nov 25, 2026
@fromthemoonx

fromthemoonx commented Nov 25, 2026 •

Copy link
Copy Markdown

Rerun on the head 8bd87ea: point 1 below is fixed, and the workspace builds and passes with --locked. All three members now have rust-version.workspace = true; cargo +stable metadata --no-deps gives rust_version: 1.96.0 for xcl, xcl-testtitle and testgame-mw.

result
cargo +stable test --workspace --locked --no-fail-fast -- --test-threads=4, 8bd87ea merged onto main 08db802 (clean), Rust 1.100.0 MSVC builds (--locked accepted the lockfile), 1429 passed, 0 failed, 47 ignored; 25 SKIPPED lines

RTX 3060 12 GB (driver 610.88), Windows 11 Pro 26300, debug. Not tested: a build with the pinned 1.96.0 itself (+stable was passed on purpose), the CI workflow change. The head merges main into the branch; CONTRIBUTING asks for a rebase instead.


On f5d6d40: Two points on f5d6d40, from reading the diff and checking with Cargo:

  1. rust-version has no effect yet. It is set in [workspace.package], but none of the three members inherits it: crates/xcl/Cargo.toml, tests/testtitle/Cargo.toml and tests/testgamedll/Cargo.toml have version.workspace / edition.workspace / license.workspace and no rust-version.workspace = true. cargo +stable metadata --no-deps --format-version 1 on this head gives rust_version: null for xcl, xcl-testtitle and testgame-mw, so an older compiler still fails with a compiler error instead of Cargo's "requires rustc 1.96.0". The plan in Build: pin the Rust toolchain and enforce Cargo.lock in CI and scripts/test.ps1 #2214 had the inheritance lines.
  2. The counts under Tested do not look like this tree. On this PR's base 1a0bbe3 with D3D12.X: clamp PcCalls across frame boundaries and drop orphaned PSO jobs immediately #2296 on top (which adds 2 tests), cargo test --workspace --no-fail-fast -- --test-threads=4 here gives 1252 passed, 0 failed, 46 ignored (RTX 3060, also 32-lane, 24 SKIPPED lines). The description's 1098 passed / 26 ignored is about 150 tests short of that, and its smoke block names 500578c, not the head. A rerun of scripts/test.ps1 at the head (it now passes --locked) would also show that the pinned 1.96.0 builds the whole workspace.

I did not build with 1.96.0 here (it isn't installed on this machine).

AI use: Claude Code (Claude Opus 5.5) checked the diff and ran the cargo metadata check.

@WASDeKeys

Copy link
Copy Markdown
Author

Two points on f5d6d40, from reading the diff and checking with Cargo:

  1. rust-version has no effect yet. It is set in [workspace.package], but none of the three members inherits it: crates/xcl/Cargo.toml, tests/testtitle/Cargo.toml and tests/testgamedll/Cargo.toml have version.workspace / edition.workspace / license.workspace and no rust-version.workspace = true. cargo +stable metadata --no-deps --format-version 1 on this head gives rust_version: null for xcl, xcl-testtitle and testgame-mw, so an older compiler still fails with a compiler error instead of Cargo's "requires rustc 1.96.0". The plan in Build: pin the Rust toolchain and enforce Cargo.lock in CI and scripts/test.ps1 #2214 had the inheritance lines.
  2. The counts under Tested do not look like this tree. On this PR's base 1a0bbe3 with D3D12.X: clamp PcCalls across frame boundaries and drop orphaned PSO jobs immediately #2296 on top (which adds 2 tests), cargo test --workspace --no-fail-fast -- --test-threads=4 here gives 1252 passed, 0 failed, 46 ignored (RTX 3060, also 32-lane, 24 SKIPPED lines). The description's 1098 passed / 26 ignored is about 150 tests short of that, and its smoke block names 500578c, not the head. A rerun of scripts/test.ps1 at the head (it now passes --locked) would also show that the pinned 1.96.0 builds the whole workspace.

I did not build with 1.96.0 here (it isn't installed on this machine).

AI use: Claude Code (Claude Opus 5.5) checked the diff and ran the cargo metadata check.

Looking into this @fromthemoonx

@throny throny added the off-goal Does not bear on the current goal (world loading); waits until it is reached label Nov 25, 2026
@RavenCurseBurg

RavenCurseBurg commented Nov 25, 2026 •

Copy link
Copy Markdown

Retested after the main merge at 8bd87ea4f126ab3ec13635aef78351da2496df7f. The test runner, toolchain file, root manifest, and three member manifests were byte-identical to 921e05b in Git. The three fixture runs below passed again in both PowerShell versions. Parsing the TOML confirmed the toolchain and workspace specify 1.96.0 and all three members inherit the workspace setting. This retest used fixture Cargo and Python’s TOML reader. The separate contributor report covers real Cargo metadata.

Verified the PowerShell runner at 921e05be9032cc00214a4393825b761a3b14f3b4 with a fixture cargo.cmd recording each argument list. Running scripts/test.ps1 --skip omitted in Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.9 issued build --locked --workspace and test --locked --workspace -- --test-threads=4 --skip omitted. A successful run exited 0, build exit 7 stopped before the test call, and test exit 101 propagated. All three cases matched in both shells.

There is a test-only interaction with #2304 (320d27f26045). I put the two locked Cargo command lines into a private copy of that runner and ran its scripts/test-totals.tests.ps1. The existing assertion failed in both shells because it expected --workspace immediately after test. The arguments following the -- separator were correct.

One-line fixture fix based on #2304. All six runner cases passed with both original and combined command lines in both shells (24 case executions). Removing forwarding of the test arguments in a private copy still caused the assertion to fail in both shells.

Windows 11 26100.9711, i7-13700, RTX 4060. Fixture Cargo only. Rustup, actual lockfile resolution, CI and the Rust/GPU suite were outside this check. OpenAI Codex (GPT-6) ran the argument and integration checks, prepared the test patch and wrote this report.

@WASDeKeys

Copy link
Copy Markdown
Author

@RavenCurseBurg @fromthemoonx @nnonno91
I am making some changes.

  • rust-version = "1.96.0" added to the workspace
    [workspace.package] in Cargo.toml
  • rust-version.workspace = true added to all three
    members (crates/xcl, tests/testtitle,
    tests/testgamedll)
  • rust-toolchain.toml created pinning 1.96.0 so the
    checkout's toolchain is the source (no
    RUSTUP_TOOLCHAIN override needed)
  • cargo metadata now reports rust_version = 1.96.0 for
    all three members (was null)
  • cargo test --workspace -- --test-threads=4: all green,
    0 failures

@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

Thanks!

@throny

throny commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Two contributors checked independently and found that #2370 solves the same problem (for #2214) in a different way: #1607, group D104. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.

This is a hint from the community triage in #1607, not a maintainer decision.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

@CalvyPZ CalvyPZ added the duplicate This issue or pull request already exists label Nov 25, 2026
@CalvyPZ CalvyPZ closed this Nov 25, 2026
@WASDeKeys

WASDeKeys commented Nov 25, 2026 •

Copy link
Copy Markdown
Author

@CalvyPZ @throny I don’t have permission to reopen this myself.

I’d like to keep #2295 open as the primary PR. It is a
superset of #2370: the scripts/test.ps1 runner matches
#2370 byte-for-byte, but #2295 also includes the Rust
toolchain pin to 1.96.0, the Cargo.toml updates, and the
checked-in Cargo.lock — plus CI enforcement. While #2370
covers the script wrapper, test fixture, and README
docs.

#2295 has been validated with a full cargo test
--workspace run (1098 passed, 0 failed) and GPU smoke
tests on both main and the PR head (0 device removals, 0
crashes). #2370 was validated against a synthetic
Cargo stand-in which has an important use case of
its own but no real Cargo build, lockfile resolution, or GPU run.

If the intent is to keep script-test infrastructure
separate, I’m happy to split #2370’s fixture/README
additions into a follow-up PR. But in case only one PR of the two
should be open, the substantive lockfile enforcement should be
in #2295 for its broader application in fixing issue #2214 .

Thank You.

@CalvyPZ CalvyPZ reopened this Nov 25, 2026
@CalvyPZ CalvyPZ removed the duplicate This issue or pull request already exists label Nov 25, 2026
@futurepro62

Copy link
Copy Markdown

NVIDIA and AMD full-suite run, to go with the reports above by fromthemoonx, since none of them covers AMD. Tested exact head 8bd87ea4 (on its base 12f25f1).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace --no-fail-fast -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 1255 passed, 0 failed, 44 ignored. SKIPPED (no wave64, no xgameruntime.dll): a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu, a_per_lane_2d_or_3d_group_runs_on_the_gpu, coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu, cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu, dispatch_chain_native_wave64_builds_whole, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, test_title_draws_with_a_root_signature_under_the_debug_layer, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.
  • No new #[test] functions in the diff.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace --no-fail-fast -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1266 passed, 0 failed, 46 ignored. SKIPPED: f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows), test_title_draws_with_a_root_signature_under_the_debug_layer (no xgameruntime.dll).
  • --skip leaves out tests that fail on main c2ee10e4 too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (Tests: heap_window_out_of_memory_falls_back_to_the_switch_form fails under XCL_REQUIRE_GPU=mesh (opt-in skip counted as missing coverage) #1651), the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests, const_and_null_mask_operands_agree_with_hlsl_on_the_gpu and mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh, and gpu::dxil::fuzz_tests seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card (drivers 616.64 and 621.40). On AMD: fuzz_validate_and_gpu_1 fails on seed 540 (res[833] 0x7 vs CPU 0x6). The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.

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

Labels

off-goal Does not bear on the current goal (world loading); waits until it is reached

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build: pin the Rust toolchain and enforce Cargo.lock in CI and scripts/test.ps1

7 participants