XAudio2: retain incomplete XMA frame continuations #1728

Open
github-bot wants to merge 1 commit from github-bot/gh-1728 into main AGit
Owner

@⁠hajduzsolt on GitHub · 2026-11-24 19:58 UTC · original
hajduzsolt:fix/xma-partial-continuation → main · +34 −1 · 1 files · 1 commits · open

Runtime fix verified with unit tests and RX 9070 XT smoke run.

What is in it

  • Keep an incomplete XMA continuation in the bit reservoir when the remaining frame bits do not fit in the current packet, instead of decoding the partial frame. Addresses XCL-BT-017 in #1488.
  • Add a synthetic regression covering two consecutive incomplete continuation packets. The test fails on the original code because the partial frame is consumed.
  • This is separate from #1460's packet-loss recovery, but touches the same continuation code and will need coordination if both land.

Tested

  • Windows 11 x64, AMD Ryzen 7 9800X3D, AMD Radeon RX 9070 XT 16 GB: cargo test -p xcl --lib xma2::tests -- --test-threads=2 passed (8 passed).
  • cargo test --workspace -- --test-threads=2 passed; library tests: 815 passed, 22 ignored. Other test binaries also passed. Runtime GPU skips were not individually assessed in this run.

Regression run

main:

xcl-smoke v1
commit: 082944135cd2b96288470a595861fa608eee08dc
gpu: AMD Radeon RX 9070 XT
title: b0ea61d5
seconds: 60
exit: 0x0
frames shown: 1678 (PresentX 1678)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13681 MB

PR:

xcl-smoke v1
commit: b4484bc80226370d4aa0efb075150861374315f4
gpu: AMD Radeon RX 9070 XT
title: b0ea61d5
seconds: 60
exit: 0x0
frames shown: 1680 (PresentX 1680)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14558 MB

Not tested

  • An independently encoded valid frame spanning three or more packets; NVIDIA and Intel GPUs.

AI use

  • Codex (GPT 6.1 Terra Medium) wrote the implementation and synthetic unit test; verified with workspace unit tests and local RX 9070 XT smoke run.
