Tests: cover xcl shaders across files, folders, and RPF9 packs #959

Manually merged
github merged 1 commit from gh-pr/959/head into gh-pr/959/base 2026-11-26 04:38:29 +00:00
Owner

@⁠certified-retart on GitHub · 2026-11-24 09:34 UTC · original
certified-retart:tests/shaders-e2e → main · +298 −0 · 1 files · 1 commits · merged 2026-11-24 15:52 UTC

Adds end-to-end CLI integration tests for xcl shaders over synthetic console shader containers (DXBC → DXIL → XDAT → XBCH → FSSM), folders, and synthetic RPF9 packs. Test-only: no runtime code changes.

What is in it

  • crates/xcl/tests/shaders_e2e.rs (new, 4 integration tests using only synthetic containers, no game data):
    • shaders_single_file_reports_text_top_json_recomp_and_dxc_compile: exercises text output, --recomp, --top 1, and --json --recomp --compile 1 (compiling the translated HLSL with DXC) on a single synthetic Xbox native PS container.
    • shaders_folder_recurses_and_skips_side_files: exercises recursive folder scanning across mixed console/non-console files and verifies .txt and .fssm side files are skipped.
    • shaders_rpf9_pack_scans_records_and_counts_inflate_errors: exercises RPF9 pack scanning (9FPR), valid console + non-console records, and counting inflate_errors when a record's declared uncompressed size mismatches its deflate stream.
    • shaders_handles_non_console_file_and_missing_path: verifies exit code 0 with no console containers (xbox-native) on a non-console file and exit code 2 with an xcl shaders: stderr message on a missing path.

Tested

  • NVIDIA GeForce RTX 5070 (driver 32.0.16.1074), AMD Ryzen 7 9800X3D, Windows 10 Pro build 19045, rustc 1.100.0 (0ef1bc386 2026-11-09), debug build, Agility SDK v620 (XCL_D3D12_DIR).
  • cargo test -p xcl --test shaders_e2e -- --nocapture: 4 passed, 0 failed, 0 ignored.
  • cargo build --workspace and cargo test --workspace -- --test-threads=1 --nocapture (with XCL_D3D12_DIR set): 720 passed, 0 failed, 41 ignored.
  • SKIPPED tests on this adapter/host: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask (no wave64), gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware (no wave64), test_title_draws_with_a_root_signature_under_the_debug_layer (no d3d12SDKLayers.dll), uploads_start_from_each_subresources_state (no D3D12 debug).

Regression run
Not needed: this PR adds only an integration test file under crates/xcl/tests/ and does not change the runtime.

Not tested

  • xcl shaders --precompile, --pipelines, --iface, --example, or real retail shader packs (XCL_SAMPLE_RPF).
  • Wine / vkd3d-proton, release profile, or parallel --test-threads=4.

AI use

  • Antigravity (gemini-4-neon) wrote the integration tests and this description and ran the build and test suite on the hardware named above.
