Shaders: reverse the halves of an i64 Bfrev with shifts and masks on AMD #2237

Manually merged
github merged 1 commit from gh-pr/2237/head into gh-pr/2237/base 2026-11-26 05:24:10 +00:00
Owner

@⁠oni-swr on GitHub · 2026-11-25 10:59 UTC · original
oni-swr:dxil-bfrev-i64-shifts → main · +62 −3 · 2 files · 1 commits · merged 2026-11-25 18:16 UTC

Part of #2115. AMD's driver returns x | bfrev(x) for Bfrev.i32(trunc(mul i64)) when the product is the same on every lane. The i64 Bfrev lowering (reverse each 32-bit half, swap) goes through exactly that shape, so fuzz seed 817 read 0xfe53ffff where the CPU has 0x4a43fdeb. The halves are now reversed with five shift-and-mask steps. Reduced form: Bfrev.i64(mul i64 3, 5).

Seeds on the RX 7800 XT, main 568e7db plus this commit's base:

  • 817: fixed here (0 mismatching dwords, was 64).
  • 783: not touched here. Reduced to IMax.i64 fed by an i64 udiv chain: the same chain with compare + select, or with IMin / UMax, passes. #1946 (i64 min/max as compare + select) fixes it: with its ops.rs change applied locally 783 goes to 0 mismatches. I did not include that change.
  • 722 is #2192. 540 / 1599 are not reproduced on this card.

So fuzz_validate_and_gpu_1 here still fails on 722 until #2192 and #1946 are in.

What is in it

  • crates/xcl/src/gpu/dxil/ops.rs: bfrev32_shifts, used for both halves in the i64 case of Shader::bfrev. Bfrev.i32 on an i32 is unchanged.
  • crates/xcl/src/gpu/dxil/ops_tests.rs: bfrev_i64_of_a_uniform_product_matches_cpu (products 3*5 and the seed 817 constants). It fails without the change (low word 0xf000000f, expected 0) and passes with it.

