[removed by author] #884

Closed
shortside wants to merge 1 commit from upstream-pr/890 into main
shortside commented 2026-11-24 07:44:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by shortside on 2026-11-24T07:44:03Z.


[removed by author]

<!-- greyfinch-sync:ivall/xcl:issue:5468141495 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/890). Originally posted by [shortside](https://github.com/shortside) on 2026-11-24T07:44:03Z. --- [removed by author]
crastinator commented 2026-11-24 08:01:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by crastinator on 2026-11-24T08:01:49Z.

Review: COMMENTED


Tested on Linux with Proton's Wine, in addition to the CrossOver run in the description: same failure on main, fixed by this PR.

Tested (head 76d2ff7, and merged onto main 1ec4c98: no conflicts)

  • AMD Radeon RX 6700 XT (RDNA2, gfx1031, RADV NAVI22, Mesa 26.3.1), Ryzen 7 5700X, Linux 7.3.5 (CachyOS)
  • Wine: Proton Experimental 11.0-20261112 (its files/bin/wine, kernel write watches), with its own vkd3d-proton (stock, not the #257 patch) and DXVK v3.1.1-209 dxgi; VKD3D_CONFIG=ignore_shared_fence; DXC 1.9.2609
  • Cross-built on Linux for x86_64-pc-windows-msvc (clang-cl / lld-link 23.1.5, xwin SDK 10.0.26100), Rust 1.99.1, debug; the lib test binary run under Wine
  • On main 1ec4c98, hle::xaudio2::tests::xma2_source_voice_decodes_and_manages_lifetime fails here too, with left: 0, right: 12291 at xaudio2.rs:1599. That is Proton's Wine giving a null pCurrentBufferContext, the same as CrossOver.
  • hle::xaudio2:: --test-threads=1, 3 runs each: head 76d2ff7 9 passed / 0 failed every time. Merged onto 1ec4c98, also 9 / 0 every time. main: 8 passed / 1 failed.

Not tested

  • Windows (where the host gives a context and the new path should not be taken), a retail title, audible output.

AI use

  • Claude Code (Claude Opus 5.5) built the branches, ran the tests and wrote this report; I checked the results.

Update (merged onto main 930e8b4, vkd3d-proton v3.1 + #257 patch + #775's dxil-spirv, opus.dll from #257's build-opus.sh)

  • hle::xaudio2:: 9 passed / 0 failed in 3 runs, now including opus_source_voice_decodes_and_manages_lifetime, which only reaches the check with an Opus decoder. The e2e test title's XAudio2 check passes as well.
  • One gap: without opus.dll, which is a stock Wine/Proton setup since there is no MSOpusDecoder.dll there, the e2e test title still fails with Opus GetState: ctx=0x0, queued=1. The Opus voice then takes the silence fallback in submit_source_buffer. That voice is not in DECODED_VOICES, so get_state never reaches the new fallback, and the host's null context passes through. This might be out of scope here, but it should be named somewhere, since #257 makes libopus optional.
<!-- greyfinch-sync:ivall/xcl:review:6035608448 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/890#pullrequestreview-6035608448). Originally posted by [crastinator](https://github.com/crastinator) on 2026-11-24T08:01:49Z. **Review:** COMMENTED --- Tested on Linux with Proton's Wine, in addition to the CrossOver run in the description: same failure on `main`, fixed by this PR. **Tested** (head `76d2ff7`, and merged onto `main` `1ec4c98`: no conflicts) - AMD Radeon RX 6700 XT (RDNA2, gfx1031, RADV NAVI22, Mesa 26.3.1), Ryzen 7 5700X, Linux 7.3.5 (CachyOS) - Wine: Proton Experimental 11.0-20261112 (its `files/bin/wine`, kernel write watches), with its own vkd3d-proton (stock, not the #257 patch) and DXVK v3.1.1-209 `dxgi`; `VKD3D_CONFIG=ignore_shared_fence`; DXC 1.9.2609 - Cross-built on Linux for `x86_64-pc-windows-msvc` (clang-cl / lld-link 23.1.5, xwin SDK 10.0.26100), Rust 1.99.1, debug; the lib test binary run under Wine - On `main` `1ec4c98`, `hle::xaudio2::tests::xma2_source_voice_decodes_and_manages_lifetime` fails here too, with `left: 0, right: 12291` at `xaudio2.rs:1599`. That is Proton's Wine giving a null `pCurrentBufferContext`, the same as CrossOver. - `hle::xaudio2:: --test-threads=1`, 3 runs each: head `76d2ff7` 9 passed / 0 failed every time. Merged onto `1ec4c98`, also 9 / 0 every time. `main`: 8 passed / 1 failed. **Not tested** - Windows (where the host gives a context and the new path should not be taken), a retail title, audible output. **AI use** - Claude Code (Claude Opus 5.5) built the branches, ran the tests and wrote this report; I checked the results. **Update** (merged onto `main` `930e8b4`, vkd3d-proton v3.1 + #257 patch + #775's dxil-spirv, `opus.dll` from #257's `build-opus.sh`) - `hle::xaudio2::` 9 passed / 0 failed in 3 runs, now including `opus_source_voice_decodes_and_manages_lifetime`, which only reaches the check with an Opus decoder. The e2e test title's XAudio2 check passes as well. - One gap: **without** `opus.dll`, which is a stock Wine/Proton setup since there is no `MSOpusDecoder.dll` there, the e2e test title still fails with `Opus GetState: ctx=0x0, queued=1`. The Opus voice then takes the silence fallback in `submit_source_buffer`. That voice is not in `DECODED_VOICES`, so `get_state` never reaches the new fallback, and the host's null context passes through. This might be out of scope here, but it should be named somewhere, since #257 makes libopus optional.
ettehn commented 2026-11-24 08:03:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ettehn on 2026-11-24T07:46:23Z.


Native Windows x64 verification on 76d2ff732e: all 9 XAudio2 unit tests passed with system XAudio2 2.9 (cargo test -p xcl --lib hle::xaudio2:: -- --test-threads=1 --nocapture). Both source-voice lifetime tests ran to completion, including the Opus path using Windows Media Foundation’s MSOpusDecoder. Neither took the missing-device/decoder skip.

I also exercised the fallback separately. In a local test build I verified that the native GetState result had two queued buffers and a non-null current context, then cleared only that context immediately after the host call. The fallback returned the first submitted context for both codecs: 0x1001 for Opus and 0x3003 for XMA2. Both tests passed their subsequent playback callback and lifetime assertions. This second run simulates the missing host context on Windows; Wine and retail playback were outside this check.

OpenAI Codex (GPT-6.2 Astra) assisted with verification.

<!-- greyfinch-sync:ivall/xcl:comment:7125354697 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/890#issuecomment-7125354697). Originally posted by [ettehn](https://github.com/ettehn) on 2026-11-24T07:46:23Z. --- Native Windows x64 verification on 76d2ff732e8af140a40570f7de38289a16861380: all 9 XAudio2 unit tests passed with system XAudio2 2.9 (cargo test -p xcl --lib hle::xaudio2:: -- --test-threads=1 --nocapture). Both source-voice lifetime tests ran to completion, including the Opus path using Windows Media Foundation’s MSOpusDecoder. Neither took the missing-device/decoder skip. I also exercised the fallback separately. In a local test build I verified that the native GetState result had two queued buffers and a non-null current context, then cleared only that context immediately after the host call. The fallback returned the first submitted context for both codecs: 0x1001 for Opus and 0x3003 for XMA2. Both tests passed their subsequent playback callback and lifetime assertions. This second run simulates the missing host context on Windows; Wine and retail playback were outside this check. OpenAI Codex (GPT-6.2 Astra) assisted with verification.
ClosetPie107 commented 2026-11-24 08:03:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-11-24T07:57:31Z.


Tested on Linux / RADV, and it also fixes the Opus variant of the same test.

Tested

  • AMD Radeon RX 9070 (RADV GFX1201, Mesa 26.3.1), Ryzen 5 9600X, CachyOS, kernel 7.3.5. Proton Experimental's Wine (experimental-11.0-20261112), vkd3d-proton v3.1 + #257's patch, DXVK v3.1.1-209, DXC 1.9.2609.5, opus.dll (libopus) from #257's build-opus.sh through XCL_OPUS_DIR.
  • This PR's head 76d2ff7 (base beaa245) against main 1ec4c98, both release builds for x86_64-pc-windows-gnu, Rust 1.96.0.
  • xcl-<hash>.exe hle::xaudio2:: --test-threads=1 under Wine, 3 runs each:
    • main: 7 passed, 2 failed every run: xma2_source_voice_decodes_and_manages_lifetime (left: 0, right: 12291) and opus_source_voice_decodes_and_manages_lifetime (left: 0, right: 4097, the same GetState context check).
    • head: 9 passed, 0 failed every run.
  • The Opus test only reaches that check when an Opus decoder is there. That's probably why the description and the other Wine reports only name the XMA2 one.

Not tested: the whole suite on the head, the e2e test title's XAudio2 check (XMA2 GetState: ctx=0x0, queued=1), and Windows.

AI use: T3 Code (Claude Opus 5.5) built both, ran the tests and wrote this comment. The runs are real, on the hardware above, and I checked the report before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7125561693 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/890#issuecomment-7125561693). Originally posted by [ClosetPie107](https://github.com/ClosetPie107) on 2026-11-24T07:57:31Z. --- Tested on Linux / RADV, and it also fixes the Opus variant of the same test. **Tested** - AMD Radeon RX 9070 (RADV GFX1201, Mesa 26.3.1), Ryzen 5 9600X, CachyOS, kernel 7.3.5. Proton Experimental's Wine (`experimental-11.0-20261112`), vkd3d-proton v3.1 + #257's patch, DXVK `v3.1.1-209`, DXC 1.9.2609.5, `opus.dll` (libopus) from #257's `build-opus.sh` through `XCL_OPUS_DIR`. - This PR's head `76d2ff7` (base `beaa245`) against `main` `1ec4c98`, both release builds for `x86_64-pc-windows-gnu`, Rust 1.96.0. - `xcl-<hash>.exe hle::xaudio2:: --test-threads=1` under Wine, 3 runs each: - `main`: **7 passed, 2 failed** every run: `xma2_source_voice_decodes_and_manages_lifetime` (`left: 0, right: 12291`) and `opus_source_voice_decodes_and_manages_lifetime` (`left: 0, right: 4097`, the same `GetState` context check). - head: **9 passed, 0 failed** every run. - The Opus test only reaches that check when an Opus decoder is there. That's probably why the description and the other Wine reports only name the XMA2 one. **Not tested:** the whole suite on the head, the `e2e` test title's XAudio2 check (`XMA2 GetState: ctx=0x0, queued=1`), and Windows. **AI use:** T3 Code (Claude Opus 5.5) built both, ran the tests and wrote this comment. The runs are real, on the hardware above, and I checked the report before posting.
SlopTart commented 2026-11-24 10:04:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-24T09:34:12Z.


Linux / AMD RDNA3 datapoint.

Merged state: head 76d2ff7 onto main 077ce40, clean merge.

Full suite, cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 707 passed, 9 failed, 41 ignored; failures are the known Wine-lane set from my #42 rows plus this rig's title-textures flake family (see #718). GetState oldest-buffer naming green.

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:7127594905 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/890#issuecomment-7127594905). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-24T09:34:12Z. --- Linux / AMD RDNA3 datapoint. **Merged state:** head `76d2ff7` onto main `077ce40`, clean merge. **Full suite, `cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4`:** **707 passed, 9 failed, 41 ignored**; failures are the known Wine-lane set from my #42 rows plus this rig's title-textures flake family (see #718). GetState oldest-buffer naming green. **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.
vakaobr commented 2026-11-24 11:05:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vakaobr on 2026-11-24T10:27:46Z.


Test report from macOS (CrossOver/Wine), head 76d2ff7 applied to main 9aec53d, with the cause on this host. Part of #258.

Under CrossOver 26.3 (Wine 11.0), GetState on a source voice that has queued buffers but has not started returns pCurrentBufferContext = NULL. In upstream FAudio, 24.01 to 26.03 only name a buffer once it has started, and 26.04 names queued_buffers[0], as Windows does; Wine 11.0 bundles FAudio 25.12 (I did not check the FAudio inside the CrossOver binary). The XMA2 lifetime test's left: 0, right: 12291 is that context (0x3003), not a sample count: the decode asserts before it pass. A temporary probe of the host's raw GetState showed ctx=0x0 queued=2 before Start and XCL's token after the first OnBufferStart.

Tested

  • MacBook Pro M5 Pro, macOS 27.2.1, Rosetta 2, CrossOver 26.3.0.39832; Rust 1.100.0, x86_64-pc-windows-gnu (mingw-w64 GCC 16.2.0), debug.
  • The 9 hle::xaudio2:: tests, one per process (--exact <name> --test-threads=1), 3 runs each: main 8 passed, 1 failed (xma2_source_voice_decodes_and_manages_lifetime), 0 ignored; with this PR 9 passed, 0 failed, 0 ignored.
  • opus_source_voice_decodes_and_manages_lifetime returns early in all runs ("MSOpusDecoder.dll not available"), so Opus under Wine is not covered here.
  • Mutation: with max_by_key instead of min_by_key in the fallback, the XMA2 test fails with 0x4004 (CTX_BAD).

Not tested

  • Windows, the whole suite, GPU tests, Opus under Wine, plain PCM voices (the fallback covers decoded voices only), any title.

AI use

  • Claude Code with Claude Opus 5.5 found the cause, added and removed the probe, ran the tests above on this machine and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7128813485 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/890#issuecomment-7128813485). Originally posted by [vakaobr](https://github.com/vakaobr) on 2026-11-24T10:27:46Z. --- Test report from macOS (CrossOver/Wine), head `76d2ff7` applied to `main` `9aec53d`, with the cause on this host. Part of #258. Under CrossOver 26.3 (Wine 11.0), `GetState` on a source voice that has queued buffers but has not started returns `pCurrentBufferContext = NULL`. In upstream FAudio, 24.01 to 26.03 only name a buffer once it has started, and 26.04 names `queued_buffers[0]`, as Windows does; Wine 11.0 bundles FAudio 25.12 (I did not check the FAudio inside the CrossOver binary). The XMA2 lifetime test's `left: 0, right: 12291` is that context (`0x3003`), not a sample count: the decode asserts before it pass. A temporary probe of the host's raw `GetState` showed `ctx=0x0 queued=2` before Start and XCL's token after the first `OnBufferStart`. **Tested** - MacBook Pro M5 Pro, macOS 27.2.1, Rosetta 2, CrossOver 26.3.0.39832; Rust 1.100.0, `x86_64-pc-windows-gnu` (mingw-w64 GCC 16.2.0), debug. - The 9 `hle::xaudio2::` tests, one per process (`--exact <name> --test-threads=1`), 3 runs each: `main` 8 passed, 1 failed (`xma2_source_voice_decodes_and_manages_lifetime`), 0 ignored; with this PR 9 passed, 0 failed, 0 ignored. - `opus_source_voice_decodes_and_manages_lifetime` returns early in all runs ("MSOpusDecoder.dll not available"), so Opus under Wine is not covered here. - Mutation: with `max_by_key` instead of `min_by_key` in the fallback, the XMA2 test fails with `0x4004` (`CTX_BAD`). **Not tested** - Windows, the whole suite, GPU tests, Opus under Wine, plain PCM voices (the fallback covers decoded voices only), any title. **AI use** - Claude Code with Claude Opus 5.5 found the cause, added and removed the probe, ran the tests above on this machine and wrote this report.
mikebuckets171 commented 2026-11-24 12:05:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by mikebuckets171 on 2026-11-24T11:09:51Z.


Verified on a second host, on the gnullvm target: the failure reproduces on three different main commits and on the Mac port branch, and your commit fixes it on today's main.

Host: MacBook Pro M5 Pro (48 GB), macOS 27.2.1, CrossOver 26 with D3DMetal, Rosetta 2, Rust 1.100.0, x86_64-pc-windows-gnullvm with LLVM-MinGW 20261117 (clang 23.1.6), --release --locked, test binaries under Wine, one test per process (--exact <full test path> --nocapture --test-threads=1), a fresh data root for each run. hle::xaudio2::tests::xma2_source_voice_decodes_and_manages_lifetime:

tree result
1ec4c98 (this PR's stated base) FAILED 2/2 - panicked at crates/xcl/src/hle/xaudio2.rs:1599:13: assertion left == right failed, left: 0, right: 12291, exit 0x65
beaa245 (the base the description ran on) FAILED 2/2 - identical
6efdabc (today's main) FAILED 3/3 - identical
mac-on-main-wip db065d8 (the Mac port branch) FAILED 2/2 - identical
6efdabc + this PR's commit 76d2ff7 cherry-picked (clean, +16 / -2) ok 4/4, 0.29-0.32 s each, exit 0x0

What the numbers are, since they read like a sample count and are not: the failing assert is assert_eq!({ st.current_buffer_context } as usize, CTX_VALID) at xaudio2.rs:1599, with const CTX_VALID: usize = 0x3003 = 12291 - so left: 0, right: 12291 is GetState's current-buffer token, exactly as your description says. Everything before it passes on this host: both submits return S_OK, stats().xma_buffers_decoded is +1 and xma_decode_errors +1 (lines 1593-1594), buffers_queued == 2 (1598). The assert sits before start(voice, 0, 0) at 1603, so what reads 0 is which buffer GetState names as current for a decoded voice with two buffers submitted and not yet started - not the XMA2 decode.

Two things worth having on the record:

  • Not a toolchain artifact. The same failure appears on the gnullvm / LLVM-MinGW build here and on the clang-cl + xwin MSVC build the description used, and on the Mac port branch as well as on main - so the fix is not papering over a cross-build difference.
  • The commit still applies to current main. Cherry-picked onto 6efdabc it applies cleanly (xaudio2.rs, +16 / -2, no conflicts) even though the PR's base is 1ec4c98, and the PR reports mergeable: true. So the pair above describes main today against your change, not against a stale base.

One methodological note, in case anyone else is about to run this pair: my first attempt at a "clean main" run looked like a pass, and it was a mistake of mine - git checkout -- . restores the working tree from the index, so a staged cherry-pick stayed in the sources while HEAD still read as the base commit. Re-run in a worktree whose working tree was verified clean (I checked for the patch's NEXT_BUFFER_SEQ marker in the file), and the base fails as above. Worth stating because "it passed here" would otherwise send someone down a dead end.

Host: macOS 27.2.1 (Apple silicon, M5 Pro), CrossOver 26, D3DMetal; local inference unloaded and the bottle's wineserver stopped for each run. AI use: GPT-6 Luna built every tree, ran the tests and drafted this comment; the counts, line numbers and codes are from those runs.

<!-- greyfinch-sync:ivall/xcl:comment:7129739382 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/890#issuecomment-7129739382). Originally posted by [mikebuckets171](https://github.com/mikebuckets171) on 2026-11-24T11:09:51Z. --- **Verified on a second host, on the `gnullvm` target: the failure reproduces on three different `main` commits and on the Mac port branch, and your commit fixes it on today's `main`.** Host: MacBook Pro M5 Pro (48 GB), macOS 27.2.1, CrossOver 26 with D3DMetal, Rosetta 2, Rust 1.100.0, `x86_64-pc-windows-gnullvm` with LLVM-MinGW 20261117 (clang 23.1.6), `--release --locked`, test binaries under Wine, one test per process (`--exact <full test path> --nocapture --test-threads=1`), a fresh data root for each run. `hle::xaudio2::tests::xma2_source_voice_decodes_and_manages_lifetime`: | tree | result | |---|---| | `1ec4c98` (this PR's stated base) | **FAILED** 2/2 - `panicked at crates/xcl/src/hle/xaudio2.rs:1599:13: assertion left == right failed, left: 0, right: 12291`, exit `0x65` | | `beaa245` (the base the description ran on) | **FAILED** 2/2 - identical | | `6efdabc` (today's main) | **FAILED** 3/3 - identical | | `mac-on-main-wip` `db065d8` (the Mac port branch) | **FAILED** 2/2 - identical | | `6efdabc` + this PR's commit `76d2ff7` cherry-picked (clean, +16 / -2) | **ok** 4/4, 0.29-0.32 s each, exit `0x0` | **What the numbers are**, since they read like a sample count and are not: the failing assert is `assert_eq!({ st.current_buffer_context } as usize, CTX_VALID)` at `xaudio2.rs:1599`, with `const CTX_VALID: usize = 0x3003` = 12291 - so `left: 0, right: 12291` is `GetState`'s current-buffer token, exactly as your description says. Everything before it passes on this host: both submits return S_OK, `stats().xma_buffers_decoded` is +1 and `xma_decode_errors` +1 (lines 1593-1594), `buffers_queued == 2` (1598). The assert sits *before* `start(voice, 0, 0)` at 1603, so what reads 0 is which buffer `GetState` names as current for a decoded voice with two buffers submitted and not yet started - not the XMA2 decode. Two things worth having on the record: - **Not a toolchain artifact.** The same failure appears on the `gnullvm` / LLVM-MinGW build here and on the clang-cl + xwin MSVC build the description used, and on the Mac port branch as well as on main - so the fix is not papering over a cross-build difference. - **The commit still applies to current main.** Cherry-picked onto `6efdabc` it applies cleanly (`xaudio2.rs`, +16 / -2, no conflicts) even though the PR's base is `1ec4c98`, and the PR reports `mergeable: true`. So the pair above describes `main` today against your change, not against a stale base. One methodological note, in case anyone else is about to run this pair: my first attempt at a "clean main" run looked like a pass, and it was a mistake of mine - `git checkout -- .` restores the working tree from the *index*, so a staged cherry-pick stayed in the sources while HEAD still read as the base commit. Re-run in a worktree whose working tree was verified clean (I checked for the patch's `NEXT_BUFFER_SEQ` marker in the file), and the base fails as above. Worth stating because "it passed here" would otherwise send someone down a dead end. Host: macOS 27.2.1 (Apple silicon, M5 Pro), CrossOver 26, D3DMetal; local inference unloaded and the bottle's wineserver stopped for each run. **AI use**: GPT-6 Luna built every tree, ran the tests and drafted this comment; the counts, line numbers and codes are from those runs.
pablogonz12 commented 2026-11-24 19:07:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by pablogonz12 on 2026-11-24T18:48:42Z.


Test report on RDNA4 / Wine: 76d2ff7 merged onto main 9e3831e (clean merge). It fixes the XMA2 check of the e2e test title, and shows a second GetState gap that this change does not reach.

Tested

  • AMD Radeon RX 9070 XT (RADV, Mesa 26.3.1), Ryzen 9 9900X, CachyOS; Wine GE-Proton11-14, vkd3d-proton v3.1, DXC 1.9.2609.5; release, x86_64-pc-windows-msvc cross-built with cargo-xwin (static CRT), no Windows build.
  • cargo test -p xcl --lib binary under Wine, --test-threads=4, with --skip jumps_to_outer_loop_heads_are_structured (it aborts the whole binary here, #1246): 722 passed, 4 failed, 21 ignored. The four: gpu_f64_roots, gpu_f64_math_random, gpu_nonfused_mad_and_mac_prevent_fma_contraction, gpu_depth_buffer_created_for_unordered_access_is_placed. None is XAudio2; hle::xaudio2 alone: 9 passed.
  • tests/e2e.rs test_title_runs_and_game_folder_is_untouched, run alone:
    • main: [FAIL] XAudio2: ... XMA2 GetState: ctx=0x0, queued=1.
    • with this PR: the XMA2 check passes; the next check fails: [FAIL] XAudio2: ... Opus GetState: ctx=0x0, queued=1. The log of that run says Opus: decoder = none (MSOpusDecoder.dll not available; no opus.dll ...) and Opus decoder unavailable ... falling back to silence. The voice is then not one of the decoded voices (it takes the XMA silence path of submit_source_buffer), so get_state has no token to map and Wine returns a null context. The get_state change here only runs for voices in DECODED_VOICES. A host with libopus would take the decoded path; I did not run that.
    • The same run also fails the user32 ... not cloaked check (#1462 / #794), unrelated.

Not tested

  • Windows; Wine with libopus available; the retail title.

AI use

  • Written with Claude (Anthropic) assistance; run by me on the hardware above.
<!-- greyfinch-sync:ivall/xcl:comment:7141184763 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/890#issuecomment-7141184763). Originally posted by [pablogonz12](https://github.com/pablogonz12) on 2026-11-24T18:48:42Z. --- Test report on RDNA4 / Wine: `76d2ff7` merged onto `main` `9e3831e` (clean merge). It fixes the XMA2 check of the e2e test title, and shows a second GetState gap that this change does not reach. **Tested** - AMD Radeon RX 9070 XT (RADV, Mesa 26.3.1), Ryzen 9 9900X, CachyOS; Wine GE-Proton11-14, vkd3d-proton v3.1, DXC 1.9.2609.5; release, `x86_64-pc-windows-msvc` cross-built with cargo-xwin (static CRT), no Windows build. - `cargo test -p xcl --lib` binary under Wine, `--test-threads=4`, with `--skip jumps_to_outer_loop_heads_are_structured` (it aborts the whole binary here, #1246): 722 passed, 4 failed, 21 ignored. The four: `gpu_f64_roots`, `gpu_f64_math_random`, `gpu_nonfused_mad_and_mac_prevent_fma_contraction`, `gpu_depth_buffer_created_for_unordered_access_is_placed`. None is XAudio2; `hle::xaudio2` alone: 9 passed. - `tests/e2e.rs` `test_title_runs_and_game_folder_is_untouched`, run alone: - `main`: `[FAIL] XAudio2: ... XMA2 GetState: ctx=0x0, queued=1`. - with this PR: the XMA2 check passes; the next check fails: `[FAIL] XAudio2: ... Opus GetState: ctx=0x0, queued=1`. The log of that run says `Opus: decoder = none (MSOpusDecoder.dll not available; no opus.dll ...)` and `Opus decoder unavailable ... falling back to silence`. The voice is then not one of the decoded voices (it takes the `XMA` silence path of `submit_source_buffer`), so `get_state` has no token to map and Wine returns a null context. The `get_state` change here only runs for voices in `DECODED_VOICES`. A host with libopus would take the decoded path; I did not run that. - The same run also fails the `user32 ... not cloaked` check (#1462 / #794), unrelated. **Not tested** - Windows; Wine with libopus available; the retail title. **AI use** - Written with Claude (Anthropic) assistance; run by me on the hardware above.
shortside commented 2026-11-24 21:08:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by shortside on 2026-11-24T19:24:07Z.


@pablogonz12 thanks, that is the run this PR was missing (the test title does not get that far on my Mac). The second gap is real and wider than the Opus voice: under Wine any voice XCL does not decode reads that way before it starts, a plain PCM voice too. It is in #1698, stacked on this one, so this commit and the runs against it stay as they are. If you have a moment, the test title's Opus GetState check on your host (Wine without libopus) is the one thing I cannot run for it.

<!-- greyfinch-sync:ivall/xcl:comment:7142043378 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/890#issuecomment-7142043378). Originally posted by [shortside](https://github.com/shortside) on 2026-11-24T19:24:07Z. --- @pablogonz12 thanks, that is the run this PR was missing (the test title does not get that far on my Mac). The second gap is real and wider than the Opus voice: under Wine any voice XCL does not decode reads that way before it starts, a plain PCM voice too. It is in #1698, stacked on this one, so this commit and the runs against it stay as they are. If you have a moment, the test title's `Opus GetState` check on your host (Wine without libopus) is the one thing I cannot run for it.
crastinator commented 2026-11-24 21:08:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by crastinator on 2026-11-24T19:25:22Z.


@pablogonz12 matches what I see on RDNA2 under Wine (my review above, the Update section). The one case you didn't run, with libopus: given an opus.dll from #257's build-opus.sh (XCL_OPUS_DIR), the Opus voice takes the decoded path. The e2e test title's XAudio2 check then passes completely with this PR, and hle::xaudio2:: is 9/9 with opus_source_voice_decodes_and_manages_lifetime included (76d2ff7 merged onto main 930e8b4, RX 6700 XT, Mesa 26.3.1, 3 runs). So what's left is only the silence fallback for an Opus voice when there's no decoder (stock Wine/Proton).

<!-- greyfinch-sync:ivall/xcl:comment:7142073313 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/890#issuecomment-7142073313). Originally posted by [crastinator](https://github.com/crastinator) on 2026-11-24T19:25:22Z. --- @pablogonz12 matches what I see on RDNA2 under Wine (my review above, the Update section). The one case you didn't run, with libopus: given an `opus.dll` from #257's `build-opus.sh` (`XCL_OPUS_DIR`), the Opus voice takes the decoded path. The e2e test title's XAudio2 check then passes completely with this PR, and `hle::xaudio2::` is 9/9 with `opus_source_voice_decodes_and_manages_lifetime` included (`76d2ff7` merged onto `main` `930e8b4`, RX 6700 XT, Mesa 26.3.1, 3 runs). So what's left is only the silence fallback for an Opus voice when there's no decoder (stock Wine/Proton).
pablogonz12 commented 2026-11-24 23:08:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by pablogonz12 on 2026-11-24T22:41:28Z.


On the merged main 689f2db the unit test this touches is red on AMD/RADV/Wine: hle::xaudio2::tests::xma2_source_voice_decodes_and_manages_lifetime fails at crates/xcl/src/hle/xaudio2.rs:1599, GetState returns current_buffer_context = 0 where the test wants the playing buffer's 0x3003, both in the full run and run alone (--exact). RX 9070 XT, RADV/Mesa 26.3.1, Wine GE-Proton11-14, x86_64-pc-windows-msvc release with +crt-static.

At your head 76d2ff7 the same test passes here (722 passed, 4 failed, 21 ignored, the four being the known ones), so the test that main carries today is green with this PR and red without it.

Written with Claude (Anthropic) assistance; tested by me on the hardware listed.

<!-- greyfinch-sync:ivall/xcl:comment:7146530057 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/890#issuecomment-7146530057). Originally posted by [pablogonz12](https://github.com/pablogonz12) on 2026-11-24T22:41:28Z. --- On the merged `main` `689f2db` the unit test this touches is red on AMD/RADV/Wine: `hle::xaudio2::tests::xma2_source_voice_decodes_and_manages_lifetime` fails at `crates/xcl/src/hle/xaudio2.rs:1599`, `GetState` returns `current_buffer_context = 0` where the test wants the playing buffer's `0x3003`, both in the full run and run alone (`--exact`). RX 9070 XT, RADV/Mesa 26.3.1, Wine GE-Proton11-14, `x86_64-pc-windows-msvc` release with `+crt-static`. At your head `76d2ff7` the same test passes here (722 passed, 4 failed, 21 ignored, the four being the known ones), so the test that main carries today is green with this PR and red without it. Written with Claude (Anthropic) assistance; tested by me on the hardware listed.
JJAutoCompare commented 2026-11-25 06:05:55 +00:00 (Migrated from github.com)

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


Empirical test report (76d2ff73)

Verified the clean, detached PR #890 head 76d2ff732e8af140a40570f7de38289a16861380.

Hardware / environment

  • STOR-WINLAB, Windows x64 build 26200, AuthenticAMD Family 23 Model 113 Stepping 0.
  • rustc 1.100.0 (0ef1bc386 2026-11-09) (x86_64-pc-windows-msvc), DXC 1.9.2609.5 (01b62ad47), Cargo test profile with debug info and incremental compilation disabled.
  • Both commands ran directly in PowerShell outside Invoke-ArcTest.ps1. No Arc GPU mutex was acquired. The focused tests use no D3D12 or GPU and require a working Windows XAudio2 output endpoint.

Commands and results

  • cargo test --workspace --no-run exited 0 and built the workspace test executables.
  • cargo test -p xcl --lib source_voice_decodes_and_manages_lifetime -- --nocapture ran with XCL_ADAPTER=NONE_CPU_ONLY and RUST_TEST_NOCAPTURE=1, and exited 0. Cargo reported 2 passed, 0 failed, 0 ignored and 691 filtered out. The log contained 0 uppercase SKIPPED markers and 2 explicit skipping: no audio device messages. Counting those early returns as skips gives 0 behavioral passes and 2 skipped.

Observed behavior

The PR changes runtime code and adds or modifies no tests. The filter selected the existing XMA2 and Opus source-voice tests. Both created a system XAudio2 2.9 engine, then received 0x80070490 from CreateMasteringVoice and returned before submitting buffers. The checks for two queued buffers and the oldest buffer's original context therefore did not run.

Not tested

The full GPU workspace suite and game smoke runs were omitted. The XMA2 and Opus GetState assertions and the Wine/CrossOver null-context fallback remain unverified.

AI use

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

<!-- greyfinch-sync:ivall/xcl:comment:7153994808 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/890#issuecomment-7153994808). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T05:38:46Z. --- ### Empirical test report (76d2ff73) Verified the clean, detached PR #890 head `76d2ff732e8af140a40570f7de38289a16861380`. **Hardware / environment** - STOR-WINLAB, Windows x64 build 26200, AuthenticAMD Family 23 Model 113 Stepping 0. - `rustc 1.100.0 (0ef1bc386 2026-11-09)` (`x86_64-pc-windows-msvc`), DXC `1.9.2609.5 (01b62ad47)`, Cargo test profile with debug info and incremental compilation disabled. - Both commands ran directly in PowerShell outside `Invoke-ArcTest.ps1`. No Arc GPU mutex was acquired. The focused tests use no D3D12 or GPU and require a working Windows XAudio2 output endpoint. **Commands and results** - `cargo test --workspace --no-run` exited 0 and built the workspace test executables. - `cargo test -p xcl --lib source_voice_decodes_and_manages_lifetime -- --nocapture` ran with `XCL_ADAPTER=NONE_CPU_ONLY` and `RUST_TEST_NOCAPTURE=1`, and exited 0. Cargo reported 2 passed, 0 failed, 0 ignored and 691 filtered out. The log contained 0 uppercase `SKIPPED` markers and 2 explicit `skipping: no audio device` messages. Counting those early returns as skips gives 0 behavioral passes and 2 skipped. **Observed behavior** The PR changes runtime code and adds or modifies no tests. The filter selected the existing XMA2 and Opus source-voice tests. Both created a system XAudio2 2.9 engine, then received `0x80070490` from `CreateMasteringVoice` and returned before submitting buffers. The checks for two queued buffers and the oldest buffer's original context therefore did not run. **Not tested** The full GPU workspace suite and game smoke runs were omitted. The XMA2 and Opus `GetState` assertions and the Wine/CrossOver null-context fallback remain unverified. **AI use** Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr890-focused.log` and published.
DavidM1911 commented 2026-11-25 10:10:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T09:41:59Z.


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:7158682471 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/890#issuecomment-7158682471). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T09:41:59Z. --- 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!
shortside commented 2026-11-25 10:10:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by shortside on 2026-11-25T09:43:53Z.


@pablogonz12 thanks for the run. The Opus case you hit behind this one is the gap #1698 covers (it is stacked on this PR); a run of that on your setup would be very welcome.

<!-- greyfinch-sync:ivall/xcl:comment:7158724154 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/890#issuecomment-7158724154). Originally posted by [shortside](https://github.com/shortside) on 2026-11-25T09:43:53Z. --- @pablogonz12 thanks for the run. The Opus case you hit behind this one is the gap #1698 covers (it is stacked on this PR); a run of that on your setup would be very welcome.
pablogonz12 commented 2026-11-25 10:10:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by pablogonz12 on 2026-11-25T09:50:44Z.


Ran the stacked head on Linux here.

  • #1698 e2ee5c0 merged with main 568e7db (clean, no conflicts), cargo xwin test -p xcl --lib --release --target x86_64-pc-windows-msvc --target-dir target-static.
  • Under Wine GE-Proton11-14 (RX 9070 XT / RDNA4, RADV, Mesa 26.3.1, Windows-msvc build, --test-threads=4), filter xaudio2: 11 passed, 0 failed, 1115 filtered out.
  • That includes get_state_names_the_oldest_buffer_of_a_voice_that_is_not_decoded and xma2_source_voice_decodes_and_manages_lifetime. The run took the real path, not a skip: engine created (system XAudio2 2.9, flags 0x0) and XMA2 voice (1 ch., 48000 Hz) → real PCM16 decoding.
  • Consistent with the earlier red we saw on main 689f2db alone (xma2 GetState naming no context): with #890 + #1698 in the tree that assertion passes.

Not tested: the full lib suite on this head, and any game run. Scope is the xaudio2 module. Written with Claude assistance.

<!-- greyfinch-sync:ivall/xcl:comment:7158878199 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/890#issuecomment-7158878199). Originally posted by [pablogonz12](https://github.com/pablogonz12) on 2026-11-25T09:50:44Z. --- Ran the stacked head on Linux here. - #1698 `e2ee5c0` merged with `main` `568e7db` (clean, no conflicts), `cargo xwin test -p xcl --lib --release --target x86_64-pc-windows-msvc --target-dir target-static`. - Under Wine GE-Proton11-14 (RX 9070 XT / RDNA4, RADV, Mesa 26.3.1, Windows-msvc build, `--test-threads=4`), filter `xaudio2`: **11 passed, 0 failed, 1115 filtered out**. - That includes `get_state_names_the_oldest_buffer_of_a_voice_that_is_not_decoded` and `xma2_source_voice_decodes_and_manages_lifetime`. The run took the real path, not a skip: `engine created (system XAudio2 2.9, flags 0x0)` and `XMA2 voice (1 ch., 48000 Hz) → real PCM16 decoding`. - Consistent with the earlier red we saw on `main` `689f2db` alone (`xma2` GetState naming no context): with #890 + #1698 in the tree that assertion passes. Not tested: the full lib suite on this head, and any game run. Scope is the `xaudio2` module. Written with Claude assistance.
github-actions[bot] commented 2026-11-28 20:19:32 +00:00 (Migrated from github.com)

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


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

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


Triage (#1607) – head 76d2ff7

#1698 is stacked on this PR (it contains this commit and adds the case of voices XCL does not decode), so it is not a duplicate. Main's get_state still only maps a non-null context, so the change is not on main.
The diff adds no test, and a bug fix needs one that fails without it. #1698 has tests for the voices it covers, but not for this decoded-voice branch. min_by_key(seq) over live_buffers is correct because entries leave the map at OnBufferEnd.
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:7300720920 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/890#issuecomment-7300720920). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T04:25:32Z. --- **Triage (#1607)** – head 76d2ff7 #1698 is stacked on this PR (it contains this commit and adds the case of voices XCL does not decode), so it is not a duplicate. Main's `get_state` still only maps a non-null context, so the change is not on main. The diff adds no test, and a bug fix needs one that fails without it. #1698 has tests for the voices it covers, but not for this decoded-voice branch. `min_by_key(seq)` over `live_buffers` is correct because entries leave the map at OnBufferEnd. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

Pull request closed

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!884
No description provided.