XAudio2: keep XMA2 skip_packets == 0xFF EOF sentinel from decrementing #1581
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1581
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1581"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@b3IKK on GitHub · 2026-11-24 17:54 UTC · original
b3IKK:xma2/skip-packets-eof-sentinel→main· +29 −1 · 1 files · 1 commits · openAddresses
XCL-BT-016from #1488.In XMA2 packet headers,
PacketSkipCount == 0xFF(255) is the end-of-stream sentinel meaning no further packets belong to that stream.Decoder::advance_streamdecremented every stream'sskip_packetsunconditionally (s.skip_packets.saturating_sub(1)), so after 255 packets of sibling streams in a multi-stream XMA2 track, a finished stream's counter reached0and stole subsequent packets belonging to still-active streams.This skips decrementing
s.skip_packetswhen it equals0xFF.What is in it
crates/xcl/src/hle/xma2/mod.rs: preserveskip_packets == 0xFFinDecoder::advance_stream; add unit testeof_skip_packets_sentinel_255_is_never_decremented(verified failing before the fix with254 != 255).Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1).\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4): 777 passed, 0 failed, 41 ignored (SKIPPED GPU tests: 2no wave64—gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask,gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware; 1no heap windows—heap_window_out_of_memory_falls_back_to_the_switch_form)cargo test -p xcl --lib xma2: 10 passed, 0 failed (eof_skip_packets_sentinel_255_is_never_decrementedfailed before the fix)Regression run
main:
PR:
Not tested
AI use
XCL-BT-016from #1488, wrote the fix and unit test, ran the test suite andscripts/smoke.ps1regression runs, and drafted this PR description.@futurepro62 on GitHub · 2026-11-24 18:53 UTC · original
Full-suite run, since this PR has no test report yet. Tested exact head
da1b46c(on its base9e3831e).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form: 776 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.eof_skip_packets_sentinel_255_is_never_decremented.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 777 passed, 0 failed, 41 ignored. SKIPPED:heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).heap_window_out_of_memory_falls_back_to_the_switch_formwas skipped with--skip. It fails on main9e3831etoo, not because of this PR: underXCL_REQUIRE_GPU=mesh,runner::skip_testturns every skip except "no wave64" into a failure, including this test's opt-in "no heap windows" skip (XCL_HEAP_WINDOWSunset). Reported as #1651.Not tested
AI use
@DavidM1911 on GitHub · 2026-11-24 20:02 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
@JJAutoCompare on GitHub · 2026-11-25 05:14 UTC · original
Empirical test report (
da1b46c2)Hardware / environment
da1b46c255816e4f2057ba5b5aee4409e930921d.rustc --versionreturnedrustc 1.100.0 (0ef1bc386 2026-11-09).--versionreturneddxcompiler.dll: 1.9(5512-01b62ad4)(1.9.2609.5) - 1.9.2609.5 (01b62ad47).Commands and results
cargo test --workspace --no-runcompleted with exit code 0 and compiled the workspace test executables. Test counts are inapplicable to this compile-only command.Both commands ran directly, outside
Invoke-ArcTest.ps1, with zero Arc GPU mutex hold. The focused counts came from the test summary and the case-sensitiveSKIPPEDmarker in the captured output.Observed behavior
The XMA2 regression test passed. Across 300 stream advances, the finished stream kept its
0xFFend-of-stream sentinel and the active stream stayed selected. The active stream also stayed selected when its own skip counter was set to1. The test uses an in-memory decoder and requires no audio endpoint. There were no audio endpoint skips.Not tested
Coverage was limited to workspace test compilation and the PR's focused CPU regression test. 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
pr1581-focused.logand published.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.