Tests: XMA2 stream layouts from WAVEFORMATEX extradata #855

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

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


Adds a test-only suite (crates/xcl/tests/xma2_extradata.rs) verifying XMA2WAVEFORMATEX / XMA2WAVEFORMAT extradata parsing, stream channel layouts, and malformed header 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: f12892939e57f74ffe7b621f814cbf1e0e8c3ebd
  • cargo build --workspace: clean (no new warnings; only pre-existing fetch_update deprecation warning)
  • cargo test --workspace -- --test-threads=4: 716 passed, 0 failed, 41 ignored (xma2_extradata: 3 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/xma2_extradata.rs); no runtime code changed and no retail title run performed.

AI use

  • Authored with Claude Code (Claude Opus 5.5); reviewed, audited, and verified on native Windows/RTX 5080 hardware with Antigravity (Gemini 4 Neon + Claude Sonnet 5.5).
<!-- greyfinch-sync:ivall/xcl:issue:5467624199 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/861). Originally posted by [mastrr9](https://github.com/mastrr9) on 2026-11-24T06:59:31Z. --- Adds a test-only suite (`crates/xcl/tests/xma2_extradata.rs`) verifying `XMA2WAVEFORMATEX` / `XMA2WAVEFORMAT` extradata parsing, stream channel layouts, and malformed header 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: `f12892939e57f74ffe7b621f814cbf1e0e8c3ebd` - `cargo build --workspace`: clean (no new warnings; only pre-existing `fetch_update` deprecation warning) - `cargo test --workspace -- --test-threads=4`: **716 passed, 0 failed, 41 ignored** (`xma2_extradata`: 3 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/xma2_extradata.rs`); no runtime code changed and no retail title run performed. **AI use** - Authored with Claude Code (Claude Opus 5.5); reviewed, audited, 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:21Z.


Linux / AMD RDNA3 datapoint.

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

Full suite, cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 711 passed, 7 failed, 41 ignored. Failures = the known Wine-lane set from my #42 rows - zero flakes in this lane. XMA2 stream-layout tests green - and note this lane had only the 7 stable Wine failures, zero flakes.

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:7125791054 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/861#issuecomment-7125791054). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-24T08:09:21Z. --- Linux / AMD RDNA3 datapoint. **Merged state:** head `f128929` onto main `1ec4c98`, clean merge. **Full suite, `cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4`:** **711 passed, 7 failed, 41 ignored**. Failures = the known Wine-lane set from my #42 rows - zero flakes in this lane. XMA2 stream-layout tests green - and note this lane had only the 7 stable Wine failures, zero flakes. **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:05:58 +00:00 (Migrated from github.com)

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


Empirical test report (b09ce2c6)

PR #861, Tests: XMA2 stream layouts from WAVEFORMATEX extradata. Tested commit b09ce2c6fe691600df717096513a6df18e970fa2 in a clean detached checkout.

Hardware / environment

  • Windows x64, build 10.0.26200. AMD64 Family 23 Model 113 Stepping 0 (AuthenticAMD), 12 logical processors.
  • rustc 1.100.0 (0ef1bc386 2026-11-09), host x86_64-pc-windows-msvc. DXC 1.9.2609.5 (01b62ad47).
  • Cargo test profile, unoptimized, with incremental compilation and debug info disabled. The focused run used XCL_ADAPTER=NONE_CPU_ONLY and RUST_TEST_NOCAPTURE=1. Both commands ran outside the Arc test wrapper without acquiring its GPU mutex.

Commands and results

  • cargo test --workspace --no-run exited 0 and built the workspace test executables.
  • cargo test -p xcl --test xma2_extradata -- --nocapture exited 0. 3 passed, 0 failed, 0 ignored, 0 skipped, 0 filtered out. Skip count is based on case-sensitive SKIPPED lines in the captured output.

Observed behavior

  • xma2waveformatex_layouts verified mono and stereo stream groupings, default layouts for empty extradata, and sample-rate pass-through with a 48 kHz default for a zero rate.
  • invalid_extradata_is_err verified rejection of malformed XMA1 and XMA2 extradata and checked valid legacy XMA2 stream entries.
  • random_extradata_never_panics checked 3,000 seeded inputs against the XMA1 and XMA2 parsers. Accepted layouts satisfied stream and channel invariants and could initialize the CPU decoder.

Not tested

The full GPU workspace suite and game smoke runs were omitted. The focused tests exercise extradata parsing and decoder construction.

AI use

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

<!-- greyfinch-sync:ivall/xcl:comment:7154109137 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/861#issuecomment-7154109137). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T05:45:26Z. --- ### Empirical test report (b09ce2c6) PR #861, Tests: XMA2 stream layouts from WAVEFORMATEX extradata. Tested commit `b09ce2c6fe691600df717096513a6df18e970fa2` in a clean detached checkout. **Hardware / environment** - Windows x64, build `10.0.26200`. AMD64 Family 23 Model 113 Stepping 0 (`AuthenticAMD`), 12 logical processors. - `rustc 1.100.0 (0ef1bc386 2026-11-09)`, host `x86_64-pc-windows-msvc`. DXC `1.9.2609.5 (01b62ad47)`. - Cargo test profile, unoptimized, with incremental compilation and debug info disabled. The focused run used `XCL_ADAPTER=NONE_CPU_ONLY` and `RUST_TEST_NOCAPTURE=1`. Both commands ran outside the Arc test wrapper without acquiring its GPU mutex. **Commands and results** - `cargo test --workspace --no-run` exited 0 and built the workspace test executables. - `cargo test -p xcl --test xma2_extradata -- --nocapture` exited 0. 3 passed, 0 failed, 0 ignored, 0 skipped, 0 filtered out. Skip count is based on case-sensitive `SKIPPED ` lines in the captured output. **Observed behavior** - `xma2waveformatex_layouts` verified mono and stereo stream groupings, default layouts for empty extradata, and sample-rate pass-through with a 48 kHz default for a zero rate. - `invalid_extradata_is_err` verified rejection of malformed XMA1 and XMA2 extradata and checked valid legacy XMA2 stream entries. - `random_extradata_never_panics` checked 3,000 seeded inputs against the XMA1 and XMA2 parsers. Accepted layouts satisfied stream and channel invariants and could initialize the CPU decoder. **Not tested** The full GPU workspace suite and game smoke runs were omitted. The focused tests exercise extradata parsing and decoder construction. **AI use** Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr861-focused.log` and published.
DavidM1911 commented 2026-11-25 11:08:56 +00:00 (Migrated from github.com)

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


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:7159450525 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/861#issuecomment-7159450525). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T10:15:37Z. --- 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:48 +00:00 (Migrated from github.com)

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


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:7245206279 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/861#issuecomment-7245206279). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T20:19:48Z. --- 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:44 +00:00 (Migrated from github.com)

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


Triage (#1607) – head b09ce2c

No open or merged PR adds the same tests. #2032 changes StreamConfig::from_xma2_wfx to accept mixed stereo/mono layouts. The layouts asserted here (e.g. 7 channels with NumStreams 0 -> [2,2,2,1]) and the invalid cases give the same result with or without #2032, so the two do not conflict. 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:7300639267 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/861#issuecomment-7300639267). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T04:20:44Z. --- **Triage (#1607)** – head b09ce2c No open or merged PR adds the same tests. #2032 changes StreamConfig::from_xma2_wfx to accept mixed stereo/mono layouts. The layouts asserted here (e.g. 7 channels with NumStreams 0 -> [2,2,2,1]) and the invalid cases give the same result with or without #2032, so the two do not conflict. 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.
grathepic commented 2026-12-02 23:20:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by grathepic on 2026-12-02T23:20:08Z.


merge-check
base: 078358a058
head: b09ce2c6fe
merge: clean (git diff --check origin/main..HEAD clean)
build: cargo +1.98.1-x86_64-pc-windows-msvc build --offline --locked --workspace -> ok
tests: cargo +1.98.1-x86_64-pc-windows-msvc test --offline --locked --workspace --no-fail-fast -- --test-threads=4 (with XCL_DXC_DIR=C:\VulkanSDK\1.4.363.0\Bin, XCL_SAMPLE_* unset) -> 3009 passed, 0 failed, 52 ignored across 45 harnesses; SKIPPED: 27 notices (22 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps, 1 no dxil.dll, 1 cannot disable the driver cache (Windows Developer Mode required)); failing: none. All 3 new tests in tests/xma2_extradata.rs (xma2waveformatex_layouts, invalid_extradata_is_err, random_extradata_never_panics) passed in 0.06s.
title run: none (Tier 0 test-only diff in crates/xcl/tests/xma2_extradata.rs)
review: Full single-commit diff read (+123/-0, crates/xcl/tests/xma2_extradata.rs) and cross-checked against StreamConfig::from_xma2_wfx and StreamConfig::from_xma1_wfx (crates/xcl/src/hle/xma2/mod.rs). Covers standard XMA2WAVEFORMATEX (cbSize == 34), empty extradata for 1..=16 channels, sample-rate passthrough and 0 -> 48 kHz fallback, legacy rev 4 XMA2WAVEFORMAT, XMAWAVEFORMAT (XMA1), malformed/truncated headers, and 3,000 deterministic seeded inputs verifying panic-freedom and Decoder::new invariants. No production code, dependencies, or SDK/game data added. Minor non-blocking note: legacy rev 3 XMA2WAVEFORMAT is exercised only via the seeded fuzzer rather than an explicit table case, and the PR description's Tested section mentions an earlier commit hash (f1289293) before the rebase to b09ce2c6 (checks are green on b09ce2c6).
performance: none (test-only integration binary running in ~60 ms; no runtime path changed)
verdict: safe to merge (clean merge, full workspace suite passes with 0 failures on NVIDIA RTX 3080, all 3 new XMA1/XMA2 extradata tests pass, and diff is clean and strictly test-only)
hardware / tool and model: NVIDIA GeForce RTX 3080 (driver 32.0.16.2140), AMD Ryzen 7 5800X3D, Windows 11 (10.0.26300.0), Rust 1.98.1-x86_64-pc-windows-msvc, DXC 1.9.0.5512 (VulkanSDK, no dxil.dll) / Antigravity, Gemini 4 Neon

<!-- greyfinch-sync:ivall/xcl:comment:7361863047 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/861#issuecomment-7361863047). Originally posted by [grathepic](https://github.com/grathepic) on 2026-12-02T23:20:08Z. --- merge-check base: 078358a058f7ba5d16690dba8dc4e55d2c88ae0a head: b09ce2c6fe691600df717096513a6df18e970fa2 merge: clean (`git diff --check origin/main..HEAD` clean) build: `cargo +1.98.1-x86_64-pc-windows-msvc build --offline --locked --workspace` -> ok tests: `cargo +1.98.1-x86_64-pc-windows-msvc test --offline --locked --workspace --no-fail-fast -- --test-threads=4` (with `XCL_DXC_DIR=C:\VulkanSDK\1.4.363.0\Bin`, `XCL_SAMPLE_*` unset) -> 3009 passed, 0 failed, 52 ignored across 45 harnesses; SKIPPED: 27 notices (22 `no wave64`, 2 `no heap windows`, 1 `no GPU_UPLOAD heaps`, 1 `no dxil.dll`, 1 `cannot disable the driver cache (Windows Developer Mode required)`); failing: none. All 3 new tests in `tests/xma2_extradata.rs` (`xma2waveformatex_layouts`, `invalid_extradata_is_err`, `random_extradata_never_panics`) passed in 0.06s. title run: none (Tier 0 test-only diff in `crates/xcl/tests/xma2_extradata.rs`) review: Full single-commit diff read (`+123/-0`, `crates/xcl/tests/xma2_extradata.rs`) and cross-checked against `StreamConfig::from_xma2_wfx` and `StreamConfig::from_xma1_wfx` (`crates/xcl/src/hle/xma2/mod.rs`). Covers standard `XMA2WAVEFORMATEX` (`cbSize == 34`), empty extradata for 1..=16 channels, sample-rate passthrough and 0 -> 48 kHz fallback, legacy rev 4 `XMA2WAVEFORMAT`, `XMAWAVEFORMAT` (XMA1), malformed/truncated headers, and 3,000 deterministic seeded inputs verifying panic-freedom and `Decoder::new` invariants. No production code, dependencies, or SDK/game data added. Minor non-blocking note: legacy rev 3 `XMA2WAVEFORMAT` is exercised only via the seeded fuzzer rather than an explicit table case, and the PR description's `Tested` section mentions an earlier commit hash (`f1289293`) before the rebase to `b09ce2c6` (checks are green on `b09ce2c6`). performance: none (test-only integration binary running in ~60 ms; no runtime path changed) verdict: safe to merge (clean merge, full workspace suite passes with 0 failures on NVIDIA RTX 3080, all 3 new XMA1/XMA2 extradata tests pass, and diff is clean and strictly test-only) hardware / tool and model: NVIDIA GeForce RTX 3080 (driver 32.0.16.2140), AMD Ryzen 7 5800X3D, Windows 11 (10.0.26300.0), Rust 1.98.1-x86_64-pc-windows-msvc, DXC 1.9.0.5512 (VulkanSDK, no dxil.dll) / Antigravity, Gemini 4 Neon
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/861:upstream-pr/861'
git switch 'upstream-pr/861'

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