Tests: verify Xbox shader container, FSSM, and pack parsing contracts #553

Open
amazedturnip wants to merge 1 commit from upstream-pr/558 into main
amazedturnip commented 2026-11-24 01:47:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by amazedturnip on 2026-11-24T01:47:14Z.


Add integration tests in crates/xcl/tests/xbox_container.rs covering xcl::gpu::pack and xcl::gpu::xbox public parsing contracts, stage-name helpers, XDAT/XBCH/FSSM error and fallback paths, and is_data_block boundaries.

What is in it

  • crates/xcl/tests/xbox_container.rs: add integration tests covering pack::scan/inflate/name_stage -> xbox::is_xbox/parse roundtrips (MS/NGG and CS), hw_stage_name/api_stage_name/HwStage::label/Fssm::code_bytes/stage_label, XDAT-relative entry offsets, non-0x18 XDAT/zlib header offsets, DXIL_KINDS mapping, InstStats::merge/sorted, header_qwords, XBCH/FSSM error and fallback paths, and is_data_block.

Tested

  • Hardware / OS / Rust: AMD Ryzen 7 9800X3D 8-Core Processor, Windows 11 Pro 10.0.26100 (Build 26100), rustc 1.94.1 (e408947bf 2026-03-25), stable-x86_64-pc-windows-msvc, debug build
  • AMD (AMD Radeon(TM) Graphics (driver 32.0.21043.19003, DXC 1.9.2609, native wave64), XCL_ADAPTER=radeon): cargo test --workspace -- --test-threads=2 — 685 passed, 0 failed, 41 ignored (SKIPPED GPU tests: none)
  • Verification / negative control: new test suite — verified 3x deterministic

Not tested

  • retail Xbox Series X|S title (not available on this host)
  • NVIDIA wave32 GPU (not run in this pass; verified on AMD Radeon native wave64)

AI use

  • Antigravity CLI (Gemini 4 Hydrogen (Medium)) assisted with diagnosis, implementation, tests, review, and description; all tests executed locally on AMD Radeon (native wave64).