Tested

  • AMD Radeon RX 7800 XT (RDNA3), driver 32.0.31035.1003; Ryzen 7 5700X3D; Windows 11 26200; rustc 1.100.0; debug build; head a5af72b (rebased onto main 1a0bbe3).
  • cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4: 1250 passed, 1 failed, 46 ignored. The failure is fuzz_validate_and_gpu_1, which stops at seed 722 (#2192); 783 (#1946) is behind it. The other failures seen before the rebase (pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa, gpu_image_get_resinfo_past_last_level) are gone.
  • 7 SKIPPED lines (f16 / f32 per-lane forms refused, and heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows); not coverage.
  • bfrev_i64_of_a_uniform_product_matches_cpu fails without the change on this card (low word 0xf000000f, expected 0) and passes with it. debug_seed for 817: 64 mismatching results before, 0 after.

Regression run

Independent paired run on exact PR head a5af72bba1a0d25fbd59f37a6a952b33874ce734 vs main 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6 by @⁠luckyteagirl (AMD Radeon RX 6800M, driver 30.0.13002.13003, Windows 11 26200, Rust 1.99.0 MSVC, 7 s each, fresh data/cache directories; see comment):

Main:

xcl-smoke v1
commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6
gpu: AMD Radeon RX 6800M
title: 2ef5fd64
seconds: 7
exit: 0x0
frames shown: 1 (PresentX 1)
presents per 2 s (last 3): 0 0 1
device removals: 0
crashes: 0
peak commit: 7040 MB

PR head:

xcl-smoke v1
commit: a5af72bba1a0d25fbd59f37a6a952b33874ce734
gpu: AMD Radeon RX 6800M
title: 2ef5fd64
seconds: 7
exit: 0x0
frames shown: 1 (PresentX 1)
presents per 2 s (last 3): 0 0 1
device removals: 0
crashes: 0
peak commit: 7048 MB

Not tested

  • Longer (>7 s) smoke runs or title dispatches exercising this bit-reversal form (the 7 s RX 6800M pair above reached the first frame only and did not observe a title dispatch of this form; no claim of runtime performance or world-load improvement).
  • RDNA2 / RDNA4, NVIDIA, other driver versions. The Bfrev.i32 behaviour is only shown on this card's driver.
  • Whether Bfrev.i32(trunc(mul i64)) outside the i64 lowering is hit by a real shader.

AI use
Claude Code (Claude Sonnet 5.5) reproduced the seeds, reduced them, wrote the change and the test, ran the suite and wrote this description; independent RX 6800M smoke blocks pasted from @⁠luckyteagirl's comment.

🤖 Generated with Claude Code

**@⁠oni-swr** on GitHub · 2026-11-25 10:59 UTC · [original](https://github.com/xcl-dev/xcl/pull/2237) `oni-swr:dxil-bfrev-i64-shifts` → `main` · +62 −3 · 2 files · 1 commits · merged 2026-11-25 18:16 UTC Part of #2115. AMD's driver returns `x | bfrev(x)` for `Bfrev.i32(trunc(mul i64))` when the product is the same on every lane. The i64 `Bfrev` lowering (reverse each 32-bit half, swap) goes through exactly that shape, so fuzz seed 817 read `0xfe53ffff` where the CPU has `0x4a43fdeb`. The halves are now reversed with five shift-and-mask steps. Reduced form: `Bfrev.i64(mul i64 3, 5)`. Seeds on the RX 7800 XT, `main` `568e7db` plus this commit's base: - **817**: fixed here (0 mismatching dwords, was 64). - **783**: not touched here. Reduced to `IMax.i64` fed by an `i64` udiv chain: the same chain with compare + select, or with `IMin` / `UMax`, passes. #1946 (i64 min/max as compare + select) fixes it: with its `ops.rs` change applied locally 783 goes to 0 mismatches. I did not include that change. - **722** is #2192. 540 / 1599 are not reproduced on this card. So `fuzz_validate_and_gpu_1` here still fails on 722 until #2192 and #1946 are in. **What is in it** - `crates/xcl/src/gpu/dxil/ops.rs`: `bfrev32_shifts`, used for both halves in the i64 case of `Shader::bfrev`. `Bfrev.i32` on an i32 is unchanged. - `crates/xcl/src/gpu/dxil/ops_tests.rs`: `bfrev_i64_of_a_uniform_product_matches_cpu` (products `3*5` and the seed 817 constants). It fails without the change (low word `0xf000000f`, expected 0) and passes with it. **Tested** - AMD Radeon RX 7800 XT (RDNA3), driver 32.0.31035.1003; Ryzen 7 5700X3D; Windows 11 26200; rustc 1.100.0; debug build; head `a5af72b` (rebased onto `main` `1a0bbe3`). - `cargo build --workspace`, then `cargo test --workspace --no-fail-fast -- --test-threads=4`: 1250 passed, 1 failed, 46 ignored. The failure is `fuzz_validate_and_gpu_1`, which stops at seed 722 (#2192); 783 (#1946) is behind it. The other failures seen before the rebase (`pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa`, `gpu_image_get_resinfo_past_last_level`) are gone. - 7 `SKIPPED` lines (f16 / f32 per-lane forms refused, and `heap_window_out_of_memory_falls_back_to_the_switch_form`: no heap windows); not coverage. - `bfrev_i64_of_a_uniform_product_matches_cpu` fails without the change on this card (low word `0xf000000f`, expected 0) and passes with it. `debug_seed` for 817: 64 mismatching results before, 0 after. **Regression run** Independent paired run on exact PR head `a5af72bba1a0d25fbd59f37a6a952b33874ce734` vs `main` `1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6` by @⁠luckyteagirl (AMD Radeon RX 6800M, driver `30.0.13002.13003`, Windows 11 26200, Rust 1.99.0 MSVC, 7 s each, fresh data/cache directories; see [comment](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2237)): Main: ``` xcl-smoke v1 commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6 gpu: AMD Radeon RX 6800M title: 2ef5fd64 seconds: 7 exit: 0x0 frames shown: 1 (PresentX 1) presents per 2 s (last 3): 0 0 1 device removals: 0 crashes: 0 peak commit: 7040 MB ``` PR head: ``` xcl-smoke v1 commit: a5af72bba1a0d25fbd59f37a6a952b33874ce734 gpu: AMD Radeon RX 6800M title: 2ef5fd64 seconds: 7 exit: 0x0 frames shown: 1 (PresentX 1) presents per 2 s (last 3): 0 0 1 device removals: 0 crashes: 0 peak commit: 7048 MB ``` **Not tested** - Longer (>7 s) smoke runs or title dispatches exercising this bit-reversal form (the 7 s RX 6800M pair above reached the first frame only and did not observe a title dispatch of this form; no claim of runtime performance or world-load improvement). - RDNA2 / RDNA4, NVIDIA, other driver versions. The Bfrev.i32 behaviour is only shown on this card's driver. - Whether `Bfrev.i32(trunc(mul i64))` outside the i64 lowering is hit by a real shader. **AI use** Claude Code (Claude Sonnet 5.5) reproduced the seeds, reduced them, wrote the change and the test, ran the suite and wrote this description; independent RX 6800M smoke blocks pasted from @⁠luckyteagirl's comment. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
AMD's driver returns x | bfrev(x) for Bfrev.i32(trunc(mul i64)) when the
product is the same on every lane. The i64 Bfrev lowering reverses each
32-bit half after a trunc / lshr of the i64 value, so a Bfrev of an i64
product hit it: fuzz seed 817 (#2115) read 0xfe53ffff for 0x4a43fdeb on an
RX 7800 XT. Reduced to Bfrev.i64(mul i64 3, 5).

The halves are now reversed with five shift-and-mask steps. The i64 case
is the only one that goes through trunc of an i64 value; Bfrev.i32 on a
plain i32 is unchanged. The new test fails without the change on the
RX 7800 XT (low word 0xf000000f, expected 0) and passes with it.

Part of #2115. Seed 783 is a separate driver bug (IMax.i64 after an i64
udiv); the compare / select lowering in #1946 fixes it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:24:08 +00:00
github manually merged commit a5af72bba1 into gh-pr/2237/base 2026-11-26 05:24:10 +00:00
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-25 12:19 UTC · original

Independent Windows/RX 6800M verification of exact PR head a5af72bba1a0d25fbd59f37a6a952b33874ce734, with a same-duration owned-title smoke comparison against main 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6.

Environment: Windows 11 build 26200; Ryzen 9 5980HX; Radeon RX 6800M driver 30.0.13002.13003; Rust 1.99.0 MSVC; DXC/DXIL 1.9.2609.5. The worktrees and Cargo targets were isolated. No game files were copied or attached.

Tested

  • XCL_ADAPTER=6800M XCL_REQUIRE_GPU=wave64 XCL_DIRECT_DXIL=1 cargo test --locked -p xcl --lib -j 2 bfrev_i64_of_a_uniform_product_matches_cpu -- --test-threads=1 --show-output: 1 passed, 0 failed, 0 ignored, no skip. The new fixture ran on native wave64.
  • cargo build --locked --workspace -j 2 and cargo build --locked --release --workspace -j 2 both passed on the exact PR head.
  • XCL_ADAPTER=6800M XCL_DIRECT_DXIL=1 cargo test --locked --workspace --no-fail-fast -j 2 -- --test-threads=4 --show-output: main 1012 passed, 169 failed, 26 ignored in the library; PR 1012 passed, 170 failed, 26 ignored. Both also failed the same offline_compute_pipeline_is_reused_by_a_second_process integration test. Both emitted 9 SKIPPED messages. The sole added library failure name was gpu::dxil::ops_tests::bfrev_i64_of_a_uniform_product_matches_cpu, at CreateComputePipelineState after device suspension 0x887A0005; it passed in the focused run. The broad suite is red on this driver, so this is not a clean full-suite result.

Regression run

Same owned title, seven seconds each, default translation mode, fresh separate data/cache directories. Both runs completed with no memory guard, crash or device removal. These are the exact xcl-smoke blocks:

Main:

xcl-smoke v1
commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6
gpu: AMD Radeon RX 6800M
title: 2ef5fd64
seconds: 7
exit: 0x0
frames shown: 1 (PresentX 1)
presents per 2 s (last 3): 0 0 1
device removals: 0
crashes: 0
peak commit: 7040 MB

PR head:

xcl-smoke v1
commit: a5af72bba1a0d25fbd59f37a6a952b33874ce734
gpu: AMD Radeon RX 6800M
title: 2ef5fd64
seconds: 7
exit: 0x0
frames shown: 1 (PresentX 1)
presents per 2 s (last 3): 0 0 1
device removals: 0
crashes: 0
peak commit: 7048 MB

Limits: An attempted 12-second PR run hit my external guard at 856 MB free system commit and was stopped before it emitted a smoke block; I excluded it from the comparison. The seven-second pair reached only the first frame, and no title dispatch of this bit-reversal form was observed. The synthetic fixture is the opcode check. The report does not establish a runtime performance or world-load improvement. If the PR head changes, its smoke block must be rerun for the new commit.

AI use: OpenAI Codex (GPT-6; exact variant not exposed in this session) ran the native Windows builds and tests, monitored the owned-title smoke runs, compared the failure names and drafted this report. No game data was uploaded.

**@⁠luckyteagirl** on GitHub · 2026-11-25 12:19 UTC · [original](https://github.com/xcl-dev/xcl/pull/2237#issuecomment-7162209991) Independent Windows/RX 6800M verification of exact PR head `a5af72bba1a0d25fbd59f37a6a952b33874ce734`, with a same-duration owned-title smoke comparison against main `1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6`. **Environment:** Windows 11 build 26200; Ryzen 9 5980HX; Radeon RX 6800M driver `30.0.13002.13003`; Rust 1.99.0 MSVC; DXC/DXIL 1.9.2609.5. The worktrees and Cargo targets were isolated. No game files were copied or attached. **Tested** - `XCL_ADAPTER=6800M XCL_REQUIRE_GPU=wave64 XCL_DIRECT_DXIL=1 cargo test --locked -p xcl --lib -j 2 bfrev_i64_of_a_uniform_product_matches_cpu -- --test-threads=1 --show-output`: **1 passed, 0 failed, 0 ignored**, no skip. The new fixture ran on native wave64. - `cargo build --locked --workspace -j 2` and `cargo build --locked --release --workspace -j 2` both passed on the exact PR head. - `XCL_ADAPTER=6800M XCL_DIRECT_DXIL=1 cargo test --locked --workspace --no-fail-fast -j 2 -- --test-threads=4 --show-output`: main **1012 passed, 169 failed, 26 ignored** in the library; PR **1012 passed, 170 failed, 26 ignored**. Both also failed the same `offline_compute_pipeline_is_reused_by_a_second_process` integration test. Both emitted 9 `SKIPPED` messages. The sole added library failure name was `gpu::dxil::ops_tests::bfrev_i64_of_a_uniform_product_matches_cpu`, at `CreateComputePipelineState` after device suspension `0x887A0005`; it passed in the focused run. The broad suite is red on this driver, so this is not a clean full-suite result. **Regression run** Same owned title, seven seconds each, default translation mode, fresh separate data/cache directories. Both runs completed with no memory guard, crash or device removal. These are the exact `xcl-smoke` blocks: Main: ``` xcl-smoke v1 commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6 gpu: AMD Radeon RX 6800M title: 2ef5fd64 seconds: 7 exit: 0x0 frames shown: 1 (PresentX 1) presents per 2 s (last 3): 0 0 1 device removals: 0 crashes: 0 peak commit: 7040 MB ``` PR head: ``` xcl-smoke v1 commit: a5af72bba1a0d25fbd59f37a6a952b33874ce734 gpu: AMD Radeon RX 6800M title: 2ef5fd64 seconds: 7 exit: 0x0 frames shown: 1 (PresentX 1) presents per 2 s (last 3): 0 0 1 device removals: 0 crashes: 0 peak commit: 7048 MB ``` **Limits:** An attempted 12-second PR run hit my external guard at 856 MB free system commit and was stopped before it emitted a smoke block; I excluded it from the comparison. The seven-second pair reached only the first frame, and no title dispatch of this bit-reversal form was observed. The synthetic fixture is the opcode check. The report does not establish a runtime performance or world-load improvement. If the PR head changes, its smoke block must be rerun for the new commit. **AI use:** OpenAI Codex (GPT-6; exact variant not exposed in this session) ran the native Windows builds and tests, monitored the owned-title smoke runs, compared the failure names and drafted this report. No game data was uploaded.
Author
Owner

@⁠frenziedcoder on GitHub · 2026-11-25 14:19 UTC · original

NVIDIA test report for a5af72b: no new test failures (the 4 that fail also fail on 1a0bbe3), its own GPU test bfrev_i64_of_a_uniform_product_matches_cpu passes on NVIDIA too (the shift-and-mask reversal isn't vendor-gated, so it runs here as well), and a clean smoke pair on the retail title (1614 vs 1671 frames).

Tested

  • NVIDIA GeForce RTX 5080 16 GB (driver 621.40, 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 a5af72bba1a0d25fbd59f37a6a952b33874ce734, no local changes.
  • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4 (debug): 1247 passed, 4 failed, 46 ignored; the PR's own test bfrev_i64_of_a_uniform_product_matches_cpu and the existing int64_bit_ops_match_cpu pass. SKIPPED: gpu::recomp::lower::tests::a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu (no wave64), gpu::recomp::lower::tests::coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu (no wave64), gpu::recomp::lower::tests::cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu (no wave64), gpu::recomp::lower::tests::the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu (no wave64), gpu::recomp::lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu (no wave64), gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu (const_mask, wave64: no wave64), gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu (f16 arithmetic, wave64: no wave64), gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu (f16 packed, wave64: no wave64), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu (f32 arithmetic, wave64: no wave64), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu (f32 compares, wave64: no wave64), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu (f32 conversions, wave64: no wave64), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu (f32 rounding, wave64: no wave64), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu (f32 three-source, wave64: no wave64), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu (f32 transcendentals, wave64: no wave64), gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu (f64, wave64: no wave64), gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu (integer arithmetic, wave64: no wave64), gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu (integer carries, wave64: no wave64), gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu (mask_ff0_flbit, wave64: no wave64), 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), test_title_draws_with_a_root_signature_under_the_debug_layer (no d3d12SDKLayers.dll), uploads_start_from_each_subresources_state (no D3D12 debug layer (The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D))).
  • The 4 failures are fuzz_validate_and_gpu_0, fuzz_validate_and_gpu_1, fuzz_validate_and_gpu_2, fuzz_validate_and_gpu_3 in gpu::dxil::fuzz_tests. They fail the same way on the base 1a0bbe3 here (0x8007000E from CreateComputePipelineState on seeds 70, 545, 1019 and 1507, the NVIDIA refusal @⁠PHeitor1 reported on #1679), so this PR adds no failure. (Seed 1019's program is 3,208 bytes here against 3,020 on the base: the longer reversal.)

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 (1a0bbe3, this PR's merge base with main):

xcl-smoke v1
commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6
gpu: NVIDIA GeForce RTX 5080
title: 16b5e5d4
seconds: 60
exit: 0x0
frames shown: 1671 (PresentX 1671)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14380 MB

this PR:

xcl-smoke v1
commit: a5af72bba1a0d25fbd59f37a6a952b33874ce734
gpu: NVIDIA GeForce RTX 5080
title: 16b5e5d4
seconds: 60
exit: 0x0
frames shown: 1614 (PresentX 1614)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14607 MB

Not tested: this code in the title: it is on the opt-in direct-DXIL path (XCL_DIRECT_DXIL), which the smoke runs leave unset (default HLSL backend), so they show only that nothing else regressed; the world load (the smoke runs stop at the start screen, so code that only runs later is not exercised there); AMD, which the description and @⁠luckyteagirl's run cover.

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

**@⁠frenziedcoder** on GitHub · 2026-11-25 14:19 UTC · [original](https://github.com/xcl-dev/xcl/pull/2237#issuecomment-7165113607) **NVIDIA test report for `a5af72b`: no new test failures (the 4 that fail also fail on `1a0bbe3`), its own GPU test `bfrev_i64_of_a_uniform_product_matches_cpu` passes on NVIDIA too (the shift-and-mask reversal isn't vendor-gated, so it runs here as well), and a clean smoke pair on the retail title (1614 vs 1671 frames).** **Tested** - NVIDIA GeForce RTX 5080 16 GB (driver 621.40, 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 `a5af72bba1a0d25fbd59f37a6a952b33874ce734`, no local changes. - `cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4` (debug): **1247 passed, 4 failed, 46 ignored**; the PR's own test `bfrev_i64_of_a_uniform_product_matches_cpu` and the existing `int64_bit_ops_match_cpu` pass. SKIPPED: `gpu::recomp::lower::tests::a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu` (no wave64), `gpu::recomp::lower::tests::coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu` (no wave64), `gpu::recomp::lower::tests::cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu` (no wave64), `gpu::recomp::lower::tests::the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu` (no wave64), `gpu::recomp::lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu` (no wave64), `gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu` (const_mask, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu` (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu` (f16 arithmetic, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu` (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu` (f16 packed, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu` (f32 arithmetic, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu` (f32 compares, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu` (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu` (f32 conversions, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu` (f32 rounding, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu` (f32 three-source, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu` (f32 transcendentals, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu` (f64, wave64: no wave64), `gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu` (integer arithmetic, wave64: no wave64), `gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu` (integer carries, wave64: no wave64), `gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu` (mask_ff0_flbit, wave64: no wave64), `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), `test_title_draws_with_a_root_signature_under_the_debug_layer` (no d3d12SDKLayers.dll), `uploads_start_from_each_subresources_state` (no D3D12 debug layer (The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D))). - The 4 failures are `fuzz_validate_and_gpu_0`, `fuzz_validate_and_gpu_1`, `fuzz_validate_and_gpu_2`, `fuzz_validate_and_gpu_3` in `gpu::dxil::fuzz_tests`. They fail the same way on the base `1a0bbe3` here (`0x8007000E` from `CreateComputePipelineState` on seeds 70, 545, 1019 and 1507, the NVIDIA refusal @⁠PHeitor1 reported on #1679), so this PR adds no failure. (Seed 1019's program is 3,208 bytes here against 3,020 on the base: the longer reversal.) **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 (`1a0bbe3`, this PR's merge base with `main`): ``` xcl-smoke v1 commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6 gpu: NVIDIA GeForce RTX 5080 title: 16b5e5d4 seconds: 60 exit: 0x0 frames shown: 1671 (PresentX 1671) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14380 MB ``` this PR: ``` xcl-smoke v1 commit: a5af72bba1a0d25fbd59f37a6a952b33874ce734 gpu: NVIDIA GeForce RTX 5080 title: 16b5e5d4 seconds: 60 exit: 0x0 frames shown: 1614 (PresentX 1614) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14607 MB ``` **Not tested:** this code in the title: it is on the opt-in direct-DXIL path (`XCL_DIRECT_DXIL`), which the smoke runs leave unset (default HLSL backend), so they show only that nothing else regressed; the world load (the smoke runs stop at the start screen, so code that only runs later is not exercised there); AMD, which the description and @⁠luckyteagirl's run cover. *AI use: Claude Code (Claude Opus 5.5) built and ran the tests and smoke runs on my machine and wrote this report.*
Author
Owner

@⁠fromthemoonx on GitHub · 2026-11-25 14:21 UTC · original

Second NVIDIA run (RTX 3060, 32-lane): passes at the head and merged onto current main, and the new test passes here without the fix too, so only AMD runs check it. This adds to frenziedcoder's RTX 5080 report:

result
cargo test --workspace --no-fail-fast -- --test-threads=4 at a5af72b 1251 passed, 0 failed, 46 ignored (the 4 failures on the 5080 do not show up on this card)
same, merged onto main 06c9f55 (no conflicts) 1266 passed, 0 failed, 46 ignored
bfrev_i64_of_a_uniform_product_matches_cpu, 10 runs 10 of 10 ok
that test with ops.rs from the base 1a0bbe3 (3 runs) ok 3 of 3: this driver does not have the x | bfrev(x) behaviour

SKIPPED: the same 24 lines at the head (no wave64, the refused per-lane f16/f32 forms). The merged tree has one more, dispatch_chain_native_wave64_builds_whole: no wave64, from 6c34370 on main.

Hardware: RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug, DXC 1.9.2602.17.
Not tested: a title, a release build.
AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this report.

**@⁠fromthemoonx** on GitHub · 2026-11-25 14:21 UTC · [original](https://github.com/xcl-dev/xcl/pull/2237#issuecomment-7165143812) **Second NVIDIA run (RTX 3060, 32-lane): passes at the head and merged onto current `main`, and the new test passes here without the fix too, so only AMD runs check it.** This adds to frenziedcoder's RTX 5080 report: | | result | |---|---| | `cargo test --workspace --no-fail-fast -- --test-threads=4` at `a5af72b` | 1251 passed, **0 failed**, 46 ignored (the 4 failures on the 5080 do not show up on this card) | | same, merged onto `main` `06c9f55` (no conflicts) | 1266 passed, 0 failed, 46 ignored | | `bfrev_i64_of_a_uniform_product_matches_cpu`, 10 runs | 10 of 10 ok | | that test with `ops.rs` from the base `1a0bbe3` (3 runs) | ok 3 of 3: this driver does not have the `x \| bfrev(x)` behaviour | SKIPPED: the same 24 lines at the head (`no wave64`, the refused per-lane f16/f32 forms). The merged tree has one more, `dispatch_chain_native_wave64_builds_whole: no wave64`, from `6c34370` on `main`. **Hardware:** RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug, DXC 1.9.2602.17. **Not tested:** a title, a release build. **AI use:** Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 16:42 UTC · original

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!

**@⁠DavidM1911** on GitHub · 2026-11-25 16:42 UTC · [original](https://github.com/xcl-dev/xcl/pull/2237#issuecomment-7168398219) 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!
Author
Owner

@⁠cindertheblue on GitHub · 2026-11-25 17:27 UTC · original

Tested the head a5af72b on two more AMD GPUs where seed 817 reproduces, a second RDNA3 card and an RDNA2 iGPU. The fix works on both.

Tested

  • AMD Radeon RX 7600 XT 16 GB (RDNA3, Navi 33), driver 32.0.31041.1004, and the Ryzen 5 9600X iGPU (RDNA2, gfx1036), driver 32.0.21045.5002, on the same machine. Windows 11 Home 26200.9974, rustc 1.99.1, DXC 1.8.2502.11 (SDK 10.0.26100), debug, no local changes. "Control" is the head with only crates/xcl/src/gpu/dxil/ops.rs restored from 1a0bbe3.
RX 7600 XT, head RX 7600 XT, control iGPU, head iGPU, control
bfrev_i64_of_a_uniform_product_matches_cpu (3 runs) pass ×3 fail ×3 pass ×3 fail ×3
debug_seed, FUZZ_SEED=817 0 mismatching 64 mismatching 0 64
debug_seed, FUZZ_SEED=783 32 32 32 32

Without the change the new test fails the same way as on your RX 7800 XT: case 0 low word, left 4026531855 (0xf000000f), right 0. 783 is unchanged, as you say.

  • cargo test --workspace --no-fail-fast -- --test-threads=4, once each:
main 1a0bbe3 + this PR
RX 7600 XT 1249 passed, 1 failed, 46 ignored 1250 passed, 1 failed, 46 ignored
iGPU 1249 passed, 1 failed, 46 ignored 1250 passed, 1 failed, 46 ignored

Each tree had cargo build --workspace first. The extra pass is the new test. The failure is fuzz_validate_and_gpu_1 on both trees, which stops before 817: at seed 722 on the RX 7600 XT and seed 540 on the iGPU. The same 8 SKIPPED lines in all four runs.

Not tested: a release build, a title or smoke run, XCL_DIRECT_DXIL variants, NVIDIA.

AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this comment from their output.

**@⁠cindertheblue** on GitHub · 2026-11-25 17:27 UTC · [original](https://github.com/xcl-dev/xcl/pull/2237#issuecomment-7169541211) Tested the head `a5af72b` on two more AMD GPUs where seed 817 reproduces, a second RDNA3 card and an RDNA2 iGPU. The fix works on both. **Tested** - AMD Radeon RX 7600 XT 16 GB (RDNA3, Navi 33), driver 32.0.31041.1004, and the Ryzen 5 9600X iGPU (RDNA2, `gfx1036`), driver 32.0.21045.5002, on the same machine. Windows 11 Home 26200.9974, rustc 1.99.1, DXC 1.8.2502.11 (SDK 10.0.26100), debug, no local changes. "Control" is the head with only `crates/xcl/src/gpu/dxil/ops.rs` restored from `1a0bbe3`. | | RX 7600 XT, head | RX 7600 XT, control | iGPU, head | iGPU, control | |---|---|---|---|---| | `bfrev_i64_of_a_uniform_product_matches_cpu` (3 runs) | pass ×3 | **fail** ×3 | pass ×3 | **fail** ×3 | | `debug_seed`, `FUZZ_SEED=817` | 0 mismatching | **64** mismatching | 0 | **64** | | `debug_seed`, `FUZZ_SEED=783` | 32 | 32 | 32 | 32 | Without the change the new test fails the same way as on your RX 7800 XT: `case 0 low word`, left `4026531855` (`0xf000000f`), right `0`. 783 is unchanged, as you say. - `cargo test --workspace --no-fail-fast -- --test-threads=4`, once each: | | `main` `1a0bbe3` | + this PR | |---|---|---| | RX 7600 XT | 1249 passed, 1 failed, 46 ignored | 1250 passed, 1 failed, 46 ignored | | iGPU | 1249 passed, 1 failed, 46 ignored | 1250 passed, 1 failed, 46 ignored | Each tree had `cargo build --workspace` first. The extra pass is the new test. The failure is `fuzz_validate_and_gpu_1` on both trees, which stops before 817: at `seed 722` on the RX 7600 XT and `seed 540` on the iGPU. The same 8 `SKIPPED` lines in all four runs. **Not tested:** a release build, a title or smoke run, `XCL_DIRECT_DXIL` variants, NVIDIA. **AI use:** Claude Code (Claude Opus 5.5) ran the tests and wrote this comment from their output.
This discussion has been locked. Commenting is limited to contributors.
No description provided.