Tests: DXBC part table and Xbox XDAT / XBCH / FSSM containers #853

Open
mastrr9 wants to merge 1 commit from upstream-pr/859 into main
mastrr9 commented 2026-11-24 06:59:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by mastrr9 on 2026-11-24T06:59:27Z.


Adds a test-only suite (crates/xcl/tests/shader_containers.rs) testing xcl::gpu::shader and xcl::gpu::xbox container parsing on synthetic DXBC, XDAT, XBCH, and FSSM blobs:

  • DXBC header validation, part offsets/bounds, truncation safety, and classification
  • Xbox XDAT / XBCH / FSSM container parsing, nested program extraction, and malformed-input handling

Tested

  • Hardware/OS: NVIDIA RTX 5080 (driver 617.42 / 32.0.16.1742), Windows 11 Pro 25H2 (26200.9974), rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC debug, DXC Windows SDK 10.0.26100.0, d3d12SDKLayers.dll installed
  • Commit tested: 76fe373588bc4af7053beb13081dde01e333e45c
  • cargo build --workspace: clean (no new warnings; only pre-existing fetch_update deprecation warning)
  • cargo test --workspace -- --test-threads=4: 730 passed, 0 failed, 41 ignored (shader_containers: 17 passed, 0 failed, 0 ignored)
  • SKIPPED GPU tests: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64

Not tested

  • Test-only diff (crates/xcl/tests/shader_containers.rs); no runtime code changed and no retail title run performed.