**@⁠certified-retart** on GitHub · 2026-11-24 09:34 UTC · [original](https://github.com/xcl-dev/xcl/pull/959) `certified-retart:tests/shaders-e2e` → `main` · +298 −0 · 1 files · 1 commits · merged 2026-11-24 15:52 UTC Adds end-to-end CLI integration tests for `xcl shaders` over synthetic console shader containers (`DXBC` → `DXIL` → `XDAT` → `XBCH` → `FSSM`), folders, and synthetic RPF9 packs. Test-only: no runtime code changes. **What is in it** - `crates/xcl/tests/shaders_e2e.rs` (new, 4 integration tests using only synthetic containers, no game data): - `shaders_single_file_reports_text_top_json_recomp_and_dxc_compile`: exercises text output, `--recomp`, `--top 1`, and `--json --recomp --compile 1` (compiling the translated HLSL with DXC) on a single synthetic Xbox native PS container. - `shaders_folder_recurses_and_skips_side_files`: exercises recursive folder scanning across mixed console/non-console files and verifies `.txt` and `.fssm` side files are skipped. - `shaders_rpf9_pack_scans_records_and_counts_inflate_errors`: exercises RPF9 pack scanning (`9FPR`), valid console + non-console records, and counting `inflate_errors` when a record's declared uncompressed size mismatches its deflate stream. - `shaders_handles_non_console_file_and_missing_path`: verifies exit code `0` with `no console containers (xbox-native)` on a non-console file and exit code `2` with an `xcl shaders:` stderr message on a missing path. **Tested** - NVIDIA GeForce RTX 5070 (driver `32.0.16.1074`), AMD Ryzen 7 9800X3D, Windows 10 Pro build 19045, `rustc 1.100.0 (0ef1bc386 2026-11-09)`, debug build, Agility SDK v620 (`XCL_D3D12_DIR`). - `cargo test -p xcl --test shaders_e2e -- --nocapture`: 4 passed, 0 failed, 0 ignored. - `cargo build --workspace` and `cargo test --workspace -- --test-threads=1 --nocapture` (with `XCL_D3D12_DIR` set): 720 passed, 0 failed, 41 ignored. - `SKIPPED` tests on this adapter/host: `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask` (`no wave64`), `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` (`no wave64`), `test_title_draws_with_a_root_signature_under_the_debug_layer` (`no d3d12SDKLayers.dll`), `uploads_start_from_each_subresources_state` (`no D3D12 debug`). **Regression run** Not needed: this PR adds only an integration test file under `crates/xcl/tests/` and does not change the runtime. **Not tested** - `xcl shaders --precompile`, `--pipelines`, `--iface`, `--example`, or real retail shader packs (`XCL_SAMPLE_RPF`). - Wine / vkd3d-proton, release profile, or parallel `--test-threads=4`. **AI use** - Antigravity (`gemini-4-neon`) wrote the integration tests and this description and ran the build and test suite on the hardware named above.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:38:29 +00:00
github manually merged commit e1c4020436 into gh-pr/959/base 2026-11-26 04:38:29 +00:00
Author
Owner

@⁠SlopTart on GitHub · 2026-11-24 10:38 UTC · original

Linux / AMD RDNA3 datapoint.

Merged state: head e1c4020 onto main 9aec53d, clean merge.

Full suite, cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 717 passed, 11 failed, 41 ignored; failures are the known Wine-lane set from my #42 rows plus this rig's title-textures flake family (see #718). shader-across-files/folders/RPF9 tests green.

Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.

Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross x86_64-pc-windows-gnu, XCL_NETWORK=0, release profile, --test-threads=4. My Linux rows: #42 / #718.

AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.

**@⁠SlopTart** on GitHub · 2026-11-24 10:38 UTC · [original](https://github.com/xcl-dev/xcl/pull/959#issuecomment-7129044703) Linux / AMD RDNA3 datapoint. **Merged state:** head `e1c4020` onto main `9aec53d`, clean merge. **Full suite, `cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4`:** **717 passed, 11 failed, 41 ignored**; failures are the known Wine-lane set from my #42 rows plus this rig's title-textures flake family (see #718). shader-across-files/folders/RPF9 tests green. **Not tested:** retail titles (none here), Windows, RDNA4. Counts only, no game data. **Machine:** RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross `x86_64-pc-windows-gnu`, `XCL_NETWORK=0`, release profile, `--test-threads=4`. My Linux rows: #42 / #718. AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
Author
Owner

@⁠Aniseto on GitHub · 2026-11-24 10:52 UTC · original

Ran the new binary on Windows 11 x64 at e1c4020:

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build.

cargo test -p xcl --test shaders_e2e
4 passed; 0 failed; 0 ignored      (exit 0)

All four pass on this OS build, which adds a Windows 11 build 26200 datapoint to the author's Windows 10 build 19045 and the Linux/AMD run above. These are CLI-level tests, so the GPU is not the variable here.

Not tested: retail titles, RDNA4, Linux, release profile, optional XCL_SAMPLE_* retail-data tests.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash 1017 - checked out the PR's head commit in a detached worktree, built it, ran the test binary, wrote this report; the worktree was not modified.

**@⁠Aniseto** on GitHub · 2026-11-24 10:52 UTC · [original](https://github.com/xcl-dev/xcl/pull/959#issuecomment-7129366661) Ran the new binary on Windows 11 x64 at `e1c4020`: Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build. ``` cargo test -p xcl --test shaders_e2e 4 passed; 0 failed; 0 ignored (exit 0) ``` All four pass on this OS build, which adds a Windows 11 build 26200 datapoint to the author's Windows 10 build 19045 and the Linux/AMD run above. These are CLI-level tests, so the GPU is not the variable here. Not tested: retail titles, RDNA4, Linux, release profile, optional `XCL_SAMPLE_*` retail-data tests. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash 1017** - checked out the PR's head commit in a detached worktree, built it, ran the test binary, wrote this report; the worktree was not modified.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 13:51 UTC · original

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

  • lib shaders: 8 passed, 0 failed.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 13:51 UTC · [original](https://github.com/xcl-dev/xcl/pull/959#issuecomment-7133440347) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - lib shaders: 8 passed, 0 failed. Thanks!
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 03:23 UTC · original

Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-26 03:23 UTC · [original](https://github.com/xcl-dev/xcl/pull/959#issuecomment-7181675464) Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
This discussion has been locked. Commenting is limited to contributors.
No description provided.