Recompiler: typed buffer loads read the channels a format lacks as RDNA2 does (#1414) #1413

Open
tiagonogueiraa-bit wants to merge 1 commit from upstream-pr/1423 into main
tiagonogueiraa-bit commented 2026-11-24 15:48:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonogueiraa-bit on 2026-11-24T15:48:28Z.


Typed buffer loads read the channels a format lacks the way @Lyrnc measured on gfx1036 (RDNA2) over all buffer formats in #1414:

  • tbuffer_load_format_* reads 0 in every missing channel, the 4th too. fmt_comp gave 1 / 1.0 for a missing 4th channel.
  • buffer_load_format_* with an X..W selector on a missing channel reads channel sel mod n of the format: (x, x, x, x), (x, y, x, y) and (x, y, z, x) for 1, 2 and 3 channels. XCL gave 0 / 1. ZERO / ONE selectors were already right.

Fixes points 1 and 3 of #1414. Point 2 (MTBUF ignoring the V#'s DST_SEL) is #875, which this leaves alone.

What is in it

  • crates/xcl/src/gpu/recomp/emit.rs:
    • fmt_comp returns 0 for a missing channel.
    • The new mubuf_sel maps an X..W selector to 4 + (sel - 4) % n.
    • BufKind::FormatLoad passes the V#'s selectors through it for ENC_MUBUF (d16 forms included).
  • crates/xcl/src/gpu/recomp/tests.rs, gpu_typed_buffer_loads_and_stores:
    • Case B (16_16_FLOAT, identity) now expects (1, -2, 1, -2), as #1414 predicts for 2-channel formats.
    • New case G: buffer_load_format_xyzw of 32_FLOAT reads (x, x, x, x).
    • New case H: buffer_load_format_xyzw of 32_32_32_FLOAT reads (x, y, z, x).
    • New case I: tbuffer_load_format_xyzw of 32_32_32_FLOAT reads a 4th channel of 0.
    • G, H and I give (x, 0, 0, 1), (x, y, z, 1) and w = 1.0 on main.

Tested

  • macOS, Rust stable: cargo check -p xcl --lib --tests --target x86_64-pc-windows-msvc, no errors (C code stubbed, nothing linked).
  • I traced the emitted HLSL for cases B, G, H and I against the tables in #1414, on main and on this branch. That was by reading it, not by running it.
  • @nnonno91, native Windows, RTX 5090, on this head 7c6a1b9 (report):
    • cargo test --workspace --locked --no-fail-fast -- --test-threads=4: 751 passed, 0 failed, 41 ignored, with SKIPPED (no wave64) gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware.
    • gpu_typed_buffer_loads_and_stores passes in all 64 lanes. Copied onto 930e8b4, it fails at case B, and lane 0 reads the old results: B (1, -2, 0, 1), G (2.5, 0, 0, 1), H (4, 2, 3, 1), I (4, 2, 3, 1).
  • @eizispark, native Windows, RX 9070 XT (RDNA4), on this head merged onto b7aa9f3: 751 passed, 0 failed, 41 ignored, no GPU skips. That includes gpu_typed_buffer_loads_and_stores and the native-wave64 tests. (report)
  • @LocranKing, native Windows, RTX 3060 Ti, on this head: cargo test --workspace --release, 751 passed, 0 failed, 41 ignored. (report)

Regression run
By @LocranKing: scripts/smoke.ps1, 60 s, RTX 3060 Ti, unedited, from the report.

main:

xcl-smoke v1
commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7
gpu: NVIDIA GeForce RTX 3060 Ti
title: retail-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1508 (PresentX 1508)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14730 MB

PR:

xcl-smoke v1
commit: 7c6a1b9e5b7ef22e9c5076ea5c8de8007b590c8e
gpu: NVIDIA GeForce RTX 3060 Ti
title: retail-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1547 (PresentX 1547)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14725 MB

Not tested

  • 1-, 2- and 3-channel formats other than those measured in #1414. The sel mod n rule is the issue's reading of 1, 2 and 3 channels with the identity and X↔Y selectors.
  • A retail title.

Overlaps
#875 and #1310 change the same lines of BufKind::FormatLoad; whichever merges later rebases. #1310's fmt_sel is a different helper from mubuf_sel.

AI use

  • Claude Code with Claude Opus 5.5. It wrote the change, the test cases and this description from #1414's measurements, and ran the macOS check.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5475513408 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1423). Originally posted by [tiagonogueiraa-bit](https://github.com/tiagonogueiraa-bit) on 2026-11-24T15:48:28Z. --- Typed buffer loads read the channels a format lacks the way @Lyrnc measured on gfx1036 (RDNA2) over all buffer formats in #1414: - `tbuffer_load_format_*` reads **0** in every missing channel, the 4th too. `fmt_comp` gave 1 / 1.0 for a missing 4th channel. - `buffer_load_format_*` with an X..W selector on a missing channel reads channel **`sel mod n`** of the format: `(x, x, x, x)`, `(x, y, x, y)` and `(x, y, z, x)` for 1, 2 and 3 channels. XCL gave 0 / 1. ZERO / ONE selectors were already right. Fixes points 1 and 3 of #1414. Point 2 (MTBUF ignoring the V#'s `DST_SEL`) is #875, which this leaves alone. **What is in it** - `crates/xcl/src/gpu/recomp/emit.rs`: - `fmt_comp` returns 0 for a missing channel. - The new `mubuf_sel` maps an X..W selector to `4 + (sel - 4) % n`. - `BufKind::FormatLoad` passes the V#'s selectors through it for `ENC_MUBUF` (d16 forms included). - `crates/xcl/src/gpu/recomp/tests.rs`, `gpu_typed_buffer_loads_and_stores`: - Case B (`16_16_FLOAT`, identity) now expects `(1, -2, 1, -2)`, as #1414 predicts for 2-channel formats. - New case G: `buffer_load_format_xyzw` of `32_FLOAT` reads `(x, x, x, x)`. - New case H: `buffer_load_format_xyzw` of `32_32_32_FLOAT` reads `(x, y, z, x)`. - New case I: `tbuffer_load_format_xyzw` of `32_32_32_FLOAT` reads a 4th channel of 0. - G, H and I give `(x, 0, 0, 1)`, `(x, y, z, 1)` and `w = 1.0` on `main`. **Tested** - macOS, Rust stable: `cargo check -p xcl --lib --tests --target x86_64-pc-windows-msvc`, no errors (C code stubbed, nothing linked). - I traced the emitted HLSL for cases B, G, H and I against the tables in #1414, on `main` and on this branch. That was by reading it, not by running it. - @nnonno91, native Windows, RTX 5090, on this head `7c6a1b9` ([report](https://github.com/ivall/xcl/pull/1423#issuecomment-7136937750)): - `cargo test --workspace --locked --no-fail-fast -- --test-threads=4`: **751 passed, 0 failed, 41 ignored**, with SKIPPED (no wave64) `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware`. - `gpu_typed_buffer_loads_and_stores` passes in all 64 lanes. Copied onto `930e8b4`, it fails at case B, and lane 0 reads the old results: B `(1, -2, 0, 1)`, G `(2.5, 0, 0, 1)`, H `(4, 2, 3, 1)`, I `(4, 2, 3, 1)`. - @eizispark, native Windows, RX 9070 XT (RDNA4), on this head merged onto `b7aa9f3`: **751 passed, 0 failed, 41 ignored**, no GPU skips. That includes `gpu_typed_buffer_loads_and_stores` and the native-wave64 tests. ([report](https://github.com/xcl-dev/xcl/pull/1423#issuecomment-7137876047)) - @LocranKing, native Windows, RTX 3060 Ti, on this head: `cargo test --workspace --release`, **751 passed, 0 failed, 41 ignored**. ([report](https://github.com/xcl-dev/xcl/pull/1423#issuecomment-7138412887)) **Regression run** By @LocranKing: `scripts/smoke.ps1`, 60 s, RTX 3060 Ti, unedited, from [the report](https://github.com/xcl-dev/xcl/pull/1423#issuecomment-7138412887). main: ``` xcl-smoke v1 commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7 gpu: NVIDIA GeForce RTX 3060 Ti title: retail-1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1508 (PresentX 1508) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14730 MB ``` PR: ``` xcl-smoke v1 commit: 7c6a1b9e5b7ef22e9c5076ea5c8de8007b590c8e gpu: NVIDIA GeForce RTX 3060 Ti title: retail-1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1547 (PresentX 1547) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14725 MB ``` **Not tested** - 1-, 2- and 3-channel formats other than those measured in #1414. The `sel mod n` rule is the issue's reading of 1, 2 and 3 channels with the identity and X↔Y selectors. - A retail title. **Overlaps** #875 and #1310 change the same lines of `BufKind::FormatLoad`; whichever merges later rebases. #1310's `fmt_sel` is a different helper from `mubuf_sel`. **AI use** - Claude Code with Claude Opus 5.5. It wrote the change, the test cases and this description from #1414's measurements, and ran the macOS check. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
nnonno91 commented 2026-11-24 16:07:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by nnonno91 on 2026-11-24T15:59:13Z.


Native Windows GPU test report for 7c6a1b9

gpu_typed_buffer_loads_and_stores passed on an RTX 5090. I also ran the PR’s test on its base with a lane-0 readback before the assertions. The base failed at case B, and its readback showed the old results in all four cases.

Case Base 930e8b4, lane 0 PR 7c6a1b9, verified across all 64 lanes
B · MUBUF 16_16_FLOAT (1, -2, 0, 1) (1, -2, 1, -2)
G · MUBUF 32_FLOAT (2.5, 0, 0, 1) (2.5, 2.5, 2.5, 2.5)
H · MUBUF 32_32_32_FLOAT (4, 2, 3, 1) (4, 2, 3, 4)
I · MTBUF 32_32_32_FLOAT (4, 2, 3, 1) (4, 2, 3, 0)

Tested

  • Windows 11 25H2 (26200.9974), Ryzen 7 9800X3D, GeForce RTX 5090 (driver 617.42), Rust 1.100.0 MSVC, DXC 1.8.2502.11.
  • cargo test --locked -p xcl --lib gpu_typed_buffer_loads_and_stores -- --nocapture --test-threads=1 passed on clean head 7c6a1b9e5b7ef22e9c5076ea5c8de8007b590c8e. For the baseline, I copied only the updated test function to 930e8b49c1c2ec683d22c724a398b39111cd0e56 and added the lane-0 readback above.
  • cargo build --workspace --locked and cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output passed on the PR head. Cargo reported 751 passed, 0 failed, 41 ignored, including the synthetic end-to-end title. The pass count includes two GPU skips for lack of native wave64: gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware.

Not tested

  • Retail-title smoke runs, native wave64, and formats outside the test fixture.

AI use

  • OpenAI Codex (GPT-6, exact model variant unavailable) ran the tests and prepared this report.
<!-- greyfinch-sync:ivall/xcl:comment:7136937750 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1423#issuecomment-7136937750). Originally posted by [nnonno91](https://github.com/nnonno91) on 2026-11-24T15:59:13Z. --- ### Native Windows GPU test report for `7c6a1b9` `gpu_typed_buffer_loads_and_stores` passed on an RTX 5090. I also ran the PR’s test on its base with a lane-0 readback before the assertions. The base failed at case B, and its readback showed the old results in all four cases. | Case | Base `930e8b4`, lane 0 | PR `7c6a1b9`, verified across all 64 lanes | | --- | --- | --- | | B · MUBUF `16_16_FLOAT` | `(1, -2, 0, 1)` | `(1, -2, 1, -2)` | | G · MUBUF `32_FLOAT` | `(2.5, 0, 0, 1)` | `(2.5, 2.5, 2.5, 2.5)` | | H · MUBUF `32_32_32_FLOAT` | `(4, 2, 3, 1)` | `(4, 2, 3, 4)` | | I · MTBUF `32_32_32_FLOAT` | `(4, 2, 3, 1)` | `(4, 2, 3, 0)` | **Tested** - Windows 11 25H2 (26200.9974), Ryzen 7 9800X3D, GeForce RTX 5090 (driver 617.42), Rust 1.100.0 MSVC, DXC 1.8.2502.11. - `cargo test --locked -p xcl --lib gpu_typed_buffer_loads_and_stores -- --nocapture --test-threads=1` passed on clean head `7c6a1b9e5b7ef22e9c5076ea5c8de8007b590c8e`. For the baseline, I copied only the updated test function to `930e8b49c1c2ec683d22c724a398b39111cd0e56` and added the lane-0 readback above. - `cargo build --workspace --locked` and `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output` passed on the PR head. Cargo reported **751 passed, 0 failed, 41 ignored**, including the synthetic end-to-end title. The pass count includes two GPU skips for lack of native wave64: `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware`. **Not tested** - Retail-title smoke runs, native wave64, and formats outside the test fixture. **AI use** - OpenAI Codex (GPT-6, exact model variant unavailable) ran the tests and prepared this report.
tiagonogueiraa-bit commented 2026-11-24 16:07:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonogueiraa-bit on 2026-11-24T15:59:57Z.


Thank you, @nnonno91! The base-vs-head table across B / G / H / I is exactly the evidence this needed. It's in Tested, and the PR is marked ready for review.

Written with Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7136956531 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1423#issuecomment-7136956531). Originally posted by [tiagonogueiraa-bit](https://github.com/tiagonogueiraa-bit) on 2026-11-24T15:59:57Z. --- Thank you, @nnonno91! The base-vs-head table across B / G / H / I is exactly the evidence this needed. It's in **Tested**, and the PR is marked ready for review. Written with Claude Code (Claude Opus 5.5).
eizispark commented 2026-11-24 17:06:30 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by eizispark on 2026-11-24T16:34:23Z.


Hardware test report — commit 7c6a1b9

Verified clean merge with main (b7aa9f3) on 7c6a1b9e5b7ef22e9c5076ea5c8de8007b590c8e: pass.

Tested

  • Hardware: Windows 11 x64, AMD Ryzen 7 9800X3D, AMD Radeon RX 9070 XT (RDNA4, driver 32.0.32015.16001), 32 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), release + test profile
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 751 passed, 0 failed, 41 ignored (GPU tests skipped on this adapter: none), including gpu::recomp::tests::gpu_typed_buffer_loads_and_stores and the native-wave64 tests (gpu_wave32_program_in_wave64_hardware, console_wave64_compute_through_the_pso_hook_dispatch_and_read_back)

