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

Merged
certified-retart merged 1 commit from upstream-pr/959 into main 2026-11-24 15:52:20 +00:00
certified-retart commented 2026-11-24 09:34:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by certified-retart on 2026-11-24T09:34:16Z.


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.
<!-- greyfinch-sync:ivall/xcl:issue:6578801780 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/959). Originally posted by [certified-retart](https://github.com/certified-retart) on 2026-11-24T09:34:16Z. --- 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.
SlopTart commented 2026-11-24 11:05:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-24T10:38:14Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7129044703 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/959#issuecomment-7129044703). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-24T10:38:14Z. --- 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.
Aniseto commented 2026-11-24 11:06:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-24T10:52:50Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7129366661 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/959#issuecomment-7129366661). Originally posted by [Aniseto](https://github.com/Aniseto) on 2026-11-24T10:52:50Z. --- 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.
DavidM1911 commented 2026-11-24 14:06:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T13:51:29Z.


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

  • lib shaders: 8 passed, 0 failed.

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7133440347 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/959#issuecomment-7133440347). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T13:51:29Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - lib shaders: 8 passed, 0 failed. Thanks!
upstream-sync closed this pull request 2026-11-24 16:05:49 +00:00
DavidM1911 commented 2026-11-26 04:07:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T03:23:22Z.


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

<!-- greyfinch-sync:ivall/xcl:comment:7181675464 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/959#issuecomment-7181675464). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T03:23:22Z. --- 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
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
xcl-dev/xcl!953
No description provided.