XAudio2: vectorize XMA2 ImdctPlan::imdct_half with runtime AVX2+FMA #1023

Merged
real-alponzo merged 1 commit from upstream-pr/1030 into main 2026-11-30 02:53:58 +00:00
real-alponzo commented 2026-11-24 10:34:02 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by real-alponzo on 2026-11-24T10:34:02Z.


Part of #459 (item 2: XMA IMDCT / FFT).

Splits ImdctPlan's twiddle tables into SoA stage-contiguous arrays and adds a runtime-detected (is_x86_feature_detected!("avx2") && fma) AVX2+FMA implementation of ImdctPlan::imdct_half, keeping the scalar implementation as fallback (for non-AVX2/FMA CPUs and sizes < 32).

Overlap note: touches only ImdctPlan (crates/xcl/src/hle/xma2/mod.rs:455-660) and adds one unit test — disjoint from #525 (quantizer gains), #526 (PCM output), #884 (bit reservoir), and #861 (extradata tests).

What is in it

  • crates/xcl/src/hle/xma2/mod.rs:
    • SoA exp_r/exp_i and stage-contiguous stage_tw_r/stage_tw_i in ImdctPlan::new.
    • ImdctPlan::imdct_half_avx2 (#[target_feature(enable = "avx2,fma")]): 8-wide pre-rotation, fused multiply-free half = 1, 2 radix-4 pass, 4-wide VEX FMA half = 4 pass, 8-wide aligned AVX2+FMA half = 8..len2/2 passes, and 16-sample post-rotation/interleave.
    • avx2_imdct_matches_scalar_for_all_xma_sizes: verifies AVX2+FMA matches scalar (max_err < 1e-5) across all XMA sizes (N = 64, 128, 256, 512) and multiple seeds.

Measured speedup (--release, Intel Core i9-9900K, 200,000 iterations per size)

IMDCT size (N) Scalar (ns/call) AVX2+FMA (ns/call) Speedup
64 409.7 83.1 4.93x
128 808.6 141.4 5.72x
256 1643.3 259.4 6.33x
512 3281.9 530.9 6.18x

Tested

  • Hardware: Windows 11 Pro for Workstations (Build 26300), Intel Core i9-9900K, AMD Radeon RX 6800 (16337 MiB VRAM, driver 32.0.21045.29003), rustc 1.100.0 (x86_64-pc-windows-msvc), DXC 1.9.2602.17 (debug for tests, release for benchmark & smoke runs).
  • cargo test -p xcl --lib hle::xma2::: 8 passed, 0 failed (including decodes_xma2_and_xma1_bitstreams_matching_ffmpeg, fast_imdct_matches_naive_reference_for_all_xma_sizes, and avx2_imdct_matches_scalar_for_all_xma_sizes).
  • XCL_REQUIRE_GPU=wave64,mesh + cargo test --workspace --no-fail-fast -- --test-threads=4 on cdf2078: 725 passed, 3 failed, 41 ignored, 0 GPU skipped (xcl lib: 683 passed / 3 failed / 21 ignored; integration/e2e: 42 passed / 0 failed / 20 ignored; XCL_SAMPLE_* unset).
    • The 3 failures are exclusively the pre-existing AMD RDNA2 packed-mip failure in placed_title_textures_share_vram_and_preserve_pixels (3D 64x64x64 4 mips: subresource 2 mismatch, fixed by open PR #470) plus its 2 VRAM_TEST_LOCK PoisonError cascades.

Regression run
Both runs below used the same warmed shader/PSO cache on YouKnowWho (60 s):

main (09940bb87fa1):

xcl-smoke v1
commit: 09940bb87fa11bc394fd9e5de570c2b7cfd16323
gpu: AMD Radeon RX 6800
title: YouKnowWho
seconds: 60
exit: 0x0
frames shown: 405 (PresentX 405)
presents per 2 s (last 3): 11 12 11
device removals: 0
crashes: 0
peak commit: 15870 MB

PR head (cdf2078e9bbc):

xcl-smoke v1
commit: cdf2078e9bbccc5fd40caa7da167bd5be0c4cad5
gpu: AMD Radeon RX 6800
title: YouKnowWho
seconds: 60
exit: 0x0
frames shown: 403 (PresentX 404)
presents per 2 s (last 3): 17 16 17
device removals: 0
crashes: 0
peak commit: 15867 MB

Not tested

  • A retail title that uses XMA2 voices (YouKnowWho uses Opus, so its smoke run above is a regression check only; XMA2 decoding itself is verified against the FFmpeg reference test vectors in decodes_xma2_and_xma1_bitstreams_matching_ffmpeg).
  • Sample-data tests (XCL_SAMPLE_* unset).
  • Non-AVX2/FMA host CPUs (scalar fallback is still exercised directly by avx2_imdct_matches_scalar_for_all_xma_sizes).

AI use

  • Implemented, benchmarked, tested, and verified with Antigravity (Gemini 4 Neon); every change and measurement reviewed by the author on local hardware.
<!-- greyfinch-sync:ivall/xcl:issue:5470486693 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1030). Originally posted by [real-alponzo](https://github.com/real-alponzo) on 2026-11-24T10:34:02Z. --- Part of #459 (item 2: XMA IMDCT / FFT). Splits `ImdctPlan`'s twiddle tables into SoA stage-contiguous arrays and adds a runtime-detected (`is_x86_feature_detected!("avx2")` && `fma`) AVX2+FMA implementation of `ImdctPlan::imdct_half`, keeping the scalar implementation as fallback (for non-AVX2/FMA CPUs and sizes `< 32`). Overlap note: touches only `ImdctPlan` (`crates/xcl/src/hle/xma2/mod.rs:455-660`) and adds one unit test — disjoint from #525 (quantizer gains), #526 (PCM output), #884 (bit reservoir), and #861 (extradata tests). **What is in it** - `crates/xcl/src/hle/xma2/mod.rs`: - SoA `exp_r`/`exp_i` and stage-contiguous `stage_tw_r`/`stage_tw_i` in `ImdctPlan::new`. - `ImdctPlan::imdct_half_avx2` (`#[target_feature(enable = "avx2,fma")]`): 8-wide pre-rotation, fused multiply-free `half = 1, 2` radix-4 pass, 4-wide VEX FMA `half = 4` pass, 8-wide aligned AVX2+FMA `half = 8..len2/2` passes, and 16-sample post-rotation/interleave. - `avx2_imdct_matches_scalar_for_all_xma_sizes`: verifies AVX2+FMA matches scalar (`max_err < 1e-5`) across all XMA sizes (`N = 64, 128, 256, 512`) and multiple seeds. **Measured speedup (`--release`, Intel Core i9-9900K, 200,000 iterations per size)** | IMDCT size (`N`) | Scalar (`ns/call`) | AVX2+FMA (`ns/call`) | Speedup | |---:|---:|---:|---:| | 64 | 409.7 | 83.1 | **4.93x** | | 128 | 808.6 | 141.4 | **5.72x** | | 256 | 1643.3 | 259.4 | **6.33x** | | 512 | 3281.9 | 530.9 | **6.18x** | **Tested** - Hardware: Windows 11 Pro for Workstations (Build `26300`), Intel Core i9-9900K, AMD Radeon RX 6800 (`16337 MiB VRAM`, driver `32.0.21045.29003`), `rustc 1.100.0` (`x86_64-pc-windows-msvc`), DXC `1.9.2602.17` (`debug` for tests, `release` for benchmark & smoke runs). - `cargo test -p xcl --lib hle::xma2::`: **8 passed, 0 failed** (including `decodes_xma2_and_xma1_bitstreams_matching_ffmpeg`, `fast_imdct_matches_naive_reference_for_all_xma_sizes`, and `avx2_imdct_matches_scalar_for_all_xma_sizes`). - `XCL_REQUIRE_GPU=wave64,mesh` + `cargo test --workspace --no-fail-fast -- --test-threads=4` on `cdf2078`: **725 passed, 3 failed, 41 ignored, 0 GPU skipped** (`xcl` lib: 683 passed / 3 failed / 21 ignored; integration/e2e: 42 passed / 0 failed / 20 ignored; `XCL_SAMPLE_*` unset). - The 3 failures are exclusively the pre-existing AMD RDNA2 packed-mip failure in `placed_title_textures_share_vram_and_preserve_pixels` (`3D 64x64x64 4 mips: subresource 2 mismatch`, fixed by open PR #470) plus its 2 `VRAM_TEST_LOCK` `PoisonError` cascades. **Regression run** Both runs below used the same warmed shader/PSO cache on `YouKnowWho` (60 s): `main` (`09940bb87fa1`): ``` xcl-smoke v1 commit: 09940bb87fa11bc394fd9e5de570c2b7cfd16323 gpu: AMD Radeon RX 6800 title: YouKnowWho seconds: 60 exit: 0x0 frames shown: 405 (PresentX 405) presents per 2 s (last 3): 11 12 11 device removals: 0 crashes: 0 peak commit: 15870 MB ``` PR head (`cdf2078e9bbc`): ``` xcl-smoke v1 commit: cdf2078e9bbccc5fd40caa7da167bd5be0c4cad5 gpu: AMD Radeon RX 6800 title: YouKnowWho seconds: 60 exit: 0x0 frames shown: 403 (PresentX 404) presents per 2 s (last 3): 17 16 17 device removals: 0 crashes: 0 peak commit: 15867 MB ``` **Not tested** - A retail title that uses XMA2 voices (`YouKnowWho` uses Opus, so its smoke run above is a regression check only; XMA2 decoding itself is verified against the FFmpeg reference test vectors in `decodes_xma2_and_xma1_bitstreams_matching_ffmpeg`). - Sample-data tests (`XCL_SAMPLE_*` unset). - Non-AVX2/FMA host CPUs (scalar fallback is still exercised directly by `avx2_imdct_matches_scalar_for_all_xma_sizes`). **AI use** - Implemented, benchmarked, tested, and verified with Antigravity (Gemini 4 Neon); every change and measurement reviewed by the author on local hardware.
DavidM1911 commented 2026-11-24 12:05:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T11:16:00Z.


Independent verification, merged onto current main 384f7f7 locally (clean merge).

Machine: Windows 11, i7-13700K (AVX2 + FMA present, so the vectorized path is the one exercised), RTX 3060 Ti + Radeon iGPU; Rust stable MSVC, debug.

  • cargo test -p xcl --lib xma2: 10 passed, 0 failed — includes avx2_imdct_matches_scalar_for_all_xma_sizes (AVX2 vs scalar across all XMA sizes) and fast_imdct_matches_naive_reference_for_all_xma_sizes.

AI use: test runs by Devin (Cognition, SWE-2); no code changes.

<!-- greyfinch-sync:ivall/xcl:comment:7129874788 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1030#issuecomment-7129874788). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T11:16:00Z. --- Independent verification, merged onto current `main` `384f7f7` locally (clean merge). **Machine:** Windows 11, i7-13700K (AVX2 + FMA present, so the vectorized path is the one exercised), RTX 3060 Ti + Radeon iGPU; Rust stable MSVC, debug. - `cargo test -p xcl --lib xma2`: **10 passed, 0 failed** — includes `avx2_imdct_matches_scalar_for_all_xma_sizes` (AVX2 vs scalar across all XMA sizes) and `fast_imdct_matches_naive_reference_for_all_xma_sizes`. AI use: test runs by Devin (Cognition, SWE-2); no code changes.
JJAutoCompare commented 2026-11-25 06:05:52 +00:00 (Migrated from github.com)

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


Empirical test report (cdf2078e)

Verified PR #1030 at cdf2078e9bbccc5fd40caa7da167bd5be0c4cad5 in a clean, detached checkout.

Hardware / environment

  • AMD Ryzen 7 3800X, Windows x64 (10.0.26200.0). A separate Rust feature probe returned avx2=true fma=true, so the test's CPU feature guard allowed the SIMD comparison to run.
  • rustc 1.100.0 (0ef1bc386 2026-11-09) and 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 Invoke-ArcTest.ps1 with zero Arc GPU mutex hold.

Commands and results

  • cargo test --workspace --no-run completed with exit code 0 and built the workspace test executables.
  • cargo test -p xcl --lib 'hle::xma2::tests::' -- --nocapture exited 0. The captured log reported 8 passed, 0 failed, 0 ignored, 0 SKIPPED lines, and 699 filtered out. The harness reported 0.03 s.

Observed behavior

  • avx2_imdct_matches_scalar_for_all_xma_sizes passed. It compared all output samples for four deterministic inputs at each of 64, 128, 256, and 512 samples. Every case met the test's maximum absolute error threshold of 1e-5.
  • fast_imdct_matches_naive_reference_for_all_xma_sizes passed through runtime dispatch at the same four sizes. The six other CPU-only XMA tests passed, including the XMA1/XMA2 decoder fixture comparisons against FFmpeg reference output.

Not tested

  • The full GPU workspace suite, game smoke runs, release performance, and runtime fallback on hardware without AVX2 or FMA 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 pr1030-focused.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7153858695 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1030#issuecomment-7153858695). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T05:31:33Z. --- ### Empirical test report (cdf2078e) Verified PR #1030 at `cdf2078e9bbccc5fd40caa7da167bd5be0c4cad5` in a clean, detached checkout. **Hardware / environment** - AMD Ryzen 7 3800X, Windows x64 (10.0.26200.0). A separate Rust feature probe returned `avx2=true fma=true`, so the test's CPU feature guard allowed the SIMD comparison to run. - `rustc 1.100.0 (0ef1bc386 2026-11-09)` and 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 `Invoke-ArcTest.ps1` with zero Arc GPU mutex hold. **Commands and results** - `cargo test --workspace --no-run` completed with exit code 0 and built the workspace test executables. - `cargo test -p xcl --lib 'hle::xma2::tests::' -- --nocapture` exited 0. The captured log reported 8 passed, 0 failed, 0 ignored, 0 `SKIPPED` lines, and 699 filtered out. The harness reported 0.03 s. **Observed behavior** - `avx2_imdct_matches_scalar_for_all_xma_sizes` passed. It compared all output samples for four deterministic inputs at each of 64, 128, 256, and 512 samples. Every case met the test's maximum absolute error threshold of `1e-5`. - `fast_imdct_matches_naive_reference_for_all_xma_sizes` passed through runtime dispatch at the same four sizes. The six other CPU-only XMA tests passed, including the XMA1/XMA2 decoder fixture comparisons against FFmpeg reference output. **Not tested** - The full GPU workspace suite, game smoke runs, release performance, and runtime fallback on hardware without AVX2 or FMA 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 `pr1030-focused.log` and published.
thehollowedone commented 2026-11-25 10:10:29 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-25T09:25:30Z.


Independent Windows suite and Zen 5 IMDCT timings on cdf2078. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC, DXC 1.8.2502.11.

The clean cargo build --workspace --offline --locked -j 4 passed. cargo test --workspace --offline --locked --no-fail-fast -j 4 -- --nocapture --test-threads=4 finished with 728 passed, 0 failed, 41 ignored. Cargo’s pass count includes two native-wave64 runtime skips.

A scratch release fixture timed the parent kernel, the PR scalar fallback, and the PR runtime dispatcher in the same binary. Each median covers six warmed samples of 300,000 calls with alternating order, four rotating synthetic inputs, and preallocated plans and buffers.

N Parent scalar (ns) PR scalar (ns) PR dispatch (ns)
64 119.36 157.06 50.49
128 263.82 331.45 75.33
256 599.45 629.06 150.13
512 1326.40 1465.70 283.06

The dispatcher was 2.36–4.69× faster than the parent on this AVX2/FMA CPU. The PR scalar fallback had higher medians at all four sizes. Dispatcher output matched direct AVX2/FMA bit for bit. Maximum absolute error versus either scalar path was about 3e-8. cargo test --release --offline --locked -j 4 -p xcl --lib xma2:: -- --nocapture --test-threads=1 passed all nine tests including the benchmark and stock decoder tests against FFmpeg references. Retail playback throughput and CPUs without AVX2/FMA were outside this run.

AI use: Codex (GPT-6, exact variant unspecified) prepared the benchmark, ran the tests and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7158311397 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1030#issuecomment-7158311397). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-25T09:25:30Z. --- Independent Windows suite and Zen 5 IMDCT timings on [cdf2078](https://github.com/xcl-dev/xcl/commit/cdf2078e9bbccc5fd40caa7da167bd5be0c4cad5). Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC, DXC 1.8.2502.11. The clean `cargo build --workspace --offline --locked -j 4` passed. `cargo test --workspace --offline --locked --no-fail-fast -j 4 -- --nocapture --test-threads=4` finished with **728 passed, 0 failed, 41 ignored**. Cargo’s pass count includes two native-wave64 runtime skips. A scratch release fixture timed the [parent kernel](https://github.com/xcl-dev/xcl/commit/02bfd1d6c0659a5102abde6d73babba8afd9fce9), the PR scalar fallback, and the PR runtime dispatcher in the same binary. Each median covers six warmed samples of 300,000 calls with alternating order, four rotating synthetic inputs, and preallocated plans and buffers. | N | Parent scalar (ns) | PR scalar (ns) | PR dispatch (ns) | | ---: | ---: | ---: | ---: | | 64 | 119.36 | 157.06 | 50.49 | | 128 | 263.82 | 331.45 | 75.33 | | 256 | 599.45 | 629.06 | 150.13 | | 512 | 1326.40 | 1465.70 | 283.06 | The dispatcher was 2.36–4.69× faster than the parent on this AVX2/FMA CPU. The PR scalar fallback had higher medians at all four sizes. Dispatcher output matched direct AVX2/FMA bit for bit. Maximum absolute error versus either scalar path was about 3e-8. `cargo test --release --offline --locked -j 4 -p xcl --lib xma2:: -- --nocapture --test-threads=1` passed all nine tests including the benchmark and stock decoder tests against FFmpeg references. Retail playback throughput and CPUs without AVX2/FMA were outside this run. AI use: Codex (GPT-6, exact variant unspecified) prepared the benchmark, ran the tests and drafted this report.
throny commented 2026-11-28 14:57:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T14:57:09Z.


merge-check claim
head: cdf2078e9b

<!-- greyfinch-sync:ivall/xcl:comment:7241064983 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1030#issuecomment-7241064983). Originally posted by [throny](https://github.com/throny) on 2026-11-28T14:57:09Z. --- merge-check claim head: cdf2078e9bbccc5fd40caa7da167bd5be0c4cad5
throny commented 2026-11-28 15:17:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T15:17:11Z.


merge-check
base: 309c3ec5
head: cdf2078e9b
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2143 passed, 0 failed, 48 ignored (26 SKIPPED lines). Base alone at 309c3ec5: 2142 passed, 0 failed, 48 ignored. This CPU (i9-12900K) has AVX2 and FMA, so the new path and its comparison test ran.
review: no blocking finding. The unsafe code was read for feature detection (checked before every call, in the test too), alignment (the aligned loads land on 32 bytes for every size the decoder uses) and bounds (worked through for n = 32..512). To know: the vector path uses FMA, so its output is not bit-identical to the scalar path; the test compares with a tolerance of 1e-5. Decoded audio therefore differs in the last bits between CPUs with and without AVX2. Minor: the slice lengths are only debug-asserted, so a short slice would be undefined behaviour in a release build; the one caller passes the right length, and an assert! would close it.
performance: a tester in the thread measured the transform 2.4 to 4.7 times faster on Zen 5. The same thread measured the reworked scalar fallback 5 to 30 % slower than main's, which only CPUs without AVX2 see; nobody answered that. I measured neither.
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7241349579 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1030#issuecomment-7241349579). Originally posted by [throny](https://github.com/throny) on 2026-11-28T15:17:11Z. --- merge-check base: 309c3ec5 head: cdf2078e9bbccc5fd40caa7da167bd5be0c4cad5 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2143 passed, 0 failed, 48 ignored (26 SKIPPED lines). Base alone at 309c3ec5: 2142 passed, 0 failed, 48 ignored. This CPU (i9-12900K) has AVX2 and FMA, so the new path and its comparison test ran. review: no blocking finding. The unsafe code was read for feature detection (checked before every call, in the test too), alignment (the aligned loads land on 32 bytes for every size the decoder uses) and bounds (worked through for n = 32..512). To know: the vector path uses FMA, so its output is not bit-identical to the scalar path; the test compares with a tolerance of 1e-5. Decoded audio therefore differs in the last bits between CPUs with and without AVX2. Minor: the slice lengths are only debug-asserted, so a short slice would be undefined behaviour in a release build; the one caller passes the right length, and an assert! would close it. performance: a tester in the thread measured the transform 2.4 to 4.7 times faster on Zen 5. The same thread measured the reworked scalar fallback 5 to 30 % slower than main's, which only CPUs without AVX2 see; nobody answered that. I measured neither. verdict: safe to merge hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
saintwolf commented 2026-11-30 02:07:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by saintwolf on 2026-11-30T02:07:22Z.


merge-check claim
head: cdf2078e9b

<!-- greyfinch-sync:ivall/xcl:comment:7266724087 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1030#issuecomment-7266724087). Originally posted by [saintwolf](https://github.com/saintwolf) on 2026-11-30T02:07:22Z. --- merge-check claim head: cdf2078e9bbccc5fd40caa7da167bd5be0c4cad5
saintwolf commented 2026-11-30 02:13:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by saintwolf on 2026-11-30T02:13:41Z.


merge-check
base: 53e85fb124
head: cdf2078e9b
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2793 passed, 1 failed, 49 ignored; SKIPPED: 30 (22 no wave64, 3 per-lane #1426 refused, 2 no heap windows, 2 no xgameruntime.dll, 1 cannot disable the driver cache 0x887A002D); failing: hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline (also fails on base 53e85fb1 alone)
review: none (read the full +229/-24 diff in crates/xcl/src/hle/xma2/mod.rs: splits ImdctPlan twiddles into SoA stage-contiguous arrays and dispatches to imdct_half_avx2 when n >= 32 and runtime avx2+fma are detected; alignment (32-byte Aligned([f32; 256])) and bounds for N=64..512 check out, and all 9 xma2::tests including avx2_imdct_matches_scalar_for_all_xma_sizes passed on Ryzen 7 7800X3D; minor: src/dst slice lengths are debug_assert!-checked only; not tested: non-AVX2/FMA host runtime dispatch or retail XMA2 title smoke)
performance: expected faster XMA2 IMDCT on AVX2+FMA CPUs (PR reports 4.93x-6.33x on i9-9900K; not benchmarked locally); FMA output differs within <1e-5 from scalar
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4070 SUPER (32.0.16.2140), AMD Ryzen 7 7800X3D, Windows 11 Pro 26300, rustc 1.100.0, debug / Antigravity (Gemini 4 Hydrogen)

<!-- greyfinch-sync:ivall/xcl:comment:7266818318 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1030#issuecomment-7266818318). Originally posted by [saintwolf](https://github.com/saintwolf) on 2026-11-30T02:13:41Z. --- merge-check base: 53e85fb124eae624641e9884517e4f3c4a7d8794 head: cdf2078e9bbccc5fd40caa7da167bd5be0c4cad5 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2793 passed, 1 failed, 49 ignored; SKIPPED: 30 (22 no wave64, 3 per-lane #1426 refused, 2 no heap windows, 2 no xgameruntime.dll, 1 cannot disable the driver cache 0x887A002D); failing: hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline (also fails on base 53e85fb1 alone) review: none (read the full +229/-24 diff in crates/xcl/src/hle/xma2/mod.rs: splits ImdctPlan twiddles into SoA stage-contiguous arrays and dispatches to imdct_half_avx2 when n >= 32 and runtime avx2+fma are detected; alignment (32-byte Aligned([f32; 256])) and bounds for N=64..512 check out, and all 9 xma2::tests including avx2_imdct_matches_scalar_for_all_xma_sizes passed on Ryzen 7 7800X3D; minor: src/dst slice lengths are debug_assert!-checked only; not tested: non-AVX2/FMA host runtime dispatch or retail XMA2 title smoke) performance: expected faster XMA2 IMDCT on AVX2+FMA CPUs (PR reports 4.93x-6.33x on i9-9900K; not benchmarked locally); FMA output differs within <1e-5 from scalar verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 4070 SUPER (32.0.16.2140), AMD Ryzen 7 7800X3D, Windows 11 Pro 26300, rustc 1.100.0, debug / Antigravity (Gemini 4 Hydrogen)
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!1023
No description provided.