Regression run
main (b7aa9f3; merge-base 930e8b4 also measured 1667 frames / 14861 MB on this machine):

xcl-smoke v1
commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7
gpu: AMD Radeon RX 9070 XT
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1678 (PresentX 1678)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14855 MB

PR (7c6a1b9):

xcl-smoke v1
commit: 7c6a1b9e5b7ef22e9c5076ea5c8de8007b590c8e
gpu: AMD Radeon RX 9070 XT
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1675 (PresentX 1675)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14863 MB

Not tested

  • wave32-only GPUs (NVIDIA / Intel); retail run under XCL_D3D12_DEBUG=1; gameplay past the menus

AI use

  • Antigravity (Google DeepMind, Gemini 4 Carbon) — ran the workspace test suite and 60 s retail smoke check and formatted this report.
<!-- greyfinch-sync:ivall/xcl:comment:7137876047 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1423#issuecomment-7137876047). Originally posted by [eizispark](https://github.com/eizispark) on 2026-11-24T16:34:23Z. --- ### Hardware test report — commit `7c6a1b9` Verified clean merge with `main` (`b7aa9f3`) on `7c6a1b9e5b7ef22e9c5076ea5c8de8007b590c8e`: **pass**. **Tested** - Hardware: Windows 11 x64, AMD Ryzen 7 9800X3D, AMD Radeon RX 9070 XT (RDNA4, driver 32.0.32015.16001), 32 GB RAM, `rustc 1.100.0 (0ef1bc386 2026-11-09)`, release + test profile - `cargo test --workspace --no-fail-fast -- --test-threads=4`: `751 passed, 0 failed, 41 ignored` (GPU tests skipped on this adapter: `none`), including `gpu::recomp::tests::gpu_typed_buffer_loads_and_stores` and the native-wave64 tests (`gpu_wave32_program_in_wave64_hardware`, `console_wave64_compute_through_the_pso_hook_dispatch_and_read_back`) **Regression run** `main` (`b7aa9f3`; merge-base `930e8b4` also measured `1667` frames / `14861 MB` on this machine): ``` xcl-smoke v1 commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7 gpu: AMD Radeon RX 9070 XT title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1678 (PresentX 1678) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14855 MB ``` PR (`7c6a1b9`): ``` xcl-smoke v1 commit: 7c6a1b9e5b7ef22e9c5076ea5c8de8007b590c8e gpu: AMD Radeon RX 9070 XT title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1675 (PresentX 1675) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14863 MB ``` **Not tested** - wave32-only GPUs (NVIDIA / Intel); retail run under `XCL_D3D12_DEBUG=1`; gameplay past the menus **AI use** - Antigravity (Google DeepMind, Gemini 4 Carbon) — ran the workspace test suite and 60 s retail smoke check and formatted this report.
LocranKing commented 2026-11-24 17:06:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by LocranKing on 2026-11-24T16:55:19Z.