<!-- greyfinch-sync:ivall/xcl:issue:5464513344 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/558). Originally posted by [amazedturnip](https://github.com/amazedturnip) on 2026-11-24T01:47:14Z. --- Add integration tests in `crates/xcl/tests/xbox_container.rs` covering `xcl::gpu::pack` and `xcl::gpu::xbox` public parsing contracts, stage-name helpers, XDAT/XBCH/FSSM error and fallback paths, and `is_data_block` boundaries. **What is in it** - `crates/xcl/tests/xbox_container.rs`: add integration tests covering `pack::scan`/`inflate`/`name_stage` -> `xbox::is_xbox`/`parse` roundtrips (MS/NGG and CS), `hw_stage_name`/`api_stage_name`/`HwStage::label`/`Fssm::code_bytes`/`stage_label`, XDAT-relative entry offsets, non-0x18 XDAT/zlib header offsets, `DXIL_KINDS` mapping, `InstStats::merge`/`sorted`, `header_qwords`, XBCH/FSSM error and fallback paths, and `is_data_block`. **Tested** - Hardware / OS / Rust: AMD Ryzen 7 9800X3D 8-Core Processor, Windows 11 Pro 10.0.26100 (Build 26100), rustc 1.94.1 (e408947bf 2026-03-25), stable-x86_64-pc-windows-msvc, debug build - AMD (`AMD Radeon(TM) Graphics (driver 32.0.21043.19003, DXC 1.9.2609, native wave64)`, `XCL_ADAPTER=radeon`): `cargo test --workspace -- --test-threads=2` — 685 passed, 0 failed, 41 ignored (SKIPPED GPU tests: none) - Verification / negative control: new test suite — verified 3x deterministic **Not tested** - retail Xbox Series X|S title (not available on this host) - NVIDIA wave32 GPU (not run in this pass; verified on AMD Radeon native wave64) **AI use** - Antigravity CLI (Gemini 4 Hydrogen (Medium)) assisted with diagnosis, implementation, tests, review, and description; all tests executed locally on AMD Radeon (native wave64).
towiice commented 2026-11-24 02:14:55 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by towiice on 2026-11-24T02:14:55Z.

Review: COMMENTED


Tested PR head 49e53e9 on Windows 11 build 10.0.26300 (26H2), Rust 1.100.0 (stable-x86_64-pc-windows-gnullvm):

  • cargo test -p xcl --test xbox_container -- --test-threads=4: 5 passed, 0 failed (0.01 s):
    • stage_names_and_fssm_helpers
    • is_data_block_distinguishes_code_and_data
    • xdat_relative_offsets_non_0x18_xdat_dxil_kinds_and_stats
    • xbch_and_fssm_error_and_fallback_paths
    • pack_roundtrip_ms_and_cs_into_xbox_parse

All shader container / FSSM / pack contract tests pass cleanly.

<!-- greyfinch-sync:ivall/xcl:review:6032625387 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/558#pullrequestreview-6032625387). Originally posted by [towiice](https://github.com/towiice) on 2026-11-24T02:14:55Z. **Review:** COMMENTED --- Tested PR head `49e53e9` on Windows 11 build 10.0.26300 (26H2), Rust 1.100.0 (`stable-x86_64-pc-windows-gnullvm`): - `cargo test -p xcl --test xbox_container -- --test-threads=4`: **5 passed, 0 failed** (0.01 s): - `stage_names_and_fssm_helpers` - `is_data_block_distinguishes_code_and_data` - `xdat_relative_offsets_non_0x18_xdat_dxil_kinds_and_stats` - `xbch_and_fssm_error_and_fallback_paths` - `pack_roundtrip_ms_and_cs_into_xbox_parse` All shader container / FSSM / pack contract tests pass cleanly.
fromthemoonx commented 2026-11-24 07:05:25 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-11-24T01:56:29Z.


NVIDIA run, since Not tested lists NVIDIA wave32.

Tested

  • Exact head 49e53e9c2d00eb6a8e37a70d91d8f472d9bb0dc7, clean worktree
  • NVIDIA GeForce RTX 3060 (32-lane waves), driver 32.0.16.1088; AMD Ryzen 7 5700X; Windows 11 Pro 26H2 (build 26300.9974); rustc 1.100.0 stable-x86_64-pc-windows-msvc; DXC 1.9.2602.17 (Windows SDK 10.0.26100.0); debug
  • cargo build --workspace, then cargo test --workspace -- --test-threads=4: 685 passed, 0 failed, 41 ignored (lib 640 / 0 / 21; xbox_container 5 / 0 / 0). Same totals as in the description.
  • SKIPPED (no wave64 on this adapter): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware
  • XCL_SAMPLE_* not set

Not tested

  • The new tests in xbox_container.rs parse on the CPU and touch no GPU, so this run shows they pass with the MSVC toolchain. It adds no wave32 coverage for them.
  • A retail title.

AI use

  • Claude Code (Claude Opus 5.5) ran the build and tests on the machine above and wrote this report from the log.
<!-- greyfinch-sync:ivall/xcl:comment:7119600070 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/558#issuecomment-7119600070). Originally posted by [fromthemoonx](https://github.com/fromthemoonx) on 2026-11-24T01:56:29Z. --- NVIDIA run, since **Not tested** lists NVIDIA wave32. **Tested** - Exact head `49e53e9c2d00eb6a8e37a70d91d8f472d9bb0dc7`, clean worktree - NVIDIA GeForce RTX 3060 (32-lane waves), driver 32.0.16.1088; AMD Ryzen 7 5700X; Windows 11 Pro 26H2 (build 26300.9974); rustc 1.100.0 `stable-x86_64-pc-windows-msvc`; DXC 1.9.2602.17 (Windows SDK 10.0.26100.0); debug - `cargo build --workspace`, then `cargo test --workspace -- --test-threads=4`: **685 passed, 0 failed, 41 ignored** (lib 640 / 0 / 21; `xbox_container` 5 / 0 / 0). Same totals as in the description. - SKIPPED (no wave64 on this adapter): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` - `XCL_SAMPLE_*` not set **Not tested** - The new tests in `xbox_container.rs` parse on the CPU and touch no GPU, so this run shows they pass with the MSVC toolchain. It adds no wave32 coverage for them. - A retail title. **AI use** - Claude Code (Claude Opus 5.5) ran the build and tests on the machine above and wrote this report from the log.
MesshM commented 2026-11-24 07:06:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by MesshM on 2026-11-24T04:54:05Z.


Test run of 49e53e9c2d00eb6a8e37a70d91d8f472d9bb0dc7 on AMD RDNA4. I merged it onto current main 64b3f35 locally (clean merge) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200 (native Windows, not Wine), Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 706 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 660 passed, 0 failed, 21 ignored
  • 0 SKIPPED; the xbox_container tests pass, as do the pack tests (bounded scans of hostile offsets included).

Review: Test-only, with synthetic containers and no game data. I found nothing to change.

Not tested: no retail title or regression run (I have no unpacked game), no XCL_SAMPLE_* tests, release build; the PR's head on its old base was not run, only its merge onto main.

Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

<!-- greyfinch-sync:ivall/xcl:comment:7122440179 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/558#issuecomment-7122440179). Originally posted by [MesshM](https://github.com/MesshM) on 2026-11-24T04:54:05Z. --- Test run of `49e53e9c2d00eb6a8e37a70d91d8f472d9bb0dc7` on AMD RDNA4. I merged it onto current `main` `64b3f35` locally (clean merge) and tested that tree. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200 (native Windows, not Wine), Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on the merge: **706 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 660 passed, 0 failed, 21 ignored - **0 `SKIPPED`**; the `xbox_container` tests pass, as do the `pack` tests (bounded scans of hostile offsets included). **Review:** Test-only, with synthetic containers and no game data. I found nothing to change. **Not tested:** no retail title or regression run (I have no unpacked game), no `XCL_SAMPLE_*` tests, release build; the PR's head on its old base was not run, only its merge onto `main`. Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
DavidM1911 commented 2026-11-25 14:10:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T13:30:23Z.


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:7163874143 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/558#issuecomment-7163874143). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T13:30:23Z. --- 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-29 07:43:29 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:43:29Z.


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:7252650537 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/558#issuecomment-7252650537). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T07:43:29Z. --- 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.
amazedturnip commented 2026-11-29 08:44:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by amazedturnip on 2026-11-29T08:44:14Z.


Still merges cleanly onto main (d8bd9a38) with passing checks; verify Xbox shader container, FSSM, and pack parsing contracts — waiting on maintainer / post-goal review.

<!-- greyfinch-sync:ivall/xcl:comment:7253298802 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/558#issuecomment-7253298802). Originally posted by [amazedturnip](https://github.com/amazedturnip) on 2026-11-29T08:44:14Z. --- Still merges cleanly onto main (d8bd9a38) with passing checks; verify Xbox shader container, FSSM, and pack parsing contracts — waiting on maintainer / post-goal review.
Foniass commented 2026-12-01 03:42:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:42:58Z.


Triage (#1607) – head 49e53e9

No open or merged PR adds these tests. crates/xcl/tests/xbox_container.rs exercises the public gpu::xbox and gpu::pack APIs (pack scan/inflate into parse, XDAT-relative offsets, XBCH/FSSM error and fallback paths, is_data_block, InstStats::merge/sorted, header_qwords). It overlaps a little with the unit tests in gpu/xbox.rs (pc_shaders_are_not_xbox, falls_back_when_header_pointer_is_wrong), but most cases are new. 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:7299990833 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/558#issuecomment-7299990833). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T03:42:58Z. --- **Triage (#1607)** – head 49e53e9 No open or merged PR adds these tests. `crates/xcl/tests/xbox_container.rs` exercises the public `gpu::xbox` and `gpu::pack` APIs (pack scan/inflate into `parse`, XDAT-relative offsets, XBCH/FSSM error and fallback paths, `is_data_block`, `InstStats::merge`/`sorted`, `header_qwords`). It overlaps a little with the unit tests in `gpu/xbox.rs` (`pc_shaders_are_not_xbox`, `falls_back_when_header_pointer_is_wrong`), but most cases are new. 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/558:upstream-pr/558'
git switch 'upstream-pr/558'

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