AI use

  • Authored with Claude Code (Claude Opus 5.5); reviewed, audited (removed an #[ignore] test to comply with CONTRIBUTING.md), and verified on native Windows/RTX 5080 hardware with Antigravity (Gemini 4 Neon + Claude Sonnet 5.5).
<!-- greyfinch-sync:ivall/xcl:issue:5467623471 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/859). Originally posted by [mastrr9](https://github.com/mastrr9) on 2026-11-24T06:59:27Z. --- Adds a test-only suite (`crates/xcl/tests/shader_containers.rs`) testing `xcl::gpu::shader` and `xcl::gpu::xbox` container parsing on synthetic DXBC, XDAT, XBCH, and FSSM blobs: - DXBC header validation, part offsets/bounds, truncation safety, and classification - Xbox XDAT / XBCH / FSSM container parsing, nested program extraction, and malformed-input handling **Tested** - Hardware/OS: NVIDIA RTX 5080 (driver `617.42` / `32.0.16.1742`), Windows 11 Pro 25H2 (`26200.9974`), `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC debug, DXC Windows SDK `10.0.26100.0`, `d3d12SDKLayers.dll` installed - Commit tested: `76fe373588bc4af7053beb13081dde01e333e45c` - `cargo build --workspace`: clean (no new warnings; only pre-existing `fetch_update` deprecation warning) - `cargo test --workspace -- --test-threads=4`: **730 passed, 0 failed, 41 ignored** (`shader_containers`: 17 passed, 0 failed, 0 ignored) - `SKIPPED` GPU tests: `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64` **Not tested** - Test-only diff (`crates/xcl/tests/shader_containers.rs`); no runtime code changed and no retail title run performed. **AI use** - Authored with Claude Code (Claude Opus 5.5); reviewed, audited (removed an `#[ignore]` test to comply with `CONTRIBUTING.md`), and verified on native Windows/RTX 5080 hardware with Antigravity (Gemini 4 Neon + Claude Sonnet 5.5).
SlopTart commented 2026-11-24 09:07:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-24T08:09:24Z.


Linux / AMD RDNA3 datapoint.

Merged state: head 76fe373 onto main 1ec4c98, clean merge.

Full suite, cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 721 passed, 11 failed, 41 ignored. Failures = the known Wine-lane set from my #42 rows plus #718 trio members and a hit of gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes (new flake, see #718 addendum). DXBC part table + XDAT/XBCH/FSSM container tests green (721 passed).

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:7125792148 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/859#issuecomment-7125792148). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-24T08:09:24Z. --- Linux / AMD RDNA3 datapoint. **Merged state:** head `76fe373` onto main `1ec4c98`, clean merge. **Full suite, `cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4`:** **721 passed, 11 failed, 41 ignored**. Failures = the known Wine-lane set from my #42 rows plus #718 trio members and a hit of `gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes` (new flake, see #718 addendum). DXBC part table + XDAT/XBCH/FSSM container tests green (721 passed). **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.
JJAutoCompare commented 2026-11-25 06:06:02 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T05:57:13Z.


Empirical test report (2ab36e67)

Hardware / environment

  • Windows x64, build 10.0.26200. AMD x64 CPU, family 23, model 113, stepping 0.
  • Rust 1.100.0 (0ef1bc386 2026-11-09) and DXC 1.9.2609.5 (01b62ad47). Cargo test profile with debug info and incremental compilation disabled.
  • Both commands ran directly outside the Arc test wrapper, with no Arc GPU mutex held. The focused target uses in-memory fixtures and CPU parsing, zlib decompression, and RDNA2 decoding.

Commands and results

  • cargo test --workspace --no-run compiled the workspace test executables and exited 0.
  • With XCL_ADAPTER=NONE_CPU_ONLY and RUST_TEST_NOCAPTURE=1, cargo test -p xcl --test shader_containers -- --nocapture exited 0. The test summary reported 17 passed, 0 failed, and 0 ignored. The captured output contained 0 uppercase SKIPPED lines.

Observed behavior

  • The DXBC checks exercised part-table ordering, count and range limits, FourCC sanitization, and agreement with a reference reader on seeded mutations.
  • The Xbox container checks exercised the XDAT table and entry bounds, XBCH decompression and invalid streams, and FSSM stage descriptors and code-pointer fallback. The truncation and mutation checks asserted that parsing stayed panic-free and that parsed ranges stayed within their buffers.

Not tested

  • The full GPU workspace suite and game smoke runs were omitted.

AI use

Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr859-focused.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7154295521 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/859#issuecomment-7154295521). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T05:57:13Z. --- ### Empirical test report (2ab36e67) **Hardware / environment** - Windows x64, build 10.0.26200. AMD x64 CPU, family 23, model 113, stepping 0. - Rust 1.100.0 (0ef1bc386 2026-11-09) and DXC 1.9.2609.5 (01b62ad47). Cargo test profile with debug info and incremental compilation disabled. - Both commands ran directly outside the Arc test wrapper, with no Arc GPU mutex held. The focused target uses in-memory fixtures and CPU parsing, zlib decompression, and RDNA2 decoding. **Commands and results** - `cargo test --workspace --no-run` compiled the workspace test executables and exited 0. - With `XCL_ADAPTER=NONE_CPU_ONLY` and `RUST_TEST_NOCAPTURE=1`, `cargo test -p xcl --test shader_containers -- --nocapture` exited 0. The test summary reported 17 passed, 0 failed, and 0 ignored. The captured output contained 0 uppercase `SKIPPED` lines. **Observed behavior** - The DXBC checks exercised part-table ordering, count and range limits, FourCC sanitization, and agreement with a reference reader on seeded mutations. - The Xbox container checks exercised the XDAT table and entry bounds, XBCH decompression and invalid streams, and FSSM stage descriptors and code-pointer fallback. The truncation and mutation checks asserted that parsing stayed panic-free and that parsed ranges stayed within their buffers. **Not tested** - The full GPU workspace suite and game smoke runs were omitted. **AI use** Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr859-focused.log` and published.
DavidM1911 commented 2026-11-25 11:08:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T10:15:39Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7159451108 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/859#issuecomment-7159451108). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T10:15:39Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
github-actions[bot] commented 2026-11-28 20:19:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T20:19:50Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7245206696 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/859#issuecomment-7245206696). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T20:19:50Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 04:20:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:20:12Z.


Triage (#1607) – head 2ab36e6

Overlaps in coverage with #558 (crates/xcl/tests/xbox_container.rs), which also builds XDAT/XBCH/FSSM blobs and checks gpu::xbox parsing. This PR adds the DXBC part table (container_parts) and truncation/mutation fuzzing that #558 lacks, so the two are different takes, not the same change. Worth agreeing with #558's author which file keeps the shared cases. Test-only. No problems found in the diff.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7300629927 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/859#issuecomment-7300629927). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T04:20:12Z. --- **Triage (#1607)** – head 2ab36e6 Overlaps in coverage with #558 (crates/xcl/tests/xbox_container.rs), which also builds XDAT/XBCH/FSSM blobs and checks gpu::xbox parsing. This PR adds the DXBC part table (container_parts) and truncation/mutation fuzzing that #558 lacks, so the two are different takes, not the same change. Worth agreeing with #558's author which file keeps the shared cases. Test-only. No problems found in the diff. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/859:upstream-pr/859'
git switch 'upstream-pr/859'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/859'
git switch 'upstream-pr/859'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/859'
git switch 'upstream-pr/859'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/859'
git switch 'main'
git merge --squash 'upstream-pr/859'
git switch 'main'
git merge --ff-only 'upstream-pr/859'
git switch 'main'
git merge 'upstream-pr/859'
git push origin 'main'
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!853
No description provided.