Tested on Windows 11 + NVIDIA GeForce RTX 3060 Ti (8 GB, wave32), including a 60 s retail regression smoke run on clean head 7c6a1b9e5b7ef22e9c5076ea5c8de8007b590c8e.

Tested

  • Commit: 7c6a1b9e5b7ef22e9c5076ea5c8de8007b590c8e (clean tree, merge-base 930e8b4)
  • Hardware / software: Windows 11 Home Build 26200, AMD Ryzen 5 5500, 31.8 GB RAM, NVIDIA GeForce RTX 3060 Ti (8024 MiB VRAM, driver 32.0.16.2101), rustc 1.100.0 (x86_64-pc-windows-msvc, MSVC 14.44.35207), DXC 1.9.2602.17 (SDK 10.0.26100.0), --release
  • cargo build --release --workspace: ok (exit 0)
  • cargo test --workspace --release --no-fail-fast -- --test-threads=4: 751 passed, 0 failed, 41 ignored, exit 0
    • SKIPPED (no wave64): gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware

Regression run
main baseline (b7aa9f3bd212088e0d927439284dc5ed325ce3c7):

xcl-smoke v1
commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7
gpu: NVIDIA GeForce RTX 3060 Ti
title: retail-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1508 (PresentX 1508)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14730 MB