**@⁠hajduzsolt** on GitHub · 2026-11-24 19:58 UTC · [original](https://github.com/xcl-dev/xcl/pull/1728) `hajduzsolt:fix/xma-partial-continuation` → `main` · +34 −1 · 1 files · 1 commits · open Runtime fix verified with unit tests and RX 9070 XT smoke run. **What is in it** - Keep an incomplete XMA continuation in the bit reservoir when the remaining frame bits do not fit in the current packet, instead of decoding the partial frame. Addresses XCL-BT-017 in #1488. - Add a synthetic regression covering two consecutive incomplete continuation packets. The test fails on the original code because the partial frame is consumed. - This is separate from #1460's packet-loss recovery, but touches the same continuation code and will need coordination if both land. **Tested** - Windows 11 x64, AMD Ryzen 7 9800X3D, AMD Radeon RX 9070 XT 16 GB: `cargo test -p xcl --lib xma2::tests -- --test-threads=2` passed (8 passed). - `cargo test --workspace -- --test-threads=2` passed; library tests: 815 passed, 22 ignored. Other test binaries also passed. Runtime GPU skips were not individually assessed in this run. **Regression run** main: ``` xcl-smoke v1 commit: 082944135cd2b96288470a595861fa608eee08dc gpu: AMD Radeon RX 9070 XT title: b0ea61d5 seconds: 60 exit: 0x0 frames shown: 1678 (PresentX 1678) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13681 MB ``` PR: ``` xcl-smoke v1 commit: b4484bc80226370d4aa0efb075150861374315f4 gpu: AMD Radeon RX 9070 XT title: b0ea61d5 seconds: 60 exit: 0x0 frames shown: 1680 (PresentX 1680) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14558 MB ``` **Not tested** - An independently encoded valid frame spanning three or more packets; NVIDIA and Intel GPUs. **AI use** - Codex (GPT 6.1 Terra Medium) wrote the implementation and synthetic unit test; verified with workspace unit tests and local RX 9070 XT smoke run.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:02:50 +00:00
Author
Owner

@⁠frenziedcoder on GitHub · 2026-11-24 21:54 UTC · original

NVIDIA test report for 14dec4b: the NVIDIA run the description lists as not tested. Full suite green, the PR's own test passes, and a clean smoke pair (1654 vs 1656 frames).

Tested

  • NVIDIA GeForce RTX 5080 16 GB (driver 617.14, 32-lane waves), AMD Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 25H2 (26200.9974), rustc 1.100.0 stable-x86_64-pc-windows-msvc, DXC 1.8.2502.11 (SDK 10.0.26100.0). Exact head 14dec4b98d4b45c2ab1ef820454d76a237780748, no local changes.
  • cargo build --workspace && cargo test --workspace -- --test-threads=4 (debug): 864 passed, 0 failed, 42 ignored; the PR's own test passes. SKIPPED: gpu_geometry_wave32_prefix_count_over_a_mask (no wave64), gpu_wave32_program_in_wave64_hardware (no wave64), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).

Regression run (scripts/smoke.ps1 -Seconds 60, release, the retail title of #505 at its start screen; XCL_PSO_PRELOAD=0 for both builds, because this machine's preload list holds the program of #1307)

base (6c89285, this PR's merge base with main):

xcl-smoke v1
commit: 6c89285b8b529bde59cd17a26b911c39912fb677
gpu: NVIDIA GeForce RTX 5080
title: RetailTitle
seconds: 60
exit: 0x0
frames shown: 1656 (PresentX 1656)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14603 MB

this PR:

xcl-smoke v1
commit: 14dec4b98d4b45c2ab1ef820454d76a237780748
gpu: NVIDIA GeForce RTX 5080
title: RetailTitle
seconds: 60
exit: 0x0
frames shown: 1654 (PresentX 1654)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14595 MB

Not tested: an independently encoded frame across three or more packets; XMA itself in this title (its report shows Opus through xapu, not XMA voices, at the start screen); AMD.

AI use: Claude Code (Claude Opus 5.5) built and ran the tests and smoke runs on my machine and wrote this report; I checked it.

**@⁠frenziedcoder** on GitHub · 2026-11-24 21:54 UTC · [original](https://github.com/xcl-dev/xcl/pull/1728#issuecomment-7145549780) **NVIDIA test report for `14dec4b`: the NVIDIA run the description lists as not tested. Full suite green, the PR's own test passes, and a clean smoke pair (1654 vs 1656 frames).** **Tested** - NVIDIA GeForce RTX 5080 16 GB (driver 617.14, 32-lane waves), AMD Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 25H2 (26200.9974), rustc 1.100.0 `stable-x86_64-pc-windows-msvc`, DXC 1.8.2502.11 (SDK 10.0.26100.0). Exact head `14dec4b98d4b45c2ab1ef820454d76a237780748`, no local changes. - `cargo build --workspace && cargo test --workspace -- --test-threads=4` (debug): **864 passed, 0 failed, 42 ignored**; the PR's own test passes. SKIPPED: `gpu_geometry_wave32_prefix_count_over_a_mask` (no wave64), `gpu_wave32_program_in_wave64_hardware` (no wave64), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). **Regression run** (`scripts/smoke.ps1 -Seconds 60`, release, the retail title of #505 at its start screen; `XCL_PSO_PRELOAD=0` for both builds, because this machine's preload list holds the program of #1307) base (`6c89285`, this PR's merge base with `main`): ``` xcl-smoke v1 commit: 6c89285b8b529bde59cd17a26b911c39912fb677 gpu: NVIDIA GeForce RTX 5080 title: RetailTitle seconds: 60 exit: 0x0 frames shown: 1656 (PresentX 1656) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14603 MB ``` this PR: ``` xcl-smoke v1 commit: 14dec4b98d4b45c2ab1ef820454d76a237780748 gpu: NVIDIA GeForce RTX 5080 title: RetailTitle seconds: 60 exit: 0x0 frames shown: 1654 (PresentX 1654) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14595 MB ``` **Not tested:** an independently encoded frame across three or more packets; XMA itself in this title (its report shows Opus through `xapu`, not XMA voices, at the start screen); AMD. *AI use: Claude Code (Claude Opus 5.5) built and ran the tests and smoke runs on my machine and wrote this report; I checked it.*
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 22:37 UTC · original

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

  • cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 22:37 UTC · [original](https://github.com/xcl-dev/xcl/pull/1728#issuecomment-7146456982) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~23 ignored. Thanks!
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 03:55 UTC · original

PR #1728 — XAudio2 XMA continuation verification

Verified head: 14dec4b98d4b45c2ab1ef820454d76a237780748 (clean detached checkout).

Environment

STOR-WINLAB, Windows 11 Enterprise Evaluation build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB (driver 32.0.101.9175, waves 8–32, DoublePrecisionFloatShaderOps=0). DXC/DXIL 1.9.2609.5, rustc 1.100.0 (0ef1bc386 2026-11-09), unoptimized builds with debug info disabled.

Tested

  • cargo build --workspace and cargo test --workspace --no-run succeeded.
  • cargo test -p xcl hle::xma2 -- --nocapture under the Arc lock: 8 passed, 0 failed, 0 ignored, 0 explicit skips. The new regression passed. Across two incomplete continuation packets, the decoder retained the accumulated bits, produced no frame, and kept packet loss clear. The existing cross-packet streaming and XMA1/XMA2 reference-vector tests also passed.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 under the Arc lock: 846 passed, 18 failed, 42 ignored, summed across 20 harness summaries. Cargo exited 101. The test title reported a pass for its XAudio2 check (XMA2/Opus decoding, PCM and callbacks).

Workspace failures and skips

  • GPU unit tests accounted for 17 failures. Thirteen reported CreateComputePipelineState error 0x80070057, including double-precision cases. Four failed assertions covering fused FMA overflow, mip sampling, FP16 high-half preservation, and wave64 pixel reductions.
  • One test-title integration test failed because its D3D12.X dynamic depth-bias check rendered blue where it expected green.
  • The suite log contains exactly 3 SKIPPED lines: two for unavailable wave64 and one for unavailable heap windows. These early returns earn no coverage.

Not tested

No main baseline was run to establish whether the GPU failures predate this head. Retail-title smoke and sample-dependent checks were outside this run (XCL_SAMPLE_* unset). D3D12 debug-layer coverage was unavailable (d3d12SDKLayers.dll absent). No other adapters were tested.

AI use

T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1728-suite.log and published.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 03:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/1728#issuecomment-7152362420) # PR #1728 — XAudio2 XMA continuation verification Verified head: `14dec4b98d4b45c2ab1ef820454d76a237780748` (clean detached checkout). **Environment** STOR-WINLAB, Windows 11 Enterprise Evaluation build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB (driver 32.0.101.9175, waves 8–32, `DoublePrecisionFloatShaderOps=0`). DXC/DXIL 1.9.2609.5, rustc 1.100.0 (0ef1bc386 2026-11-09), unoptimized builds with debug info disabled. **Tested** - `cargo build --workspace` and `cargo test --workspace --no-run` succeeded. - `cargo test -p xcl hle::xma2 -- --nocapture` under the Arc lock: **8 passed, 0 failed, 0 ignored, 0 explicit skips**. The new regression passed. Across two incomplete continuation packets, the decoder retained the accumulated bits, produced no frame, and kept packet loss clear. The existing cross-packet streaming and XMA1/XMA2 reference-vector tests also passed. - `cargo test --workspace --no-fail-fast -- --test-threads=4` under the Arc lock: **846 passed, 18 failed, 42 ignored**, summed across 20 harness summaries. Cargo exited 101. The test title reported a pass for its XAudio2 check (XMA2/Opus decoding, PCM and callbacks). **Workspace failures and skips** - GPU unit tests accounted for 17 failures. Thirteen reported `CreateComputePipelineState` error 0x80070057, including double-precision cases. Four failed assertions covering fused FMA overflow, mip sampling, FP16 high-half preservation, and wave64 pixel reductions. - One test-title integration test failed because its D3D12.X dynamic depth-bias check rendered blue where it expected green. - The suite log contains exactly **3 `SKIPPED` lines**: two for unavailable wave64 and one for unavailable heap windows. These early returns earn no coverage. **Not tested** No main baseline was run to establish whether the GPU failures predate this head. Retail-title smoke and sample-dependent checks were outside this run (`XCL_SAMPLE_*` unset). D3D12 debug-layer coverage was unavailable (`d3d12SDKLayers.dll` absent). No other adapters were tested. **AI use** T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr1728-suite.log` and published.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 06:17 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 06:17 UTC · [original](https://github.com/xcl-dev/xcl/pull/1728#issuecomment-7184278837) 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 pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1728/head:github-bot/gh-1728'
git switch 'github-bot/gh-1728'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1728'
git switch 'github-bot/gh-1728'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1728'
git switch 'github-bot/gh-1728'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1728'
git switch 'main'
git merge --squash 'github-bot/gh-1728'
git switch 'main'
git merge --ff-only 'github-bot/gh-1728'
git switch 'main'
git merge 'github-bot/gh-1728'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.