PR head (7c6a1b9e5b7ef22e9c5076ea5c8de8007b590c8e):

xcl-smoke v1
commit: 7c6a1b9e5b7ef22e9c5076ea5c8de8007b590c8e
gpu: NVIDIA GeForce RTX 3060 Ti
title: retail-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1547 (PresentX 1547)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14725 MB

Not tested: debug build, XCL_SAMPLE_* tests on this branch, AMD / native wave64 hardware, interactive past-menu gameplay beyond 60 s.

AI use: Antigravity (Gemini 4 Hydrogen) ran the build, tests, and smoke runs and drafted this report from the command outputs.

<!-- greyfinch-sync:ivall/xcl:comment:7138412887 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1423#issuecomment-7138412887). Originally posted by [LocranKing](https://github.com/LocranKing) on 2026-11-24T16:55:19Z. --- Tested on Windows 11 + NVIDIA GeForce RTX 3060 Ti (8 GB, wave32), including a 60 s retail regression smoke run on clean head `7c6a1b9e5b7ef22e9c5076ea5c8de8007b590c8e`. **Tested** - Commit: `7c6a1b9e5b7ef22e9c5076ea5c8de8007b590c8e` (clean tree, merge-base `930e8b4`) - Hardware / software: Windows 11 Home Build 26200, AMD Ryzen 5 5500, 31.8 GB RAM, NVIDIA GeForce RTX 3060 Ti (`8024 MiB VRAM`, driver `32.0.16.2101`), `rustc 1.100.0` (`x86_64-pc-windows-msvc`, MSVC `14.44.35207`), DXC `1.9.2602.17` (SDK `10.0.26100.0`), `--release` - `cargo build --release --workspace`: ok (`exit 0`) - `cargo test --workspace --release --no-fail-fast -- --test-threads=4`: **751 passed, 0 failed, 41 ignored**, exit `0` - `SKIPPED` (`no wave64`): `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` **Regression run** `main` baseline (`b7aa9f3bd212088e0d927439284dc5ed325ce3c7`): ``` xcl-smoke v1 commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7 gpu: NVIDIA GeForce RTX 3060 Ti title: retail-1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1508 (PresentX 1508) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14730 MB ``` PR head (`7c6a1b9e5b7ef22e9c5076ea5c8de8007b590c8e`): ``` xcl-smoke v1 commit: 7c6a1b9e5b7ef22e9c5076ea5c8de8007b590c8e gpu: NVIDIA GeForce RTX 3060 Ti title: retail-1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1547 (PresentX 1547) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14725 MB ``` **Not tested:** debug build, `XCL_SAMPLE_*` tests on this branch, AMD / native wave64 hardware, interactive past-menu gameplay beyond 60 s. **AI use:** Antigravity (`Gemini 4 Hydrogen`) ran the build, tests, and smoke runs and drafted this report from the command outputs.
DavidM1911 commented 2026-11-24 18:08:59 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T17:21:25Z.


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

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

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7139071108 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1423#issuecomment-7139071108). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T17:21:25Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. Thanks!
tiagonogueiraa-bit commented 2026-11-24 21:08:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonogueiraa-bit on 2026-11-24T19:22:02Z.


Thank you, @eizispark and @LocranKing! Both suites are in Tested, and LocranKing's xcl-smoke pair is under Regression run exactly as posted. Its title names no game, so it can go in. @eizispark, yours names the game through the folder, so it's linked rather than pasted.

Written with Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7141991841 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1423#issuecomment-7141991841). Originally posted by [tiagonogueiraa-bit](https://github.com/tiagonogueiraa-bit) on 2026-11-24T19:22:02Z. --- Thank you, @eizispark and @LocranKing! Both suites are in **Tested**, and LocranKing's `xcl-smoke` pair is under **Regression run** exactly as posted. Its `title` names no game, so it can go in. @eizispark, yours names the game through the folder, so it's linked rather than pasted. Written with Claude Code (Claude Opus 5.5).
Lyrnc commented 2026-11-26 17:10:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Lyrnc on 2026-11-26T17:10:06Z.


Test report for 7c6a1b9 on gfx1036 and an RTX 5080, with and without #875

Setup

  • GPUs: the Radeon iGPU of a Ryzen 7 9800X3D (gfx1036, RDNA2, driver 32.0.21042.62), which is the GPU the #1414 tables come from, and an RTX 5080 (driver 610.88). Windows 11 Pro 26200, rustc 1.98.0, DXC 1.9.2609.5.
  • Four local merges: main e120925e, main + #1423, main + #875 (077de0d9), and main + both. main is now 8b957bec, but none of those 5 commits touch crates/xcl/src/gpu.
  • Commands: XCL_ADAPTER=radeon|nvidia XCL_REQUIRE_GPU=wave64 cargo test -p xcl --lib -- --exact gpu::recomp::tests::<test> --nocapture --test-threads=1, and cargo test -p xcl --lib recomp -- --test-threads=4 on each tree.
  • Hardware comparison: the local test from #1414, 141 jobs of 64 rows each through prog + runner::run_code, compared with the gfx1036 results.

Merging onto current main. #1423 conflicts with 9f65f957 (from #1524) in both files:

  • emit.rs: main's dst_sel now indexes with pick4(c, (sel - 4u) & 3u). I kept main's line and added mubuf_sel after it.
  • tests.rs: main added a 32_32_32_32 selector case to gpu_typed_buffer_loads_and_stores. It uses v35..v38, SRSRC 11 and 13, and data at 0x140..0x160, which are the registers and memory G / H / I use. Git merges the instruction list without a conflict, so both sets of loads end up in it, sharing those V#s. I moved G / H / I to v39..v50, SRSRC 14 / 15 and data at 0x160 / 0x170, and left main's case as it is.

Results. The Radeon and the 5080 gave the same pass / fail in every cell.

main main + #1423 main + #875 main + both
gpu_typed_buffer_loads_and_stores (each tree's own version) pass pass pass pass
#1423's version of it, on main's emit.rs fails at B
gpu_tbuffer_load_identity_dst_sel (#875) – – pass fails
tbuffer_load_ignores_vsharp_dst_sel (#875) – – pass fails
cargo test -p xcl --lib recomp, passed / failed / ignored 401 / 0 / 20 401 / 0 / 20 403 / 0 / 20 401 / 2 / 20

On main's emit.rs, lane 0 reads B (1, -2, 0, 1), G (2.5, 0, 0, 1), H (4, 2, 3, 1) and I (4, 2, 3, 1) on both GPUs. The recomp runs had the same SKIPPED lines in every tree: 6 on the Radeon and 23 on the 5080 (#1426 refusals, no native wave64).

Jobs that differ from gfx1036 by more than 1 ULP (the same counts on both GPUs):

jobs main + #1423 + #875 + both
tbuffer_load_format_xyzw, 77 formats, identity V# 49 0 49 0
buffer_load_format_xyzw, 8 formats × 4 V# selectors 22 0 22 0
tbuffer_load_format_xyzw, 8 formats × 4 V# selectors 24 18 24 0

With #1423 alone, the 18 jobs left are all point 2 (#875): W = ONE and X↔Y on all 8 formats, and W = ZERO on the two 4-channel ones. With both PRs, the only differences left are 1-ULP UNORM / SNORM results (the rounding #1414 lists separately) and NaN payloads.

Conflict with #875. I merged #875 on top. In the emit.rs conflict, tbuffer takes {t}_c.x..w as in #875, and buffer_load_format goes through mubuf_sel. Two of #875's tests then fail on both GPUs:

  • tests.rs:1631 at 077de0d9:
    assert_eq!(v[18..22], [f(1.0), f(-2.0), 0, f(1.0)], "lane {l} tbuffer 16_16_FLOAT: V# SEL_0 ignored, z = 0, w = 1");
    The run gives left: [1065353216, 3221225472, 0, 0]. A 4th channel of 0 on a 2-channel format is what gfx1036 returns in #1414 (point 1).
    The next line, assert_eq!(v[22..24], [0xC000_3C00, 0x3C00_0000], "lane {l} tbuffer d16 xyzw");, expects 1.0 in the d16 form as well, and a lane-0 readback gives v23 = 0. I didn't measure d16 on hardware.
  • tests.rs:1590:
    assert!(t.hlsl.contains("v10 = select(t1_ok, dst_sel(t1_c, (s15 >> 0u) & 7u, t1_int), 0u);"), "{}", t.hlsl);
    The HLSL is now v10 = select(t1_ok, dst_sel(t1_c, mubuf_sel((s15 >> 0u) & 7u, t1_info), t1_int), 0u);. With only that string changed, the rest of the test passes.

Whichever PR lands second needs those lines changed.

Not covered by either PR. With XCL_DIRECT_DXIL=1, the direct DXIL backend (crates/xcl/src/gpu/dxil/lower_mem.rs, which has its own fmt_comp / dst_sel) still behaves as main does. On main + both, the 141 jobs give the same output as main byte for byte, and gpu_typed_buffer_loads_and_stores fails at B.

Not tested: a title smoke run, the full workspace suite, and d16 loads against hardware.

AI use: Claude Code (Claude Opus 5.5) ran the tests and the comparison on the GPUs above and drafted this comment; the numbers come from those runs.

<!-- greyfinch-sync:ivall/xcl:comment:7198594230 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1423#issuecomment-7198594230). Originally posted by [Lyrnc](https://github.com/Lyrnc) on 2026-11-26T17:10:06Z. --- ### Test report for `7c6a1b9` on gfx1036 and an RTX 5080, with and without #875 **Setup** - GPUs: the Radeon iGPU of a Ryzen 7 9800X3D (gfx1036, RDNA2, driver 32.0.21042.62), which is the GPU the #1414 tables come from, and an RTX 5080 (driver 610.88). Windows 11 Pro 26200, rustc 1.98.0, DXC 1.9.2609.5. - Four local merges: `main` `e120925e`, main + #1423, main + #875 (`077de0d9`), and main + both. main is now `8b957bec`, but none of those 5 commits touch `crates/xcl/src/gpu`. - Commands: `XCL_ADAPTER=radeon|nvidia XCL_REQUIRE_GPU=wave64 cargo test -p xcl --lib -- --exact gpu::recomp::tests::<test> --nocapture --test-threads=1`, and `cargo test -p xcl --lib recomp -- --test-threads=4` on each tree. - Hardware comparison: the local test from #1414, 141 jobs of 64 rows each through `prog` + `runner::run_code`, compared with the gfx1036 results. **Merging onto current main.** #1423 conflicts with `9f65f957` (from #1524) in both files: - `emit.rs`: main's `dst_sel` now indexes with `pick4(c, (sel - 4u) & 3u)`. I kept main's line and added `mubuf_sel` after it. - `tests.rs`: main added a `32_32_32_32` selector case to `gpu_typed_buffer_loads_and_stores`. It uses v35..v38, SRSRC 11 and 13, and data at `0x140..0x160`, which are the registers and memory G / H / I use. Git merges the instruction list without a conflict, so both sets of loads end up in it, sharing those V#s. I moved G / H / I to v39..v50, SRSRC 14 / 15 and data at `0x160` / `0x170`, and left main's case as it is. **Results.** The Radeon and the 5080 gave the same pass / fail in every cell. | | main | main + #1423 | main + #875 | main + both | |---|---|---|---|---| | `gpu_typed_buffer_loads_and_stores` (each tree's own version) | pass | pass | pass | pass | | #1423's version of it, on main's `emit.rs` | fails at B | | | | | `gpu_tbuffer_load_identity_dst_sel` (#875) | – | – | pass | **fails** | | `tbuffer_load_ignores_vsharp_dst_sel` (#875) | – | – | pass | **fails** | | `cargo test -p xcl --lib recomp`, passed / failed / ignored | 401 / 0 / 20 | 401 / 0 / 20 | 403 / 0 / 20 | 401 / 2 / 20 | On main's `emit.rs`, lane 0 reads B `(1, -2, 0, 1)`, G `(2.5, 0, 0, 1)`, H `(4, 2, 3, 1)` and I `(4, 2, 3, 1)` on both GPUs. The `recomp` runs had the same SKIPPED lines in every tree: 6 on the Radeon and 23 on the 5080 (#1426 refusals, no native wave64). Jobs that differ from gfx1036 by more than 1 ULP (the same counts on both GPUs): | jobs | main | + #1423 | + #875 | + both | |---|---|---|---|---| | `tbuffer_load_format_xyzw`, 77 formats, identity V# | 49 | 0 | 49 | 0 | | `buffer_load_format_xyzw`, 8 formats × 4 V# selectors | 22 | 0 | 22 | 0 | | `tbuffer_load_format_xyzw`, 8 formats × 4 V# selectors | 24 | 18 | 24 | 0 | With #1423 alone, the 18 jobs left are all point 2 (#875): W = ONE and X↔Y on all 8 formats, and W = ZERO on the two 4-channel ones. With both PRs, the only differences left are 1-ULP UNORM / SNORM results (the rounding #1414 lists separately) and NaN payloads. **Conflict with #875.** I merged #875 on top. In the `emit.rs` conflict, tbuffer takes `{t}_c.x..w` as in #875, and buffer_load_format goes through `mubuf_sel`. Two of #875's tests then fail on both GPUs: - `tests.rs:1631` at `077de0d9`: `assert_eq!(v[18..22], [f(1.0), f(-2.0), 0, f(1.0)], "lane {l} tbuffer 16_16_FLOAT: V# SEL_0 ignored, z = 0, w = 1");` The run gives `left: [1065353216, 3221225472, 0, 0]`. A 4th channel of 0 on a 2-channel format is what gfx1036 returns in #1414 (point 1). The next line, `assert_eq!(v[22..24], [0xC000_3C00, 0x3C00_0000], "lane {l} tbuffer d16 xyzw");`, expects 1.0 in the d16 form as well, and a lane-0 readback gives `v23 = 0`. I didn't measure d16 on hardware. - `tests.rs:1590`: `assert!(t.hlsl.contains("v10 = select(t1_ok, dst_sel(t1_c, (s15 >> 0u) & 7u, t1_int), 0u);"), "{}", t.hlsl);` The HLSL is now `v10 = select(t1_ok, dst_sel(t1_c, mubuf_sel((s15 >> 0u) & 7u, t1_info), t1_int), 0u);`. With only that string changed, the rest of the test passes. Whichever PR lands second needs those lines changed. **Not covered by either PR.** With `XCL_DIRECT_DXIL=1`, the direct DXIL backend (`crates/xcl/src/gpu/dxil/lower_mem.rs`, which has its own `fmt_comp` / `dst_sel`) still behaves as main does. On main + both, the 141 jobs give the same output as main byte for byte, and `gpu_typed_buffer_loads_and_stores` fails at B. Not tested: a title smoke run, the full workspace suite, and d16 loads against hardware. AI use: Claude Code (Claude Opus 5.5) ran the tests and the comparison on the GPUs above and drafted this comment; the numbers come from those runs.
Foniass commented 2026-12-01 05:42:23 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:42:23Z.


Triage (#1607) – head 7c6a1b9

No open or merged PR makes this change. #1840 (also mentions #1414) changes how normalized formats round, not what missing channels read, so the two do not overlap.
Since this branch was cut, main has a direct-DXIL lowering of format loads: gpu/dxil/lower_mem.rs fmt_comp still returns 1 / 1.0 for a missing 4th channel, and it has no mubuf_sel. After the rebase that path will still read the old values unless the same change is made there.
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:7302049989 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1423#issuecomment-7302049989). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:42:23Z. --- **Triage (#1607)** – head 7c6a1b9 No open or merged PR makes this change. #1840 (also mentions #1414) changes how normalized formats round, not what missing channels read, so the two do not overlap. Since this branch was cut, main has a direct-DXIL lowering of format loads: `gpu/dxil/lower_mem.rs` `fmt_comp` still returns 1 / 1.0 for a missing 4th channel, and it has no `mubuf_sel`. After the rebase that path will still read the old values unless the same change is made there. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1423:upstream-pr/1423'
git switch 'upstream-pr/1423'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1423'
git switch 'upstream-pr/1423'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1423'
git switch 'upstream-pr/1423'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1423'
git switch 'main'
git merge --squash 'upstream-pr/1423'
git switch 'main'
git merge --ff-only 'upstream-pr/1423'
git switch 'main'
git merge 'upstream-pr/1423'
git push origin 'main'
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!1413
No description provided.