Recompiler: a pixel shader's carry ballot reads its quad lane by lane, not through quadOp #3455

Open
ArtuArtaza wants to merge 1 commit from upstream-pr/3455 into main
ArtuArtaza commented 2026-11-29 19:40:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ArtuArtaza on 2026-11-29T19:40:40Z.


On an RX 6700 XT the retail title (TitleID 7952987A, Series S profile) ends at its first world load: unhandled exception 0xc0000005 in amdxc64.dll (a null read) about 1 ms into the build of one graphics pipeline, the one of pixel shader record 7381166e806847c9. It is the same on drivers 32.0.21030.2001 (+0x65d678) and 32.0.21045.29003 (+0x671f78), with one pipeline worker too, and 3,000+ other graphics pipelines build fine before it.

The cause is in the direct translator's pixel-shader ballot outside compares (Lw::ballot_ps: carry masks and the like). It collected its quad's 4 bits through QuadReadAcrossX/Y/Diagonal (quadOp). In this PS 10 of its 27 such ballots take a value that derives from WaveReadLaneAt. That is the driver bug the compare path already avoids (#134, lower_valu: "amdxc64 crashes on quadOp of values derived from WaveReadLaneAt"); this path was not covered. The ballot now reads its quad with 4 QuadReadLaneAt, as the compare path does. Related: #134, #2996.

Rebased on main 9dfbe3ea. #3501 had added note_own_bit to ballot_ps since the first head (8363f77a), and that head returned before it: the two merged without a conflict, but the new form then tested a lane's own bit through the mask's word, and helper lanes drew another value than in the quadOp form. saintwolf found it (16 pixels of the GPU test, on an RTX 4070 SUPER; I get the same 16 on RDNA2). Both forms now end in the same ballot_ps_quad + note_own_bit.

How it was narrowed (on fa204595 with local per-PS debug switches, not in this PR): the pipeline builds without its PS (397 ms); it still dies without blending and in the plain wave64 form. With the ballots lane by lane, the same VS and description (byte-identical) and a PS that differs only in quadOp 81 → 0, quadReadLaneAt 172 → 280 build in 4.3 s.

How to test

  • Build: git fetch origin pull/3455/head:pr-3455, git checkout pr-3455, cargo build --release -p xcl. Nothing to clear: an edit of gpu/dxil changes the translations' cache identity, and the driver builds again only the pixel shaders whose DXIL changed.
  • Does your card have the crash: run the title on main with XCL_PREPARE=0 XCL_PSO_TRACE=1 XCL_ACTIVITY=1 (I used XCL_DEVICE_TYPE=lockhart) and go into the world. It is unhandled exception 0xc0000005 in amdxc64.dll right after driver compile start …: graphics PSO, … record 7381166e806847c9, and the process ends. Here that came 4 – 7 minutes in on a cold driver cache, most of them without frames (the wait of #2996).
  • With this PR the same run logs driver compile finish for that record and goes on.
  • Other adapters (NVIDIA, Intel): cargo test -p xcl --lib ps_ballot_tests (its GPU test draws both forms and compares the pixels) and a scripts/smoke.ps1 pair.
  • Useful in a report: GPU and driver, the commit, crashed or not, and the last driver compile start line before a crash.

What is in it

  • crates/xcl/src/gpu/dxil/lanes.rs: ballot_ps ors quad_read_lane_at(cond, p) << p for p in 0..4 (bit p is the quad's member p, which own << (lane & 3) relied on too), then records the own bit as before. Only tests can ask for the quadOp form (cfg(test)). No TRANSLATOR_VERSION bump: a gpu/dxil edit changes the direct translations' cache identity by itself.
  • Tests in lanes.rs: direct_ps_non_vopc_carry_ballot_reads_its_quad_lane_by_lane (was ..._uses_quad_op) checks both forms' DXIL, also with the carry's operand coming through v_readfirstlane, and that v_cndmask takes the carry itself in both; gpu_direct_ps_carry_ballot_draws_the_same_lane_by_lane_as_through_quadop draws a carry mask, its DPP ddx (helper lanes on the triangles' edge) and the mask's bit of the lane to the right (from the mask's word) in both forms, and compares every pixel; away from that edge it also compares with the known values.
  • crates/xcl/src/gpu/dxil/kernel.rs: the test-only choice of the form is handed to the translator's thread, like NO_SELECT_FOLD.

Tested

  • AMD Radeon RX 6700 XT (driver 32.0.21045.29003), Ryzen 5 5600X, 48 GB, Windows 11 build 26200.9974, rustc 1.100.0; tests in debug, title runs in release.
  • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4 (with --nocapture, on this tree just before it was committed as 4dd68427): 2881 passed, 7 failed, 51 ignored (44 test binaries). The 7 are 6 tests, and all 6 failed with the same values on unmodified main 9dfbe3ea on this card (ran them there alone, for 4dd1796f; not again for 4dd68427): gpu_compact_form_with_micro_blocks_and_literal_table_runs_as_the_plain_form (what #3473 fixes), gpu_direct_image_get_resinfo_d16 (see #3513), f32_programs_on_the_gpu, gpu_f32_compares_with_nan, gpu_float_compares_random (all three in gpu/recomp), and two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (parent and child run). 4 SKIPPED (2 no heap windows, 1 no GPU_UPLOAD heaps, 1 cannot disable the driver cache).
  • cargo test -p xcl --lib ps_ballot_tests on the same tree: 9 passed, 0 failed. On 4dd1796f: with note_own_bit taken out of the new form both changed tests fail (the v_cndmask tests the mask's word; 32 pixels differ). With XCL_ADAPTER=warp: 9 passed, the 3 GPU tests of the module SKIPPED (no wave32 / no wave64).
  • The crash, on the first head only (8363f77a, against its main 0fe06eb0; not repeated on 9dfbe3ea): the retail title, XCL_DEVICE_TYPE=lockhart XCL_PREPARE=0 XCL_PSO_TRACE=1, A pressed every 15 s from 30 s, 720 s, one run each:
    • main 0fe06eb0: driver compile start #3221: graphics PSO, 138304 B DXIL, record 7381166e806847c9 at 259.6 s, the null read in amdxc64.dll+0x671f78 at 260.3 s, the process ends (exit 0xc0000005).
    • 8363f77a: the pipeline of record 7381166e806847c9 (138944 B of DXIL) builds and the run ends by itself at 720 s (exit 0x0, 3075 frames), 0 device removals, 0 pipelines rejected. The driver took 2797 ms for it the first time (at 237.0 s, on ebcc28f5) and 1 ms from its cache in that run (at 167.6 s).
  • A synthetic PS with only this shape (a carry ballot of a v_readfirstlane value) does not crash this driver in the quadOp form, so there is no small reproduction: the tests check the form and the pixels, not the crash.

Regression run

60 s (menus, the pipeline is not reached), scripts/smoke.ps1, XCL_DEVICE_TYPE=lockhart XCL_PREPARE=0, A pressed at 30 s and 45 s: main 9dfbe3ea (this PR's merge base, which ran first), then this PR's head.

xcl-smoke v1
commit: 9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b
gpu: AMD Radeon RX 6700 XT
title: 2c508222
seconds: 60
exit: 0x0
frames shown: 1565 (PresentX 1565)
presents per 2 s (last 3): 60 60 61
device removals: 0
crashes: 0
peak commit: 13578 MB
xcl-smoke v1
commit: 4dd6842738511d3de90b272d1f87aa745d165799
gpu: AMD Radeon RX 6700 XT
title: 2c508222
seconds: 60
exit: 0x0
frames shown: 1543 (PresentX 1543)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13683 MB

Not tested

  • By me: the crash on a main with #3501, and this head past it. Chrysana reports it in the comments for 4dd1796f: main d0832e61 dies on this record on an RX 9070 XT (RDNA4) and an RDNA2 iGPU, and with this PR it builds on both.
  • NVIDIA and Intel GPUs by me: the changed DXIL goes to every adapter. The op is the one the compare path already emits everywhere. (A contributor's run of the first head's ps_ballot_tests on an RTX 5070 Ti is in the comments, from before #3501.)
  • RDNA3: whether its driver dies on this pipeline at all.
  • Frame time of pixel shaders with many carry ballots (4 lane reads instead of 3 quadOp); the 60 s frame counts above are my only measure. In the comments, 60 s, one run per side: 101 % of main's frames on an RTX 5070 Ti, 93 % on an RTX 3090 (cold cache).
  • The title after this point: with the pipeline built it still showed no frames for the rest of the 720 s, waiting on its big compute programs (the wall of #2996). This PR does not touch that.

AI use

  • Claude Code with Claude Fable 5.2 found the cause (took the pipeline apart on the hardware above), wrote the first head and its tests and ran its runs; Claude Opus 5.5 rebased it, found and fixed the missing own bit, extended the tests, ran the suite and the 60 s runs, removed the XCL_PS_BALLOT_QUADOP switch after review, and wrote this version of the description. All on my machine; the PR was submitted from my Claude Code session at my request, with me present.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5554373974 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455). Originally posted by [ArtuArtaza](https://github.com/ArtuArtaza) on 2026-11-29T19:40:40Z. --- On an RX 6700 XT the retail title (TitleID 7952987A, Series S profile) ends at its first world load: `unhandled exception 0xc0000005 in amdxc64.dll` (a null read) about 1 ms into the build of one graphics pipeline, the one of pixel shader record `7381166e806847c9`. It is the same on drivers 32.0.21030.2001 (`+0x65d678`) and 32.0.21045.29003 (`+0x671f78`), with one pipeline worker too, and 3,000+ other graphics pipelines build fine before it. The cause is in the direct translator's pixel-shader ballot outside compares (`Lw::ballot_ps`: carry masks and the like). It collected its quad's 4 bits through `QuadReadAcrossX/Y/Diagonal` (`quadOp`). In this PS 10 of its 27 such ballots take a value that derives from `WaveReadLaneAt`. That is the driver bug the compare path already avoids (#134, `lower_valu`: "amdxc64 crashes on quadOp of values derived from WaveReadLaneAt"); this path was not covered. The ballot now reads its quad with 4 `QuadReadLaneAt`, as the compare path does. Related: #134, #2996. Rebased on main `9dfbe3ea`. #3501 had added `note_own_bit` to `ballot_ps` since the first head (`8363f77a`), and that head returned before it: the two merged without a conflict, but the new form then tested a lane's own bit through the mask's word, and helper lanes drew another value than in the `quadOp` form. saintwolf found it (16 pixels of the GPU test, on an RTX 4070 SUPER; I get the same 16 on RDNA2). Both forms now end in the same `ballot_ps_quad` + `note_own_bit`. How it was narrowed (on fa204595 with local per-PS debug switches, not in this PR): the pipeline builds without its PS (397 ms); it still dies without blending and in the plain wave64 form. With the ballots lane by lane, the same VS and description (byte-identical) and a PS that differs only in `quadOp` 81 → 0, `quadReadLaneAt` 172 → 280 build in 4.3 s. **How to test** - Build: `git fetch origin pull/3455/head:pr-3455`, `git checkout pr-3455`, `cargo build --release -p xcl`. Nothing to clear: an edit of `gpu/dxil` changes the translations' cache identity, and the driver builds again only the pixel shaders whose DXIL changed. - Does your card have the crash: run the title on `main` with `XCL_PREPARE=0 XCL_PSO_TRACE=1 XCL_ACTIVITY=1` (I used `XCL_DEVICE_TYPE=lockhart`) and go into the world. It is `unhandled exception 0xc0000005 in amdxc64.dll` right after `driver compile start …: graphics PSO, … record 7381166e806847c9`, and the process ends. Here that came 4 – 7 minutes in on a cold driver cache, most of them without frames (the wait of #2996). - With this PR the same run logs `driver compile finish` for that record and goes on. - Other adapters (NVIDIA, Intel): `cargo test -p xcl --lib ps_ballot_tests` (its GPU test draws both forms and compares the pixels) and a `scripts/smoke.ps1` pair. - Useful in a report: GPU and driver, the commit, crashed or not, and the last `driver compile start` line before a crash. **What is in it** - `crates/xcl/src/gpu/dxil/lanes.rs`: `ballot_ps` ors `quad_read_lane_at(cond, p) << p` for `p` in 0..4 (bit `p` is the quad's member `p`, which `own << (lane & 3)` relied on too), then records the own bit as before. Only tests can ask for the `quadOp` form (`cfg(test)`). No `TRANSLATOR_VERSION` bump: a `gpu/dxil` edit changes the direct translations' cache identity by itself. - Tests in `lanes.rs`: `direct_ps_non_vopc_carry_ballot_reads_its_quad_lane_by_lane` (was `..._uses_quad_op`) checks both forms' DXIL, also with the carry's operand coming through `v_readfirstlane`, and that `v_cndmask` takes the carry itself in both; `gpu_direct_ps_carry_ballot_draws_the_same_lane_by_lane_as_through_quadop` draws a carry mask, its DPP `ddx` (helper lanes on the triangles' edge) and the mask's bit of the lane to the right (from the mask's word) in both forms, and compares every pixel; away from that edge it also compares with the known values. - `crates/xcl/src/gpu/dxil/kernel.rs`: the test-only choice of the form is handed to the translator's thread, like `NO_SELECT_FOLD`. **Tested** - AMD Radeon RX 6700 XT (driver 32.0.21045.29003), Ryzen 5 5600X, 48 GB, Windows 11 build 26200.9974, rustc 1.100.0; tests in debug, title runs in release. - `cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4` (with `--nocapture`, on this tree just before it was committed as `4dd68427`): **2881 passed, 7 failed, 51 ignored** (44 test binaries). The 7 are 6 tests, and all 6 failed with the same values on unmodified main `9dfbe3ea` on this card (ran them there alone, for `4dd1796f`; not again for `4dd68427`): `gpu_compact_form_with_micro_blocks_and_literal_table_runs_as_the_plain_form` (what #3473 fixes), `gpu_direct_image_get_resinfo_d16` (see #3513), `f32_programs_on_the_gpu`, `gpu_f32_compares_with_nan`, `gpu_float_compares_random` (all three in `gpu/recomp`), and `two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs` (parent and child run). 4 `SKIPPED` (2 no heap windows, 1 no GPU_UPLOAD heaps, 1 cannot disable the driver cache). - `cargo test -p xcl --lib ps_ballot_tests` on the same tree: 9 passed, 0 failed. On `4dd1796f`: with `note_own_bit` taken out of the new form both changed tests fail (`the v_cndmask tests the mask's word`; 32 pixels differ). With `XCL_ADAPTER=warp`: 9 passed, the 3 GPU tests of the module `SKIPPED` (no wave32 / no wave64). - The crash, **on the first head only** (`8363f77a`, against its main `0fe06eb0`; not repeated on `9dfbe3ea`): the retail title, `XCL_DEVICE_TYPE=lockhart XCL_PREPARE=0 XCL_PSO_TRACE=1`, A pressed every 15 s from 30 s, 720 s, one run each: - main `0fe06eb0`: `driver compile start #3221: graphics PSO, 138304 B DXIL, record 7381166e806847c9` at 259.6 s, the null read in `amdxc64.dll+0x671f78` at 260.3 s, the process ends (exit 0xc0000005). - `8363f77a`: the pipeline of record `7381166e806847c9` (138944 B of DXIL) builds and the run ends by itself at 720 s (exit 0x0, 3075 frames), 0 device removals, 0 pipelines rejected. The driver took 2797 ms for it the first time (at 237.0 s, on `ebcc28f5`) and 1 ms from its cache in that run (at 167.6 s). - A synthetic PS with only this shape (a carry ballot of a `v_readfirstlane` value) does not crash this driver in the `quadOp` form, so there is no small reproduction: the tests check the form and the pixels, not the crash. **Regression run** 60 s (menus, the pipeline is not reached), `scripts/smoke.ps1`, `XCL_DEVICE_TYPE=lockhart XCL_PREPARE=0`, A pressed at 30 s and 45 s: main `9dfbe3ea` (this PR's merge base, which ran first), then this PR's head. ``` xcl-smoke v1 commit: 9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b gpu: AMD Radeon RX 6700 XT title: 2c508222 seconds: 60 exit: 0x0 frames shown: 1565 (PresentX 1565) presents per 2 s (last 3): 60 60 61 device removals: 0 crashes: 0 peak commit: 13578 MB ``` ``` xcl-smoke v1 commit: 4dd6842738511d3de90b272d1f87aa745d165799 gpu: AMD Radeon RX 6700 XT title: 2c508222 seconds: 60 exit: 0x0 frames shown: 1543 (PresentX 1543) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13683 MB ``` **Not tested** - By me: the crash on a main with #3501, and this head past it. Chrysana reports it in the comments for `4dd1796f`: main `d0832e61` dies on this record on an RX 9070 XT (RDNA4) and an RDNA2 iGPU, and with this PR it builds on both. - NVIDIA and Intel GPUs by me: the changed DXIL goes to every adapter. The op is the one the compare path already emits everywhere. (A contributor's run of the first head's `ps_ballot_tests` on an RTX 5070 Ti is in the comments, from before #3501.) - RDNA3: whether its driver dies on this pipeline at all. - Frame time of pixel shaders with many carry ballots (4 lane reads instead of 3 `quadOp`); the 60 s frame counts above are my only measure. In the comments, 60 s, one run per side: 101 % of main's frames on an RTX 5070 Ti, 93 % on an RTX 3090 (cold cache). - The title after this point: with the pipeline built it still showed no frames for the rest of the 720 s, waiting on its big compute programs (the wall of #2996). This PR does not touch that. **AI use** - Claude Code with Claude Fable 5.2 found the cause (took the pipeline apart on the hardware above), wrote the first head and its tests and ran its runs; Claude Opus 5.5 rebased it, found and fixed the missing own bit, extended the tests, ran the suite and the 60 s runs, removed the `XCL_PS_BALLOT_QUADOP` switch after review, and wrote this version of the description. All on my machine; the PR was submitted from my Claude Code session at my request, with me present. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Aniseto commented 2026-11-29 19:57:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-29T19:57:06Z.


Ran the pixel-shader carry-ballot tests at 8363f77a on an NVIDIA Blackwell desktop part.

System

  • GPU: NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, mesh shaders), driver 32.0.16.2140 (621.40)
  • CPU: Intel Core i5-12400F, 64 GB RAM
  • OS: Windows 11 Pro build 26200 x64
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5
  • Build: debug

Results

  • XCL_ADAPTER=NVIDIA cargo test -p xcl --lib ps_ballot_tests -- --test-threads=1: 8 passed, 0 failed, 0 ignored.

What this adds
All eight tests pass, including the GPU draw that compares the QuadReadLaneAt form against the quadOp form pixel by pixel, with carry masks and helper lanes on triangle edges. The author's run was on an AMD RX 6700 XT, where the crash occurs; this is an independent NVIDIA datapoint on driver 32.0.16.2140. The current head is 8363f77a, not the ebcc28f5 named in the description. The AMD driver crash itself was not reproduced here.

Not tested
A retail title, an AMD adapter, a paired smoke run, the full workspace suite here, native wave64 hosts, Wine, release profile, game data.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - ran the commands above on this machine and wrote this report; no game data was used.

<!-- greyfinch-sync:ivall/xcl:comment:7261687690 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7261687690). Originally posted by [Aniseto](https://github.com/Aniseto) on 2026-11-29T19:57:06Z. --- Ran the pixel-shader carry-ballot tests at `8363f77a` on an NVIDIA Blackwell desktop part. **System** - GPU: NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, mesh shaders), driver 32.0.16.2140 (621.40) - CPU: Intel Core i5-12400F, 64 GB RAM - OS: Windows 11 Pro build 26200 x64 - Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5 - Build: debug **Results** - `XCL_ADAPTER=NVIDIA cargo test -p xcl --lib ps_ballot_tests -- --test-threads=1`: 8 passed, 0 failed, 0 ignored. **What this adds** All eight tests pass, including the GPU draw that compares the `QuadReadLaneAt` form against the `quadOp` form pixel by pixel, with carry masks and helper lanes on triangle edges. The author's run was on an AMD RX 6700 XT, where the crash occurs; this is an independent NVIDIA datapoint on driver 32.0.16.2140. The current head is `8363f77a`, not the `ebcc28f5` named in the description. The AMD driver crash itself was not reproduced here. **Not tested** A retail title, an AMD adapter, a paired smoke run, the full workspace suite here, native wave64 hosts, Wine, release profile, game data. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash Free** - ran the commands above on this machine and wrote this report; no game data was used.
moombathepilot commented 2026-11-29 20:08:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by moombathepilot on 2026-11-29T20:08:32Z.


merge-check

base: 0fe06eb0f0

head: 8363f77a0b

merge: clean. Tested local trial merge 5d268fbb10cb842b9df2626185fe2ed61b642c78.

build: cargo build --workspace and cargo build --release -p xcl -> ok.

tests: cargo test -p xcl --lib ps_ballot_tests -- --test-threads=1 --nocapture -> 8 passed, 0 failed, 0 ignored, 0 skipped. The GPU draw matched both ballot forms pixel by pixel on RX 7800 XT, including triangle-edge helper lanes, in wave32 and wave64.

cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture -> 2,736 passed, 2 failed, 49 ignored. There were 12 explicit SKIPPED notices: 6 unsupported per-lane f16/f32 cases, 2 no heap windows, 3 missing D3D12 debug layer, and 1 driver cache could not be disabled. Both failures matched earlier targeted runs on this exact unmodified base and machine: fuzz_validate_and_gpu_1 (seed 722) and two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (two-pass state release assertion).

review: Read the full diff. The lane-by-lane lowering preserves the quad bit positions and reuses the existing quad ballot assembly. The disassembly test also covers the carry input derived from a lane read. git diff --cached --check passed. GitHub's Windows build check passed. The PR description check remains red, and the supplied PR-side smoke blocks still name ebcc28f.

performance: 60-second release smokes on the Series S profile, title 817b32af, with XCL_PREPARE=0, networking off, and no input. Both exited 0 with zero crashes and device removals.

Build Frames shown Peak commit
main 1,393 12,235 MB
trial merge 1,622 12,143 MB

A separate 300-second trial-merge run used the same profile, PSO tracing, and scheduled A presses starting at 30 seconds. It exited 0 with 2,491 presents, zero crashes or device removals, and 27,803 MB peak commit. The last three two-second windows had zero presents. The affected record 7381166e806847c9 did not appear in the trace, so the run leaves that pipeline and world entry unverified on RDNA3. Frame cost of the extra quad-lane read was not isolated.

verdict: not yet: the PR description check is failing on the current head, and the specific retail pipeline remains unverified on this AMD setup.

hardware / tool and model: Radeon RX 7800 XT (driver 32.0.32029.2010), Ryzen 7 5700X3D, Windows 11 Home build 26300, Rust 1.100.0 x86_64-pc-windows-msvc, DXC 1.9.2602.17. Codex (GPT-6, exact variant unavailable) verified refs, reviewed the diff, ran the build, tests and smokes, compared baseline logs, and drafted this report.

Reviewed by the posting user before submission.

<!-- greyfinch-sync:ivall/xcl:comment:7261840809 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7261840809). Originally posted by [moombathepilot](https://github.com/moombathepilot) on 2026-11-29T20:08:32Z. --- merge-check base: 0fe06eb0f05459007ebfffc67bb9983acb3a832d head: 8363f77a0b2d21d1120ebb30d867f489a120a1a2 merge: clean. Tested local trial merge `5d268fbb10cb842b9df2626185fe2ed61b642c78`. build: `cargo build --workspace` and `cargo build --release -p xcl` -> ok. tests: `cargo test -p xcl --lib ps_ballot_tests -- --test-threads=1 --nocapture` -> **8 passed, 0 failed, 0 ignored, 0 skipped**. The GPU draw matched both ballot forms pixel by pixel on RX 7800 XT, including triangle-edge helper lanes, in wave32 and wave64. `cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture` -> **2,736 passed, 2 failed, 49 ignored**. There were 12 explicit `SKIPPED` notices: 6 unsupported per-lane f16/f32 cases, 2 no heap windows, 3 missing D3D12 debug layer, and 1 driver cache could not be disabled. Both failures matched earlier targeted runs on this exact unmodified base and machine: `fuzz_validate_and_gpu_1` (seed 722) and `two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs` (two-pass state release assertion). review: Read the full diff. The lane-by-lane lowering preserves the quad bit positions and reuses the existing quad ballot assembly. The disassembly test also covers the carry input derived from a lane read. `git diff --cached --check` passed. GitHub's Windows build check passed. The PR description check remains red, and the supplied PR-side smoke blocks still name `ebcc28f`. performance: 60-second release smokes on the Series S profile, title `817b32af`, with `XCL_PREPARE=0`, networking off, and no input. Both exited 0 with zero crashes and device removals. | Build | Frames shown | Peak commit | | --- | ---: | ---: | | main | 1,393 | 12,235 MB | | trial merge | 1,622 | 12,143 MB | A separate 300-second trial-merge run used the same profile, PSO tracing, and scheduled A presses starting at 30 seconds. It exited 0 with 2,491 presents, zero crashes or device removals, and 27,803 MB peak commit. The last three two-second windows had zero presents. The affected record `7381166e806847c9` did not appear in the trace, so the run leaves that pipeline and world entry unverified on RDNA3. Frame cost of the extra quad-lane read was not isolated. verdict: not yet: the PR description check is failing on the current head, and the specific retail pipeline remains unverified on this AMD setup. hardware / tool and model: Radeon RX 7800 XT (driver 32.0.32029.2010), Ryzen 7 5700X3D, Windows 11 Home build 26300, Rust 1.100.0 x86_64-pc-windows-msvc, DXC 1.9.2602.17. Codex (GPT-6, exact variant unavailable) verified refs, reviewed the diff, ran the build, tests and smokes, compared baseline logs, and drafted this report. Reviewed by the posting user before submission.
ArtuArtaza commented 2026-11-29 20:15:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ArtuArtaza on 2026-11-29T20:15:24Z.


@moombathepilot thanks for the merge-check. On your two points:

  • The description now names the current head 8363f77a: the suite, both PR-side smoke blocks and the 720 s run were redone on it, and the three checks are green. (The first head ebcc28f5 failed CI because my new GPU test drew on the runner's software adapter; it now skips there, as its neighbours do.)
  • Reaching the pipeline: 300 s is short for it. On my RX 6700 XT the title asks for record 7381166e806847c9 between 168 s and 260 s once the driver's cache has the compute programs that come before it, and at 386 s the first time on a cold cache; most of that wait is without frames. A 720 s run with XCL_PSO_TRACE=1 and the A presses was enough here. On main look for driver compile start …: graphics PSO, … record 7381166e806847c9 followed by the amdxc64.dll exception; with the PR, a driver compile finish for the same record. If your driver builds it on main too, RDNA3 does not have this bug, which would be worth knowing as well.

@Aniseto thanks for the NVIDIA run.

Written with Claude Code (Claude Fable 5.2), from my runs on the hardware in the description.

<!-- greyfinch-sync:ivall/xcl:comment:7261932853 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7261932853). Originally posted by [ArtuArtaza](https://github.com/ArtuArtaza) on 2026-11-29T20:15:24Z. --- @moombathepilot thanks for the merge-check. On your two points: - The description now names the current head `8363f77a`: the suite, both PR-side smoke blocks and the 720 s run were redone on it, and the three checks are green. (The first head `ebcc28f5` failed CI because my new GPU test drew on the runner's software adapter; it now skips there, as its neighbours do.) - Reaching the pipeline: 300 s is short for it. On my RX 6700 XT the title asks for record `7381166e806847c9` between 168 s and 260 s once the driver's cache has the compute programs that come before it, and at 386 s the first time on a cold cache; most of that wait is without frames. A 720 s run with `XCL_PSO_TRACE=1` and the A presses was enough here. On main look for `driver compile start …: graphics PSO, … record 7381166e806847c9` followed by the `amdxc64.dll` exception; with the PR, a `driver compile finish` for the same record. If your driver builds it on main too, RDNA3 does not have this bug, which would be worth knowing as well. @Aniseto thanks for the NVIDIA run. Written with Claude Code (Claude Fable 5.2), from my runs on the hardware in the description.
moombathepilot commented 2026-11-29 20:19:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by moombathepilot on 2026-11-29T20:19:33Z.


Thanks, that explains it: my 300 s run was likely too short. I still need to run 720 s on main and the trial merge to check record 7381166e806847c9 on RDNA3. ETA 21:45UTC

<!-- greyfinch-sync:ivall/xcl:comment:7261988496 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7261988496). Originally posted by [moombathepilot](https://github.com/moombathepilot) on 2026-11-29T20:19:33Z. --- Thanks, that explains it: my 300 s run was likely too short. I still need to run 720 s on main and the trial merge to check record 7381166e806847c9 on RDNA3. ETA 21:45UTC
JR-Wiederkehr commented 2026-11-29 20:40:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JR-Wiederkehr on 2026-11-29T20:40:37Z.


Confirmed test run on Radeon 7700XT, gets past 7381166e806847c9 shader without crashing at [143.158].

<!-- greyfinch-sync:ivall/xcl:comment:7262269754 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7262269754). Originally posted by [JR-Wiederkehr](https://github.com/JR-Wiederkehr) on 2026-11-29T20:40:37Z. --- Confirmed test run on Radeon 7700XT, gets past 7381166e806847c9 shader without crashing at [143.158].
moombathepilot commented 2026-11-29 22:19:52 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by moombathepilot on 2026-11-29T22:19:52Z.


merge-check

base: 1bd9cee1e5

head: 8363f77a0b

merge: clean, trial merge bfa9aef78b7dad5c356c992f3876ba91ef2c4f2e. Main advanced again during testing. The description now names this head in both PR-side smoke blocks, and the latest three GitHub checks are green.

build: cargo build --workspace passed on the merge. Both release builds passed.

tests: cargo test -p xcl --lib ps_ballot_tests -- --test-threads=1 --nocapture gave 8 passed, 0 failed, 0 ignored, 0 skipped. The full merge suite (cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture) gave 2,743 passed, 6 failed, 49 ignored, and 12 skip notices (6 unsupported per-lane f16/f32 cases, 2 no heap windows, 3 missing debug layer, 1 driver-cache control unavailable). Fuzz seed 722 and the two-pass cache test matched failures on the exact base. Four texture tests failed in the merge suite (one subtraction overflow, three poisoned locks). The texture group rerun gave 65 passed, 0 failed, 1 ignored on both builds. The full base lib run aborted with 0xc0000409, so the four failures could not be classified in a like-for-like full-suite comparison.

review: The live head is unchanged from the previous merge-check, which covers the diff review. Both 720 s traces logged the shader record: base [52.589] [SHADER] ps 7381166e806847c9, merge [53.057] [SHADER] ps 7381166e806847c9. Neither trace logged a graphics PSO compile start or finish for it or an AMD driver exception. Pipeline behavior and world entry remain unverified here.

Each trace had unique numbered starts and finishes, with no finish lacking a start. One start in each trace had no matching finish. These were also the last driver compile lines:

Base  [  717.984][25380][INFO ] D3D12.X: driver compile start #9249: compute PSO, 1081184 B DXIL, record b8004a436fac775d, driver blob absent
Merge [  716.751][16204][INFO ] D3D12.X: driver compile start #12507: compute PSO, 845112 B DXIL, record ccc5774a7210c001, driver blob absent

After the last nonzero present window, base logged 76 starts and 76 finishes, and merge logged 7,554 of each. These are independent event counts in that interval, so a finish can belong to a start before the cutoff. Both traces continued logging completed compute, compute-pass, mesh and graphics PSOs. The unmatched starts do not establish a hang or its cause.

performance: Series S profile, title 817b32af, XCL_PREPARE=0 XCL_PSO_TRACE=1 XCL_NETWORK=0, A every 15 s starting at 30 s. Sequential base then merge, with caches retained and recorded before each run. Both exited 0x0 after the 720 s timer, with zero crashes and device removals. Base: 2,545 presents, last nonzero sample ending at 128.400 s, 29,229 MB peak commit. Merge: 2,575 presents, last nonzero sample ending at 130.474 s, 30,949 MB peak commit. Neither resumed presenting after that gap. These are two-second sample timestamps. Presents stopped at about the same point on both builds, so these runs do not show the stall as specific to this PR. The first baseline attempt missed the timer because of environment inheritance in the smoke harness. It was excluded and the pair was restarted with the timer set before launch.

On my RX 7800 XT, neither build logged a compile start for record 7381166e806847c9 within 720 s. Does your run use any settings, cache preparation or input timing that differ from mine? The existing driver and XCL caches were retained. Before base and merge respectively, AMD DxCache had 263 files in both, AMD DxcCache had 207 files in both (13.56 and 13.76 GB), Windows D3DSCache had 770 files in both, and XCL DXIL had 130,666 and 130,671 files. XCL logged its driver-blob disk cache as off on AMD. The two unmatched compiles above were for other compute records.

verdict: not yet: the target graphics pipeline was not observed compiling on either build, and the four suite-only texture failures remain unresolved.

hardware / tool and model: Radeon RX 7800 XT (32.0.32029.2010), Ryzen 7 5700X3D, Windows 11 Home build 26300, Rust 1.100.0 MSVC. Codex (GPT-6, exact variant unavailable) verified refs and checks, ran the builds and tests, compared the traces, and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7263588255 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7263588255). Originally posted by [moombathepilot](https://github.com/moombathepilot) on 2026-11-29T22:19:52Z. --- merge-check base: 1bd9cee1e5b0f828a462a22334f9f503cec76536 head: 8363f77a0b2d21d1120ebb30d867f489a120a1a2 merge: clean, trial merge bfa9aef78b7dad5c356c992f3876ba91ef2c4f2e. Main advanced again during testing. The description now names this head in both PR-side smoke blocks, and the latest three GitHub checks are green. build: `cargo build --workspace` passed on the merge. Both release builds passed. tests: `cargo test -p xcl --lib ps_ballot_tests -- --test-threads=1 --nocapture` gave 8 passed, 0 failed, 0 ignored, 0 skipped. The full merge suite (`cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture`) gave 2,743 passed, 6 failed, 49 ignored, and 12 skip notices (6 unsupported per-lane f16/f32 cases, 2 no heap windows, 3 missing debug layer, 1 driver-cache control unavailable). Fuzz seed 722 and the two-pass cache test matched failures on the exact base. Four texture tests failed in the merge suite (one subtraction overflow, three poisoned locks). The texture group rerun gave 65 passed, 0 failed, 1 ignored on both builds. The full base lib run aborted with `0xc0000409`, so the four failures could not be classified in a like-for-like full-suite comparison. review: The live head is unchanged from the previous merge-check, which covers the diff review. Both 720 s traces logged the shader record: base `[52.589] [SHADER] ps 7381166e806847c9`, merge `[53.057] [SHADER] ps 7381166e806847c9`. Neither trace logged a graphics PSO compile start or finish for it or an AMD driver exception. Pipeline behavior and world entry remain unverified here. Each trace had unique numbered starts and finishes, with no finish lacking a start. One start in each trace had no matching finish. These were also the last driver compile lines: ```text Base [ 717.984][25380][INFO ] D3D12.X: driver compile start #9249: compute PSO, 1081184 B DXIL, record b8004a436fac775d, driver blob absent Merge [ 716.751][16204][INFO ] D3D12.X: driver compile start #12507: compute PSO, 845112 B DXIL, record ccc5774a7210c001, driver blob absent ``` After the last nonzero present window, base logged 76 starts and 76 finishes, and merge logged 7,554 of each. These are independent event counts in that interval, so a finish can belong to a start before the cutoff. Both traces continued logging completed compute, compute-pass, mesh and graphics PSOs. The unmatched starts do not establish a hang or its cause. performance: Series S profile, title `817b32af`, `XCL_PREPARE=0 XCL_PSO_TRACE=1 XCL_NETWORK=0`, A every 15 s starting at 30 s. Sequential base then merge, with caches retained and recorded before each run. Both exited `0x0` after the 720 s timer, with zero crashes and device removals. Base: 2,545 presents, last nonzero sample ending at 128.400 s, 29,229 MB peak commit. Merge: 2,575 presents, last nonzero sample ending at 130.474 s, 30,949 MB peak commit. Neither resumed presenting after that gap. These are two-second sample timestamps. Presents stopped at about the same point on both builds, so these runs do not show the stall as specific to this PR. The first baseline attempt missed the timer because of environment inheritance in the smoke harness. It was excluded and the pair was restarted with the timer set before launch. On my RX 7800 XT, neither build logged a compile start for record 7381166e806847c9 within 720 s. Does your run use any settings, cache preparation or input timing that differ from mine? The existing driver and XCL caches were retained. Before base and merge respectively, AMD DxCache had 263 files in both, AMD DxcCache had 207 files in both (13.56 and 13.76 GB), Windows D3DSCache had 770 files in both, and XCL DXIL had 130,666 and 130,671 files. XCL logged its driver-blob disk cache as off on AMD. The two unmatched compiles above were for other compute records. verdict: not yet: the target graphics pipeline was not observed compiling on either build, and the four suite-only texture failures remain unresolved. hardware / tool and model: Radeon RX 7800 XT (32.0.32029.2010), Ryzen 7 5700X3D, Windows 11 Home build 26300, Rust 1.100.0 MSVC. Codex (GPT-6, exact variant unavailable) verified refs and checks, ran the builds and tests, compared the traces, and drafted this report.
ArtuArtaza commented 2026-11-29 22:39:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ArtuArtaza on 2026-11-29T22:39:57Z.


@moombathepilot thanks for the second run. My settings are the same as yours (Series S, XCL_PREPARE=0, XCL_PSO_TRACE=1, network off, A every 15 s from 30 s, no cache preparation step). What differs is how warm the driver's cache was:

  • The 720 s pair in the description was not the first run of those trees. Before the main 0fe06eb0 run that crashed at 260 s, this machine had done a 60 s, a 240 s and a 330 s run of that main and a 60 s and a 240 s run of the PR. Neither the 240 s nor the 330 s main run reached the pipeline (the 330 s one sat in big compute compiles until its end). Each run left more of those compute programs in AMD's cache, and the next one got further.
  • The first time on a cold driver cache (on fa204595, right after a driver update) the compile start for record 7381166e806847c9 came at 386 s, after about 200 s without frames.
  • In all my runs the request for that pipeline comes inside that no-frames stretch, after a batch of large compute programs. So on your card the question is whether the title gets through that batch within the timer. What moved it here was repeating the same run with the caches kept, not a longer timer.

@JR-Wiederkehr thanks. Was that run on this PR or on main? If it was the PR: a run of unmodified main that reaches the same record would tell whether RDNA3 has this crash at all. A driver compile finish for it on main would rule it out for that driver; the amdxc64.dll exception would confirm it. The same goes for anyone on RDNA4.

On the four texture failures: I cannot tie them to this change, which only touches pixel-shader translation. On this machine texture upload tests (title_textures gpu_*) fail now and then at --test-threads=4 on unmodified main too (fa204595, about one run in six) and pass alone. I have not seen an overflow or poisoned locks here: both suite runs on this PR's heads had only the two-pass cache test failing.

Written with Claude Code (Claude Fable 5.2), from my runs on the hardware in the description.

<!-- greyfinch-sync:ivall/xcl:comment:7263853204 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7263853204). Originally posted by [ArtuArtaza](https://github.com/ArtuArtaza) on 2026-11-29T22:39:57Z. --- @moombathepilot thanks for the second run. My settings are the same as yours (Series S, `XCL_PREPARE=0`, `XCL_PSO_TRACE=1`, network off, A every 15 s from 30 s, no cache preparation step). What differs is how warm the driver's cache was: - The 720 s pair in the description was not the first run of those trees. Before the main `0fe06eb0` run that crashed at 260 s, this machine had done a 60 s, a 240 s and a 330 s run of that main and a 60 s and a 240 s run of the PR. Neither the 240 s nor the 330 s main run reached the pipeline (the 330 s one sat in big compute compiles until its end). Each run left more of those compute programs in AMD's cache, and the next one got further. - The first time on a cold driver cache (on fa204595, right after a driver update) the compile start for record `7381166e806847c9` came at 386 s, after about 200 s without frames. - In all my runs the request for that pipeline comes inside that no-frames stretch, after a batch of large compute programs. So on your card the question is whether the title gets through that batch within the timer. What moved it here was repeating the same run with the caches kept, not a longer timer. @JR-Wiederkehr thanks. Was that run on this PR or on main? If it was the PR: a run of unmodified main that reaches the same record would tell whether RDNA3 has this crash at all. A `driver compile finish` for it on main would rule it out for that driver; the `amdxc64.dll` exception would confirm it. The same goes for anyone on RDNA4. On the four texture failures: I cannot tie them to this change, which only touches pixel-shader translation. On this machine texture upload tests (`title_textures` `gpu_*`) fail now and then at `--test-threads=4` on unmodified main too (fa204595, about one run in six) and pass alone. I have not seen an overflow or poisoned locks here: both suite runs on this PR's heads had only the two-pass cache test failing. Written with Claude Code (Claude Fable 5.2), from my runs on the hardware in the description.
ArtuArtaza commented 2026-11-30 03:22:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ArtuArtaza on 2026-11-30T03:22:00Z.


Status on head 8363f77a: not a draft, no conflict with main, all three checks green, no review asking for changes. What it still lacks is in other people's hands, so three requests.

@moombathepilot thanks for both merge checks. Could you look at the verdict again? On the two reasons in the second one:

  • Target pipeline not seen compiling on your card. Per the process notes on #3041 (throny, 2026-11-27), a retail-title run is not part of a merge check: the check is the trial merge, the build, the whole suite and the review of the merge result. Your RX 7800 XT may also simply not have this driver bug; so far the crash is only shown on RDNA2 (RX 6700 XT, drivers 32.0.21030.2001 and 32.0.21045.29003). Your traces would fit better as a test report with "crash not reproduced on RDNA3".
  • Four texture failures. Your rerun of the texture group gave 65 passed, 0 failed on both builds. Here the title_textures gpu_* tests fail about one run in six at --test-threads=4 on unmodified main and pass alone, and this PR only touches pixel-shader translation (gpu/dxil/lanes.rs). If a like-for-like base run is what you need, the lib binary alone (cargo test -p xcl --lib --no-fail-fast -- --test-threads=4) on the base is enough to classify them.

If something in the diff itself worries you, say so and I will fix it.

@JR-Wiederkehr thanks for the RX 7700 XT run. To count as a test report it needs the commit you ran (this PR's 8363f77a, or main), the driver version, and the suite counts if you ran any (cargo test -p xcl --lib ps_ballot_tests is 8 tests). Whether it was the PR or main matters most: a driver compile finish for record 7381166e806847c9 on unmodified main would show RDNA3 does not have the crash.

Anyone with an RX 6000 card (RDNA2): this is the hardware that can confirm the fix. On main, XCL_PREPARE=0 XCL_PSO_TRACE=1 XCL_ACTIVITY=1 into the world ends with unhandled exception 0xc0000005 in amdxc64.dll right after driver compile start …: graphics PSO, … record 7381166e806847c9; with this PR the same record logs driver compile finish. It can take several runs with the driver cache kept before the title asks for that pipeline. A merge check from such a machine is welcome as the hardware the first check did not have.

I cannot queue my own PR on #3041. If someone who has read it thinks it belongs there, the request would be importance: crash.

Written with Claude Code (Claude Fable 5.2), from my runs on the hardware in the description.

<!-- greyfinch-sync:ivall/xcl:comment:7267827950 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7267827950). Originally posted by [ArtuArtaza](https://github.com/ArtuArtaza) on 2026-11-30T03:22:00Z. --- Status on head `8363f77a`: not a draft, no conflict with `main`, all three checks green, no review asking for changes. What it still lacks is in other people's hands, so three requests. @moombathepilot thanks for both merge checks. Could you look at the verdict again? On the two reasons in the second one: - **Target pipeline not seen compiling on your card.** Per the process notes on #3041 (throny, 2026-11-27), a retail-title run is not part of a merge check: the check is the trial merge, the build, the whole suite and the review of the merge result. Your RX 7800 XT may also simply not have this driver bug; so far the crash is only shown on RDNA2 (RX 6700 XT, drivers 32.0.21030.2001 and 32.0.21045.29003). Your traces would fit better as a test report with "crash not reproduced on RDNA3". - **Four texture failures.** Your rerun of the texture group gave 65 passed, 0 failed on both builds. Here the `title_textures` `gpu_*` tests fail about one run in six at `--test-threads=4` on unmodified `main` and pass alone, and this PR only touches pixel-shader translation (`gpu/dxil/lanes.rs`). If a like-for-like base run is what you need, the lib binary alone (`cargo test -p xcl --lib --no-fail-fast -- --test-threads=4`) on the base is enough to classify them. If something in the diff itself worries you, say so and I will fix it. @JR-Wiederkehr thanks for the RX 7700 XT run. To count as a test report it needs the commit you ran (this PR's `8363f77a`, or `main`), the driver version, and the suite counts if you ran any (`cargo test -p xcl --lib ps_ballot_tests` is 8 tests). Whether it was the PR or `main` matters most: a `driver compile finish` for record `7381166e806847c9` on unmodified `main` would show RDNA3 does not have the crash. **Anyone with an RX 6000 card (RDNA2):** this is the hardware that can confirm the fix. On `main`, `XCL_PREPARE=0 XCL_PSO_TRACE=1 XCL_ACTIVITY=1` into the world ends with `unhandled exception 0xc0000005 in amdxc64.dll` right after `driver compile start …: graphics PSO, … record 7381166e806847c9`; with this PR the same record logs `driver compile finish`. It can take several runs with the driver cache kept before the title asks for that pipeline. A merge check from such a machine is welcome as the hardware the first check did not have. I cannot queue my own PR on #3041. If someone who has read it thinks it belongs there, the request would be `importance: crash`. Written with Claude Code (Claude Fable 5.2), from my runs on the hardware in the description.
saintwolf commented 2026-11-30 14:06:05 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by saintwolf on 2026-11-30T14:06:05Z.


merge-check claim
head: 8363f77a0b

<!-- greyfinch-sync:ivall/xcl:comment:7280835118 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7280835118). Originally posted by [saintwolf](https://github.com/saintwolf) on 2026-11-30T14:06:05Z. --- merge-check claim head: 8363f77a0b2d21d1120ebb30d867f489a120a1a2
saintwolf commented 2026-11-30 14:27:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by saintwolf on 2026-11-30T14:27:40Z.


merge-check
base: github.com/xcl-dev/xcl@9dfbe3ea66
head: github.com/xcl-dev/xcl@8363f77a0b
merge: clean (trial merge f2b7ad1173bced603287998e9cdfa3f2d57cc847; git diff --check clean; +136/-15 in gpu/dxil/lanes.rs and kernel.rs)
build: cargo build --workspace -> ok (39 pre-existing warnings, none from the PR's files)
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2885 passed, 2 failed, 51 ignored (lib 2737/2/31, integration 148/0/20); SKIPPED: 27 (22 "no wave64" — wave32-only GPU, 2 "no heap windows", 1 "cannot disable the driver cache (Developer Mode)", 2 "no xgameruntime.dll"); failing: (1) gpu::dxil::lanes::ps_ballot_tests::gpu_direct_ps_carry_ballot_draws_the_same_lane_by_lane_as_through_quadop — new in this PR, absent on base; fails here, deterministically (also run alone): wave64=false leg, 16 pixels differ between the two forms, all in output channel 1 (DPP ddx of the masked carry value minus the value): e.g. (16,17) [16.5,-16.5,16.5,17.5] vs [16.5,1.0,16.5,17.5] — the lane-by-lane form's adjacent-lane DPP read returns 0.0 (the no-carry value) where the quadOp form returns the neighbor's masked value; the test's earlier assert (the carry mask is held, channel 0) passes in the new form; the differing readers sit on/below the main diagonal (x = y and x = y-1, odd y 17..31). (2) gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16 — pre-existing here: fails identically on base github.com/xcl-dev/xcl@9dfbe3ea66 (same "2D D16 resinfo clobbered v2/v3" assertion), untouched by this PR.
review: (1) the PR's new GPU parity test fails on my hardware (NVIDIA Ada, wave32-only); per the thread it passes on RDNA2, RDNA3 and an RTX 5070 Ti (Blackwell — also wave32), so this is Ada-specific, not a wave32-vs-wave64 effect; (2) the new default path (ballot_ps) returns before the self.note_own_bit(lo, hi, cond) that the quadOp path still calls: a carry ballot's own bit is no longer recorded, so a later masked op extracting this lane's bit of that mask falls back to a shift+and of the mask word (ISA/ALU cost, no correctness change); (3) the kernel.rs change is cfg(test)-only plumbing forwarding QUAD_OP_IN_TEST to the translator thread (mirrors the existing NO_SELECT_FOLD pattern); (4) the opt-out env XCL_PS_BALLOT_QUADOP=1 is OnceLock-cached and off by default; on-disk translations keep the form they were made with (documented in the diff); (5) open https://github.com/xcl-dev/xcl/pull/3429 adds tests to the same ps_ballot_tests module in the context this PR rewrites — expect a small rebase conflict for whichever lands second; (6) duplicate scan: no open or merged PR makes this change, no https://github.com/xcl-dev/xcl/issues/1607 group covers it, https://github.com/xcl-dev/xcl/pull/3405/https://github.com/xcl-dev/xcl/pull/3429 are adjacent compare-path work.
performance: the default form replaces andc+shl+3 quadOp with 4 quadReadLaneAt+4 shlc (+3 ops per PS carry ballot, wave-uniform code) and drops the note_own_bit shortcut from review (2); no memory change; not measured — Tier 1, no retail run.
verdict: not yet: the PR's own new GPU parity test fails on NVIDIA Ada (RTX 4070 SUPER, driver 32.0.16.2140, wave32) — 16 px differ between the lane-by-lane and quadOp forms, in the DPP-derived channel at the mask boundary; deterministic; passes on RDNA2/RDNA3/Blackwell per the thread. Needs the author's call: investigate Ada helper-lane quad-read visibility, or relax the parity assert with a documented exception.
hardware / tool and model: RTX 4070 SUPER (driver 32.0.16.2140), Ryzen 7 7800X3D, Windows 11 build 26300, Rust 1.100.0, DXC 1.8.2502.11 (23992152) / OpenCode, Qwen 3.8 27B

<!-- greyfinch-sync:ivall/xcl:comment:7281408545 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7281408545). Originally posted by [saintwolf](https://github.com/saintwolf) on 2026-11-30T14:27:40Z. --- merge-check base: https://github.com/xcl-dev/xcl/commit/9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b head: https://github.com/xcl-dev/xcl/commit/8363f77a0b2d21d1120ebb30d867f489a120a1a2 merge: clean (trial merge f2b7ad1173bced603287998e9cdfa3f2d57cc847; git diff --check clean; +136/-15 in gpu/dxil/lanes.rs and kernel.rs) build: cargo build --workspace -> ok (39 pre-existing warnings, none from the PR's files) tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2885 passed, 2 failed, 51 ignored (lib 2737/2/31, integration 148/0/20); SKIPPED: 27 (22 "no wave64" — wave32-only GPU, 2 "no heap windows", 1 "cannot disable the driver cache (Developer Mode)", 2 "no xgameruntime.dll"); failing: (1) gpu::dxil::lanes::ps_ballot_tests::gpu_direct_ps_carry_ballot_draws_the_same_lane_by_lane_as_through_quadop — new in this PR, absent on base; fails here, deterministically (also run alone): wave64=false leg, 16 pixels differ between the two forms, all in output channel 1 (DPP ddx of the masked carry value minus the value): e.g. (16,17) [16.5,-16.5,16.5,17.5] vs [16.5,1.0,16.5,17.5] — the lane-by-lane form's adjacent-lane DPP read returns 0.0 (the no-carry value) where the quadOp form returns the neighbor's masked value; the test's earlier assert (the carry mask is held, channel 0) passes in the new form; the differing readers sit on/below the main diagonal (x = y and x = y-1, odd y 17..31). (2) gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16 — pre-existing here: fails identically on base https://github.com/xcl-dev/xcl/commit/9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b (same "2D D16 resinfo clobbered v2/v3" assertion), untouched by this PR. review: (1) the PR's new GPU parity test fails on my hardware (NVIDIA Ada, wave32-only); per the thread it passes on RDNA2, RDNA3 and an RTX 5070 Ti (Blackwell — also wave32), so this is Ada-specific, not a wave32-vs-wave64 effect; (2) the new default path (ballot_ps) returns before the self.note_own_bit(lo, hi, cond) that the quadOp path still calls: a carry ballot's own bit is no longer recorded, so a later masked op extracting this lane's bit of that mask falls back to a shift+and of the mask word (ISA/ALU cost, no correctness change); (3) the kernel.rs change is cfg(test)-only plumbing forwarding QUAD_OP_IN_TEST to the translator thread (mirrors the existing NO_SELECT_FOLD pattern); (4) the opt-out env XCL_PS_BALLOT_QUADOP=1 is OnceLock-cached and off by default; on-disk translations keep the form they were made with (documented in the diff); (5) open https://github.com/xcl-dev/xcl/pull/3429 adds tests to the same ps_ballot_tests module in the context this PR rewrites — expect a small rebase conflict for whichever lands second; (6) duplicate scan: no open or merged PR makes this change, no https://github.com/xcl-dev/xcl/issues/1607 group covers it, https://github.com/xcl-dev/xcl/pull/3405/https://github.com/xcl-dev/xcl/pull/3429 are adjacent compare-path work. performance: the default form replaces andc+shl+3 quadOp with 4 quadReadLaneAt+4 shlc (+3 ops per PS carry ballot, wave-uniform code) and drops the note_own_bit shortcut from review (2); no memory change; not measured — Tier 1, no retail run. verdict: not yet: the PR's own new GPU parity test fails on NVIDIA Ada (RTX 4070 SUPER, driver 32.0.16.2140, wave32) — 16 px differ between the lane-by-lane and quadOp forms, in the DPP-derived channel at the mask boundary; deterministic; passes on RDNA2/RDNA3/Blackwell per the thread. Needs the author's call: investigate Ada helper-lane quad-read visibility, or relax the parity assert with a documented exception. hardware / tool and model: RTX 4070 SUPER (driver 32.0.16.2140), Ryzen 7 7800X3D, Windows 11 build 26300, Rust 1.100.0, DXC 1.8.2502.11 (23992152) / OpenCode, Qwen 3.8 27B
ArtuArtaza commented 2026-11-30 16:22:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ArtuArtaza on 2026-11-30T16:22:46Z.


@saintwolf thanks, the failure is real, and it is not Ada-specific: the old head merged into 9dfbe3ea gives the same 16 pixels on my RX 6700 XT. The cause is your point (2). #3501 added note_own_bit at the end of ballot_ps after that head was written, and its early return skipped it. So the new form tested each lane's own bit through the mask's word, and helper lanes drew another value than in the quadOp form. The earlier runs that passed were from before #3501.

4dd1796f is rebased on 9dfbe3ea, and both forms now end in the same ballot_ps_quad + note_own_bit. The two tests changed too: the DXIL test checks that v_cndmask takes the carry itself in both forms, and the GPU test also reads the mask's word (the bit of the lane to the right), because with the own bit noted the old program no longer did. Both fail without the line and pass with it. The suite and the 60 s pair are in the description; the 6 tests that fail fail with the same values on unmodified 9dfbe3ea here.

One thing next to it, in main and not in this PR: a pixel shader that reads a mask's word whole (a live WaveActiveBitOr), ends in discard(!exec) and reads a neighbour through DPP gets 0 from helper lanes on triangle edges here, in both forms, and also as hand-written HLSL. I think it is because a lane's EXEC bit there comes from WaveActiveBallot, whose result in helper lanes is undefined. The GPU test therefore only asks the two forms to agree on those edges.

What I could not run is NVIDIA: cargo test -p xcl --lib ps_ballot_tests on your card would tell whether the mask's word holds there too.

(Change and reply written by Claude Code with Claude Opus 5.5, sent from my account.)

<!-- greyfinch-sync:ivall/xcl:comment:7284569462 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7284569462). Originally posted by [ArtuArtaza](https://github.com/ArtuArtaza) on 2026-11-30T16:22:46Z. --- @saintwolf thanks, the failure is real, and it is not Ada-specific: the old head merged into 9dfbe3ea gives the same 16 pixels on my RX 6700 XT. The cause is your point (2). #3501 added `note_own_bit` at the end of `ballot_ps` after that head was written, and its early return skipped it. So the new form tested each lane's own bit through the mask's word, and helper lanes drew another value than in the `quadOp` form. The earlier runs that passed were from before #3501. 4dd1796f is rebased on 9dfbe3ea, and both forms now end in the same `ballot_ps_quad` + `note_own_bit`. The two tests changed too: the DXIL test checks that `v_cndmask` takes the carry itself in both forms, and the GPU test also reads the mask's word (the bit of the lane to the right), because with the own bit noted the old program no longer did. Both fail without the line and pass with it. The suite and the 60 s pair are in the description; the 6 tests that fail fail with the same values on unmodified 9dfbe3ea here. One thing next to it, in main and not in this PR: a pixel shader that reads a mask's word whole (a live `WaveActiveBitOr`), ends in `discard(!exec)` and reads a neighbour through DPP gets 0 from helper lanes on triangle edges here, in both forms, and also as hand-written HLSL. I think it is because a lane's EXEC bit there comes from `WaveActiveBallot`, whose result in helper lanes is undefined. The GPU test therefore only asks the two forms to agree on those edges. What I could not run is NVIDIA: `cargo test -p xcl --lib ps_ballot_tests` on your card would tell whether the mask's word holds there too. (Change and reply written by Claude Code with Claude Opus 5.5, sent from my account.)
Aniseto commented 2026-11-30 16:31:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-30T16:31:44Z.


New head 4dd1796f: the pixel-shader carry-ballot tests run and pass here. This is a new response in the same thread; my earlier report at 8363f77a (https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7261687690) covered the first head and is not edited.

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB, mesh shaders) driver 32.0.16.2140 (621.40), Intel Core i5-12400F, 64 GB RAM, rustc 1.98.1 (48a229cea 2026-09-01), MSVC 14.44.35207, DXC 1.9.2609.5, debug build, XCL_ADAPTER=NVIDIA, detached worktree at the exact PR head, no local patches.

XCL_ADAPTER=NVIDIA cargo test -p xcl --lib ps_ballot_tests -- --test-threads=1
9 passed; 0 failed; 0 ignored; 2761 filtered out      (exit 0)

XCL_ADAPTER=NVIDIA cargo test -p xcl --lib direct_ps_non_vopc_carry_ballot_reads_its_quad_lane_by_lane -- --test-threads=1
1 passed; 0 failed; 0 ignored; 2769 filtered out      (exit 0)

XCL_ADAPTER=NVIDIA cargo test -p xcl --lib gpu_direct_ps_carry_ballot_draws_the_same_lane_by_lane_as_through_quadop -- --test-threads=1
1 passed; 0 failed; 0 ignored; 2769 filtered out      (exit 0)

The three named tests pass on this Blackwell desktop part with 16 GB of VRAM and driver 621.40, on a head rebased onto 9dfbe3ea where #3501 added note_own_bit. My earlier run was on the first head, 8363f77a, so this is a second NVIDIA host and a second head for the same tests.

Not tested: the full workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, the title and paired smoke runs, game data.

AI-assisted (OpenCode), model: MiMo-V2.6-Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.

<!-- greyfinch-sync:ivall/xcl:comment:7284815017 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7284815017). Originally posted by [Aniseto](https://github.com/Aniseto) on 2026-11-30T16:31:44Z. --- New head `4dd1796f`: the pixel-shader carry-ballot tests run and pass here. This is a new response in the same thread; my earlier report at `8363f77a` (https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7261687690) covered the first head and is not edited. Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB, mesh shaders) driver 32.0.16.2140 (621.40), Intel Core i5-12400F, 64 GB RAM, rustc 1.98.1 (48a229cea 2026-09-01), MSVC 14.44.35207, DXC 1.9.2609.5, debug build, `XCL_ADAPTER=NVIDIA`, detached worktree at the exact PR head, no local patches. ``` XCL_ADAPTER=NVIDIA cargo test -p xcl --lib ps_ballot_tests -- --test-threads=1 9 passed; 0 failed; 0 ignored; 2761 filtered out (exit 0) XCL_ADAPTER=NVIDIA cargo test -p xcl --lib direct_ps_non_vopc_carry_ballot_reads_its_quad_lane_by_lane -- --test-threads=1 1 passed; 0 failed; 0 ignored; 2769 filtered out (exit 0) XCL_ADAPTER=NVIDIA cargo test -p xcl --lib gpu_direct_ps_carry_ballot_draws_the_same_lane_by_lane_as_through_quadop -- --test-threads=1 1 passed; 0 failed; 0 ignored; 2769 filtered out (exit 0) ``` The three named tests pass on this Blackwell desktop part with 16 GB of VRAM and driver 621.40, on a head rebased onto `9dfbe3ea` where `#3501` added `note_own_bit`. My earlier run was on the first head, `8363f77a`, so this is a second NVIDIA host and a second head for the same tests. Not tested: the full workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, the title and paired smoke runs, game data. AI-assisted (OpenCode), model: **MiMo-V2.6-Flash Free** - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
Chrysana commented 2026-12-01 04:08:32 +00:00 (Migrated from github.com)

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


merge-check
base: d0832e614f
head: 4dd1796fb2
merge: clean (trial merge 1df769bb3c9607491ae2e018ed46881b1dcfbe3a; git diff --check clean; +172/−22 in gpu/dxil/lanes.rs and kernel.rs)
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2883 passed, 9 failed, 51 ignored. SKIPPED: 6 (2× no heap windows, 1× driver cache needs Windows Developer Mode, 3× no D3D12 debug layer), the same as base. Failing: the same 8 tests as on base d0832e61 on this card (2882 passed, 9 failed, 51 ignored there): fuzz_validate_and_gpu_1, fuzz_validate_and_gpu_3, gpu_smem_flat_descriptor_windows_and_limits, f32_programs_on_the_gpu, gpu_f32_compares_with_nan, gpu_float_compares_random, gpu_ps_readfirstlane_loop_on_a_primitive_edge_ends, and the e2e two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (counted twice). All 9 ps_ballot_tests pass here, including gpu_direct_ps_carry_ballot_draws_the_same_lane_by_lane_as_through_quadop (wave32 and wave64).
review: none blocking; I read the whole diff. ballot_ps now collects the quad with 4 QuadReadLaneAt of the lane's 0/1 predicate, each shifted to its quad position. That's the same mask as own << (lane & 3) ORed with the 3 QuadReadAcross*, and it still ends in ballot_ps_quad + note_own_bit. The test override reaches the translator's thread through kernel.rs. Minor: XCL_PS_BALLOT_QUADOP=1 isn't part of the translation-cache identity, as its doc comment says (needs XCL_TRANSLATED_CACHE=0). Targeted check of the changed path: this is the pipeline behind #3544 on Windows/AMD, see below.
performance: reasoned plus one run. Per ballot outside compares, 4 lane reads in place of 3 quadOp; the compare path already does it this way. With the default XCL_DIRECT_DXIL, main doesn't get past 48 s here, so there's no frame comparison. The PR's 90 s run ended by itself with 2159 frames, and the target pipeline compiled in 561 ms.
verdict: safe to merge
hardware / tool and model: AMD Radeon RX 9070 XT 16 GB (RDNA4, driver 32.0.32015.2008) and the Ryzen 7 9800X3D's iGPU (RDNA2 gfx1036, driver 32.0.21045.11001), 32 GB RAM, Windows 11 25H2 build 26200, rustc 1.100.1 / Claude Code (Claude Opus 5.5)

The changed path, on the retail title (release builds, default XCL_DIRECT_DXIL, XCL_PSO_TRACE=1, XCL_PREPARE=0):

GPU main d0832e61 trial merge 1df769bb
RX 9070 XT, 90 s driver compile start #2182: graphics PSO, 70024 B DXIL, record 7381166e806847c9 at 48.0 s, then unhandled exception 0xc0000005 in amdxc64.dll+0x735dd8 (read at address 0x0) on the same thread at 48.1 s record 7381166e806847c9 (70,444 B DXIL) compiles in 561 ms at 43.6 s; the run ends by itself, 2159 frames, no crash
iGPU, 120 s the same record's compile start at 47.5 s, then amdxc64.dll+0x671d88 (read at address 0x0) at 47.6 s the record compiles in 383 ms at 44.2 s. Device removed at 89.8 s on a CreatePlacedResourceX (0x887a0005), the same as main with XCL_DIRECT_DXIL=1 on this iGPU (88.7 s), so not this PR. I take it to be the 2-CU iGPU's 485 MiB.

This is #3544: on Windows/AMD, #3243's default crashes AMD's compiler on this pipeline, on RDNA4 and RDNA2.

xcl-smoke v1
commit: d0832e614fa7d6ae027bb4feb27ccb9121f54a8f
gpu: AMD Radeon RX 9070 XT
title: 21222967
seconds: 90
exit: 0xc0000005
frames shown: none logged (the run did not reach its end)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 2
peak commit: 17508 MB
xcl-smoke v1
commit: 1df769bb3c9607491ae2e018ed46881b1dcfbe3a
gpu: AMD Radeon RX 9070 XT
title: 21222967
seconds: 90
exit: 0x0
frames shown: 2159 (PresentX 2159)
presents per 2 s (last 3): 20 12 21
device removals: 0
crashes: 0
peak commit: 26532 MB

Claude Code (Claude Opus 5.5) ran the merge, the build, the suite and the guarded title runs, read the diff and drafted this check. I checked it before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7300421444 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7300421444). Originally posted by [Chrysana](https://github.com/Chrysana) on 2026-12-01T04:08:32Z. --- merge-check base: d0832e614fa7d6ae027bb4feb27ccb9121f54a8f head: 4dd1796fb2d15d7cf1163326327e696e6662ce08 merge: clean (trial merge 1df769bb3c9607491ae2e018ed46881b1dcfbe3a; `git diff --check` clean; +172/−22 in `gpu/dxil/lanes.rs` and `kernel.rs`) build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2883 passed, 9 failed, 51 ignored. SKIPPED: 6 (2× no heap windows, 1× driver cache needs Windows Developer Mode, 3× no D3D12 debug layer), the same as base. Failing: the same 8 tests as on base `d0832e61` on this card (2882 passed, 9 failed, 51 ignored there): `fuzz_validate_and_gpu_1`, `fuzz_validate_and_gpu_3`, `gpu_smem_flat_descriptor_windows_and_limits`, `f32_programs_on_the_gpu`, `gpu_f32_compares_with_nan`, `gpu_float_compares_random`, `gpu_ps_readfirstlane_loop_on_a_primitive_edge_ends`, and the e2e `two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs` (counted twice). All 9 `ps_ballot_tests` pass here, including `gpu_direct_ps_carry_ballot_draws_the_same_lane_by_lane_as_through_quadop` (wave32 and wave64). review: none blocking; I read the whole diff. `ballot_ps` now collects the quad with 4 `QuadReadLaneAt` of the lane's 0/1 predicate, each shifted to its quad position. That's the same mask as `own << (lane & 3)` ORed with the 3 `QuadReadAcross*`, and it still ends in `ballot_ps_quad` + `note_own_bit`. The test override reaches the translator's thread through `kernel.rs`. Minor: `XCL_PS_BALLOT_QUADOP=1` isn't part of the translation-cache identity, as its doc comment says (needs `XCL_TRANSLATED_CACHE=0`). Targeted check of the changed path: this is the pipeline behind #3544 on Windows/AMD, see below. performance: reasoned plus one run. Per ballot outside compares, 4 lane reads in place of 3 `quadOp`; the compare path already does it this way. With the default `XCL_DIRECT_DXIL`, `main` doesn't get past 48 s here, so there's no frame comparison. The PR's 90 s run ended by itself with 2159 frames, and the target pipeline compiled in 561 ms. verdict: safe to merge hardware / tool and model: AMD Radeon RX 9070 XT 16 GB (RDNA4, driver 32.0.32015.2008) and the Ryzen 7 9800X3D's iGPU (RDNA2 gfx1036, driver 32.0.21045.11001), 32 GB RAM, Windows 11 25H2 build 26200, rustc 1.100.1 / Claude Code (Claude Opus 5.5) **The changed path, on the retail title** (release builds, default `XCL_DIRECT_DXIL`, `XCL_PSO_TRACE=1`, `XCL_PREPARE=0`): | GPU | `main` `d0832e61` | trial merge `1df769bb` | |---|---|---| | RX 9070 XT, 90 s | `driver compile start #2182: graphics PSO, 70024 B DXIL, record 7381166e806847c9` at 48.0 s, then `unhandled exception 0xc0000005 in amdxc64.dll+0x735dd8 (read at address 0x0)` on the same thread at 48.1 s | record `7381166e806847c9` (70,444 B DXIL) compiles in 561 ms at 43.6 s; the run ends by itself, 2159 frames, no crash | | iGPU, 120 s | the same record's compile start at 47.5 s, then `amdxc64.dll+0x671d88 (read at address 0x0)` at 47.6 s | the record compiles in 383 ms at 44.2 s. Device removed at 89.8 s on a `CreatePlacedResourceX` (0x887a0005), the same as `main` with `XCL_DIRECT_DXIL=1` on this iGPU (88.7 s), so not this PR. I take it to be the 2-CU iGPU's 485 MiB. | This is #3544: on Windows/AMD, #3243's default crashes AMD's compiler on this pipeline, on RDNA4 and RDNA2. ``` xcl-smoke v1 commit: d0832e614fa7d6ae027bb4feb27ccb9121f54a8f gpu: AMD Radeon RX 9070 XT title: 21222967 seconds: 90 exit: 0xc0000005 frames shown: none logged (the run did not reach its end) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 2 peak commit: 17508 MB ``` ``` xcl-smoke v1 commit: 1df769bb3c9607491ae2e018ed46881b1dcfbe3a gpu: AMD Radeon RX 9070 XT title: 21222967 seconds: 90 exit: 0x0 frames shown: 2159 (PresentX 2159) presents per 2 s (last 3): 20 12 21 device removals: 0 crashes: 0 peak commit: 26532 MB ``` Claude Code (Claude Opus 5.5) ran the merge, the build, the suite and the guarded title runs, read the diff and drafted this check. I checked it before posting.
Foniass commented 2026-12-01 09:19:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T09:19:37Z.


merge-check
base: 7d86c5d2b7
head: 4dd1796fb2
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2897 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none
review: read the whole diff (+172/-22). ballot_ps (lanes.rs ~923) now ORs quadReadLaneAt(own, p) << p for the 4 quad lanes into the same bit layout as the old own << (lane & 3) instead of using quadOp, and note_own_bit stays on both forms. On current main this holds: the PR base 9dfbe3ea already has ps_masks (f4ee8ac5), which only marks V_CMP compares, so carry ballots (v_add_co and the like) always take ballot_ps; the only dxil change since (44eeb0c7, the wave32 width fix) doesn't touch this path, so the #3429-style breakage doesn't apply. Findings: (1) XCL_PS_BALLOT_QUADOP adds an env switch outside the translation's cache identity, and the tests don't need it (they use QUAD_OP_IN_TEST); CONTRIBUTING puts env switches in their own PR. (2) The crash fix was only verified on the first head (8363f77a), and the frame cost of 4 quadReadLaneAt vs 3 quadOp per PS ballot isn't measured (both stated in the description). Fine: the DXIL test fails on main (no quadOp, 4 lane reads, v_cndmask takes the carry itself), the GPU test compares both forms pixel by pixel including helper lanes on edges, and the AI use names exact models.
performance: 60 s smoke of a retail title, main 7d86c5d2 vs this merge (1fe65259): 1663 -> 1692 frames shown (101 %; last presents per 2 s: 60 60 61), peak commit 17153 -> 17123 MB, 0 device removals, 0 crashes. The smoke run is capped at 60 presents per second, so it doesn't measure the cost of 4 quadReadLaneAt vs 3 quadOp per pixel-shader ballot.
verdict: not yet: XCL_PS_BALLOT_QUADOP changes the generated code but isn't in the translation's cache identity, so switching it serves stale cached shaders; drop it (the tests don't need it) or move it to its own PR with the identity. The fix itself passes here with a flat smoke run
hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5

AI-written and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7306538668 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7306538668). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T09:19:37Z. --- merge-check base: 7d86c5d2b7845695031eeea1327aa81b6c439323 head: 4dd1796fb2d15d7cf1163326327e696e6662ce08 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2897 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none review: read the whole diff (+172/-22). `ballot_ps` (lanes.rs ~923) now ORs `quadReadLaneAt(own, p) << p` for the 4 quad lanes into the same bit layout as the old `own << (lane & 3)` instead of using `quadOp`, and `note_own_bit` stays on both forms. On current main this holds: the PR base 9dfbe3ea already has `ps_masks` (f4ee8ac5), which only marks V_CMP compares, so carry ballots (`v_add_co` and the like) always take `ballot_ps`; the only dxil change since (44eeb0c7, the wave32 width fix) doesn't touch this path, so the #3429-style breakage doesn't apply. Findings: (1) `XCL_PS_BALLOT_QUADOP` adds an env switch outside the translation's cache identity, and the tests don't need it (they use `QUAD_OP_IN_TEST`); CONTRIBUTING puts env switches in their own PR. (2) The crash fix was only verified on the first head (8363f77a), and the frame cost of 4 `quadReadLaneAt` vs 3 `quadOp` per PS ballot isn't measured (both stated in the description). Fine: the DXIL test fails on main (no quadOp, 4 lane reads, `v_cndmask` takes the carry itself), the GPU test compares both forms pixel by pixel including helper lanes on edges, and the AI use names exact models. performance: 60 s smoke of a retail title, main 7d86c5d2 vs this merge (1fe65259): 1663 -> 1692 frames shown (101 %; last presents per 2 s: 60 60 61), peak commit 17153 -> 17123 MB, 0 device removals, 0 crashes. The smoke run is capped at 60 presents per second, so it doesn't measure the cost of 4 `quadReadLaneAt` vs 3 `quadOp` per pixel-shader ballot. verdict: not yet: `XCL_PS_BALLOT_QUADOP` changes the generated code but isn't in the translation's cache identity, so switching it serves stale cached shaders; drop it (the tests don't need it) or move it to its own PR with the identity. The fix itself passes here with a flat smoke run hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5 AI-written and posted by Foniass without a human check of each point.
Foniass commented 2026-12-01 09:56:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T09:56:39Z.


Triage (#1607) – head 4dd6842

No open or merged PR changes Lw::ballot_ps this way. #3429 and #3405 also touch pixel-shader quad reads, but on the compare paths (lower_valu, lower_wide), not the non-compare ballot.
No problems found in the diff: the lane-by-lane form ends in the same ballot_ps_quad + note_own_bit as the old one, and only tests can ask for the quadOp form (QUAD_OP_IN_TEST, passed to the translator thread like NO_SELECT_FOLD); there is no XCL_PS_BALLOT_QUADOP switch any more.
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:7307436340 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7307436340). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T09:56:39Z. --- **Triage (#1607)** – head 4dd6842 No open or merged PR changes `Lw::ballot_ps` this way. #3429 and #3405 also touch pixel-shader quad reads, but on the compare paths (`lower_valu`, `lower_wide`), not the non-compare ballot. No problems found in the diff: the lane-by-lane form ends in the same `ballot_ps_quad` + `note_own_bit` as the old one, and only tests can ask for the `quadOp` form (`QUAD_OP_IN_TEST`, passed to the translator thread like `NO_SELECT_FOLD`); there is no `XCL_PS_BALLOT_QUADOP` switch any more. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
CharlyRien commented 2026-12-01 13:37:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by CharlyRien on 2026-12-01T13:37:14Z.


merge-check
base: b2b1f109d2
head: 4dd1796fb2
merge: clean (local trial merge 399e44b0, not pushed; git diff --check clean; +172/-22 in gpu/dxil/lanes.rs and kernel.rs)
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 (debug, on the merged tree) -> 2901 passed, 2 failed, 51 ignored; SKIPPED: 25 (22 no wave64, 1 no heap windows (opt-in), 1 no heap windows, 1 no GPU_UPLOAD heaps); failing: test_title_draws_with_a_root_signature_under_the_debug_layer and test_title_runs_under_the_debug_layer_with_dred (e2e), both fail on base b2b1f109 alone too (2900 passed, the same 2 failed, 51 ignored). ps_ballot_tests in release on the GPU, GPU skips not allowed: 9 passed, 0 failed, both new tests included, no SKIPPED. This card has no wave64, so gpu_direct_ps_carry_ballot_draws_the_same_lane_by_lane_as_through_quadop ran its wave32 legs only (its wave64 legs are left out without a SKIPPED line).
review: no blocking finding in the default path after reading the whole diff and the code around it. Most serious first:

  • XCL_PS_BALLOT_QUADOP is not part of any cache identity: neither the translated cache's (translated::identity_from_source in recomp/pso.rs, which tags XCL_DIRECT_COMPACT, XCL_DIRECT_COMPACT_NEST, XCL_X_LDS_ORDER and XCL_PER_LANE for the same reason) nor semantic_pipeline_setting (warm library). The doc comment covers one direction (with the switch on, a cached translation keeps its old form unless XCL_TRANSLATED_CACHE=0). The other direction is worse: a run with XCL_PS_BALLOT_QUADOP=1 and the cache on writes its misses in the quadOp form under the default identity, and later default runs load that form, which is the one that crashes the RDNA2 compiler, until the direct translator's sources change. It is off by default, and the tests do not need it (they use QUAD_OP_IN_TEST). So I agree with the earlier check's point: drop the switch, or tag the identity the way XCL_DIRECT_COMPACT is tagged (one line).
  • The change also reaches NVIDIA. In a translated cache of the retail title from our local stack (main 493dbd3d + #3528 + #3517 + local commits, before this PR), 411 of 2,886 direct-DXIL pixel-shader translations (351 distinct programs) have these ballots in the quadOp form: 25,329 quadOp calls, so about 8,400 ballots, up to 95 in one shader (ballot_ps is the only place the direct translator emits quadOp). With this PR each ballot reads its quad with 4 QuadReadLaneAt instead of 3 quadOp. ballot_ps_quad (WaveActiveBit(Or) since #3501) is unchanged and used by both forms. (Counted offline with dxc -dumpbin over the cache. The shader we saw hang this card with #2571's forms off, https://github.com/xcl-dev/xcl/pull/3501#issuecomment-7311293228, has no quadOp, so this PR does not change it.)
  • The new form builds the same nibble: bit p is QuadReadLaneAt(cond, p) << p, as own << (lane & 3) ORed with the 3 QuadReadAcross*. Helper lanes are read the same way, the constant-false shortcut is kept, and both forms end in ballot_ps_quad + note_own_bit (the fix for the 16 pixels of the earlier head). The kernel.rs change is cfg(test) only and hands the test's choice to the translator's thread, like NO_SELECT_FOLD.
  • The DXIL test checks both forms in wave32 and wave64, also with the carry's operand from v_readfirstlane. The GPU test compares both forms pixel by pixel, including helper lanes on the triangles' edge.
    Not covered here: the AMD crash itself (no AMD card), wave64 hardware, and this PR on plain main in the world (see performance).
    performance: by default it adds 1 lane read per pixel-shader carry ballot (4 QuadReadLaneAt and their shifts instead of 3 quadOp and one shift). The DXIL also grows in the 411 shaders above, which costs some driver compile time on a cold cache.
    Measured, 60 s scripts/smoke.ps1, one run per side, the retail title, XCL_PREPARE=0, cold shader cache on both sides: base b2b1f109 543 frames, peak commit 15,844 MB; merged 505 frames (93 %), peak commit 16,191 MB (+347 MB, 102 %). 0 device removals and 0 crashes on both sides. These 60 s do not reach the world on this machine.
    World, one run with the PR's commit on our local tree (main 493dbd3d + #3528 ba8592a4 + #3517 0b4283d1 + 42 local commits, none in lanes.rs or kernel.rs), fresh shader preparation for each build, the same switches as our #3501 comment (XCL_HEAP_WINDOWS=1 XCL_UMA_WINDOWS=16 XCL_SPARSE_WINDOWS=4 XCL_GPU_WAIT_TIMEOUT_MS=45000 XCL_PREPARE=0 and others): neither run left the loading screens in the 200 s after the first heavy draws (that tree is slow, see #2571); without the PR 0.23 presents/s, with it 0.22; 0 removals, no hang either way. One run per side, so this only shows no new hang or removal on NVIDIA, not a pace difference.
    verdict: not yet: XCL_PS_BALLOT_QUADOP is outside the translated cache's identity (see review); a one-line fix, the default path passes here
    hardware / tool and model: NVIDIA GeForce RTX 3090 24 GB (driver 616.56, Resizable BAR off), AMD Ryzen 9 5950X, 32 GB, Windows 11 build 22631 / AI use: Claude Code (Claude Opus 5.5) ran the merge, the builds, the suite, both smoke runs, the world run and the offline DXIL count on this machine, read the diff and wrote this report; checked and posted by me.
<!-- greyfinch-sync:ivall/xcl:comment:7312909993 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7312909993). Originally posted by [CharlyRien](https://github.com/CharlyRien) on 2026-12-01T13:37:14Z. --- merge-check base: b2b1f109d27e746a62ec95b04dd1f9924452e682 head: 4dd1796fb2d15d7cf1163326327e696e6662ce08 merge: clean (local trial merge 399e44b0, not pushed; `git diff --check` clean; +172/-22 in `gpu/dxil/lanes.rs` and `kernel.rs`) build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 (debug, on the merged tree) -> 2901 passed, 2 failed, 51 ignored; SKIPPED: 25 (22 no wave64, 1 no heap windows (opt-in), 1 no heap windows, 1 no GPU_UPLOAD heaps); failing: `test_title_draws_with_a_root_signature_under_the_debug_layer` and `test_title_runs_under_the_debug_layer_with_dred` (e2e), both fail on base b2b1f109 alone too (2900 passed, the same 2 failed, 51 ignored). `ps_ballot_tests` in release on the GPU, GPU skips not allowed: 9 passed, 0 failed, both new tests included, no SKIPPED. This card has no wave64, so `gpu_direct_ps_carry_ballot_draws_the_same_lane_by_lane_as_through_quadop` ran its wave32 legs only (its wave64 legs are left out without a `SKIPPED` line). review: no blocking finding in the default path after reading the whole diff and the code around it. Most serious first: - `XCL_PS_BALLOT_QUADOP` is not part of any cache identity: neither the translated cache's (`translated::identity_from_source` in `recomp/pso.rs`, which tags `XCL_DIRECT_COMPACT`, `XCL_DIRECT_COMPACT_NEST`, `XCL_X_LDS_ORDER` and `XCL_PER_LANE` for the same reason) nor `semantic_pipeline_setting` (warm library). The doc comment covers one direction (with the switch on, a cached translation keeps its old form unless `XCL_TRANSLATED_CACHE=0`). The other direction is worse: a run with `XCL_PS_BALLOT_QUADOP=1` and the cache on writes its misses in the `quadOp` form under the default identity, and later default runs load that form, which is the one that crashes the RDNA2 compiler, until the direct translator's sources change. It is off by default, and the tests do not need it (they use `QUAD_OP_IN_TEST`). So I agree with the earlier check's point: drop the switch, or tag the identity the way `XCL_DIRECT_COMPACT` is tagged (one line). - The change also reaches NVIDIA. In a translated cache of the retail title from our local stack (main 493dbd3d + #3528 + #3517 + local commits, before this PR), 411 of 2,886 direct-DXIL pixel-shader translations (351 distinct programs) have these ballots in the `quadOp` form: 25,329 `quadOp` calls, so about 8,400 ballots, up to 95 in one shader (`ballot_ps` is the only place the direct translator emits `quadOp`). With this PR each ballot reads its quad with 4 `QuadReadLaneAt` instead of 3 `quadOp`. `ballot_ps_quad` (`WaveActiveBit(Or)` since #3501) is unchanged and used by both forms. (Counted offline with `dxc -dumpbin` over the cache. The shader we saw hang this card with #2571's forms off, https://github.com/xcl-dev/xcl/pull/3501#issuecomment-7311293228, has no `quadOp`, so this PR does not change it.) - The new form builds the same nibble: bit `p` is `QuadReadLaneAt(cond, p) << p`, as `own << (lane & 3)` ORed with the 3 `QuadReadAcross*`. Helper lanes are read the same way, the constant-false shortcut is kept, and both forms end in `ballot_ps_quad` + `note_own_bit` (the fix for the 16 pixels of the earlier head). The `kernel.rs` change is `cfg(test)` only and hands the test's choice to the translator's thread, like `NO_SELECT_FOLD`. - The DXIL test checks both forms in wave32 and wave64, also with the carry's operand from `v_readfirstlane`. The GPU test compares both forms pixel by pixel, including helper lanes on the triangles' edge. Not covered here: the AMD crash itself (no AMD card), wave64 hardware, and this PR on plain main in the world (see performance). performance: by default it adds 1 lane read per pixel-shader carry ballot (4 `QuadReadLaneAt` and their shifts instead of 3 `quadOp` and one shift). The DXIL also grows in the 411 shaders above, which costs some driver compile time on a cold cache. Measured, 60 s `scripts/smoke.ps1`, one run per side, the retail title, `XCL_PREPARE=0`, cold shader cache on both sides: base b2b1f109 543 frames, peak commit 15,844 MB; merged 505 frames (93 %), peak commit 16,191 MB (+347 MB, 102 %). 0 device removals and 0 crashes on both sides. These 60 s do not reach the world on this machine. World, one run with the PR's commit on our local tree (main 493dbd3d + #3528 ba8592a4 + #3517 0b4283d1 + 42 local commits, none in `lanes.rs` or `kernel.rs`), fresh shader preparation for each build, the same switches as our #3501 comment (`XCL_HEAP_WINDOWS=1 XCL_UMA_WINDOWS=16 XCL_SPARSE_WINDOWS=4 XCL_GPU_WAIT_TIMEOUT_MS=45000 XCL_PREPARE=0` and others): neither run left the loading screens in the 200 s after the first heavy draws (that tree is slow, see #2571); without the PR 0.23 presents/s, with it 0.22; 0 removals, no hang either way. One run per side, so this only shows no new hang or removal on NVIDIA, not a pace difference. verdict: not yet: `XCL_PS_BALLOT_QUADOP` is outside the translated cache's identity (see review); a one-line fix, the default path passes here hardware / tool and model: NVIDIA GeForce RTX 3090 24 GB (driver 616.56, Resizable BAR off), AMD Ryzen 9 5950X, 32 GB, Windows 11 build 22631 / AI use: Claude Code (Claude Opus 5.5) ran the merge, the builds, the suite, both smoke runs, the world run and the offline DXIL count on this machine, read the diff and wrote this report; checked and posted by me.
Aniseto commented 2026-12-01 15:25:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Aniseto on 2026-12-01T15:25:38Z.


This is a new response on the same thread as my reports at 8363f77a (https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7261687690) and 4dd1796f (https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7284815017); the head moved to 4dd68427, so I am not editing those comments.

Ran the ps_ballot_tests module at 4dd68427 on an NVIDIA Blackwell desktop part with 16 GB of VRAM.

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB, mesh shaders) driver 32.0.16.2140 (621.40), Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5, debug build, XCL_ADAPTER=NVIDIA, detached worktree at the exact PR head, no local patches.

XCL_ADAPTER=NVIDIA cargo test -q -p xcl --lib ps_ballot_tests -- --test-threads=1
9 passed; 0 failed; 0 ignored; 2761 filtered out      (exit 0)

All nine tests pass here at the new head, the same count as at 4dd1796f: the GPU test that draws both ballot forms and compares every pixel, plus the lane-by-lane DXIL tests. The description's full workspace suite and the title smoke runs were not repeated; no title was run.

Not tested: a retail title, the AMD crash scenario, the full workspace suite, Wine, Intel GPUs, release profile, game data.

AI-assisted (OpenCode), model: MiMo-V2.6-Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.

<!-- greyfinch-sync:ivall/xcl:comment:7315889485 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7315889485). Originally posted by [Aniseto](https://github.com/Aniseto) on 2026-12-01T15:25:38Z. --- This is a new response on the same thread as my reports at `8363f77a` (https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7261687690) and `4dd1796f` (https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7284815017); the head moved to `4dd68427`, so I am not editing those comments. Ran the `ps_ballot_tests` module at `4dd68427` on an NVIDIA Blackwell desktop part with 16 GB of VRAM. Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB, mesh shaders) driver 32.0.16.2140 (621.40), Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5, debug build, `XCL_ADAPTER=NVIDIA`, detached worktree at the exact PR head, no local patches. ``` XCL_ADAPTER=NVIDIA cargo test -q -p xcl --lib ps_ballot_tests -- --test-threads=1 9 passed; 0 failed; 0 ignored; 2761 filtered out (exit 0) ``` All nine tests pass here at the new head, the same count as at `4dd1796f`: the GPU test that draws both ballot forms and compares every pixel, plus the lane-by-lane DXIL tests. The description's full workspace suite and the title smoke runs were not repeated; no title was run. Not tested: a retail title, the AMD crash scenario, the full workspace suite, Wine, Intel GPUs, release profile, game data. AI-assisted (OpenCode), model: **MiMo-V2.6-Flash Free** - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
ArtuArtaza commented 2026-12-01 15:30:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ArtuArtaza on 2026-12-01T15:30:22Z.


@Foniass @CharlyRien agreed on XCL_PS_BALLOT_QUADOP: it was outside the translated cache's identity, so a run with it on could leave quadOp translations for later default runs. 4dd68427 removes it. Only tests can select the old form now (cfg(test), like NO_SELECT_FOLD), and the code XCL emits by default is the same as at 4dd1796f.

Run on an RX 6700 XT, on this same tree just before it was committed:

  • cargo test -p xcl --lib ps_ballot_tests -- --test-threads=1 --nocapture: 9 passed, 0 failed, 0 skipped.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture: 2881 passed, 7 failed, 51 ignored, 4 SKIPPED. The 7 are the same 6 tests the description lists as failing on unmodified 9dfbe3ea (I did not rerun them on main today).

Smoke pair (scripts/smoke.ps1, 60 s, release, XCL_DEVICE_TYPE=lockhart XCL_PREPARE=0, A at 30 s and 45 s), the PR's merge base first, then 4dd68427, one run each. It shows no regression in the menus; it does not test the crash, which comes later than 60 s here.

xcl-smoke v1
commit: 9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b
gpu: AMD Radeon RX 6700 XT
title: 2c508222
seconds: 60
exit: 0x0
frames shown: 1565 (PresentX 1565)
presents per 2 s (last 3): 60 60 61
device removals: 0
crashes: 0
peak commit: 13578 MB
xcl-smoke v1
commit: 4dd6842738511d3de90b272d1f87aa745d165799
gpu: AMD Radeon RX 6700 XT
title: 2c508222
seconds: 60
exit: 0x0
frames shown: 1543 (PresentX 1543)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13683 MB

@Aniseto thanks for the run on the new head.

The description still names 4dd1796f and the switch; the PR description check is red until it has the second block.

(Change, runs and reply by Claude Code with Claude Opus 5.5, sent from my account.)

<!-- greyfinch-sync:ivall/xcl:comment:7316027888 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7316027888). Originally posted by [ArtuArtaza](https://github.com/ArtuArtaza) on 2026-12-01T15:30:22Z. --- @Foniass @CharlyRien agreed on `XCL_PS_BALLOT_QUADOP`: it was outside the translated cache's identity, so a run with it on could leave `quadOp` translations for later default runs. `4dd68427` removes it. Only tests can select the old form now (`cfg(test)`, like `NO_SELECT_FOLD`), and the code XCL emits by default is the same as at `4dd1796f`. Run on an RX 6700 XT, on this same tree just before it was committed: - `cargo test -p xcl --lib ps_ballot_tests -- --test-threads=1 --nocapture`: 9 passed, 0 failed, 0 skipped. - `cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture`: 2881 passed, 7 failed, 51 ignored, 4 `SKIPPED`. The 7 are the same 6 tests the description lists as failing on unmodified `9dfbe3ea` (I did not rerun them on main today). Smoke pair (`scripts/smoke.ps1`, 60 s, release, `XCL_DEVICE_TYPE=lockhart XCL_PREPARE=0`, A at 30 s and 45 s), the PR's merge base first, then `4dd68427`, one run each. It shows no regression in the menus; it does not test the crash, which comes later than 60 s here. ``` xcl-smoke v1 commit: 9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b gpu: AMD Radeon RX 6700 XT title: 2c508222 seconds: 60 exit: 0x0 frames shown: 1565 (PresentX 1565) presents per 2 s (last 3): 60 60 61 device removals: 0 crashes: 0 peak commit: 13578 MB ``` ``` xcl-smoke v1 commit: 4dd6842738511d3de90b272d1f87aa745d165799 gpu: AMD Radeon RX 6700 XT title: 2c508222 seconds: 60 exit: 0x0 frames shown: 1543 (PresentX 1543) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13683 MB ``` @Aniseto thanks for the run on the new head. The description still names `4dd1796f` and the switch; the `PR description` check is red until it has the second block. (Change, runs and reply by Claude Code with Claude Opus 5.5, sent from my account.)
Gevroska commented 2026-12-01 16:01:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Gevroska on 2026-12-01T16:01:34Z.


@ArtuArtaza I confirmed the cache issue in both directions on 4dd1796f, merged locally into b2b1f109. I used the same synthetic wave32 carry shader in six fresh processes.

  • With the cache seeded under the default setting, switching XCL_PS_BALLOT_QUADOP=1 returned the byte-identical default DXIL: 0 quadOp and 9 quadReadLaneAt calls.
  • With the cache seeded under XCL_PS_BALLOT_QUADOP=1, switching back to default returned the byte-identical alternate DXIL: 3 quadOp and 5 quadReadLaneAt calls.

Both warm hits skipped translation. With XCL_TRANSLATED_CACHE=0, each direction rebuilt the requested form. Separately, the carry-ballot pixel-output test passed on my RTX 3080 with zero skips.

This confirms the failure that removing the production switch in 4dd68427 addresses. My local runs cover the earlier revision only.

AI disclosure — Codex GPT-6.2 Sol ran the tests. A separate GPT-6.2 Sol agent verified the original artifacts. GPT-6.2 Astra drafted this comment.

I reviewed and approved this comment before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7316911397 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7316911397). Originally posted by [Gevroska](https://github.com/Gevroska) on 2026-12-01T16:01:34Z. --- @ArtuArtaza I confirmed the cache issue in both directions on `4dd1796f`, merged locally into `b2b1f109`. I used the same synthetic wave32 carry shader in six fresh processes. - With the cache seeded under the default setting, switching `XCL_PS_BALLOT_QUADOP=1` returned the byte-identical default DXIL: 0 `quadOp` and 9 `quadReadLaneAt` calls. - With the cache seeded under `XCL_PS_BALLOT_QUADOP=1`, switching back to default returned the byte-identical alternate DXIL: 3 `quadOp` and 5 `quadReadLaneAt` calls. Both warm hits skipped translation. With `XCL_TRANSLATED_CACHE=0`, each direction rebuilt the requested form. Separately, the carry-ballot pixel-output test passed on my RTX 3080 with zero skips. This confirms the failure that removing the production switch in `4dd68427` addresses. My local runs cover the earlier revision only. AI disclosure — Codex GPT-6.2 Sol ran the tests. A separate GPT-6.2 Sol agent verified the original artifacts. GPT-6.2 Astra drafted this comment. I reviewed and approved this comment before posting.
Gevroska commented 2026-12-01 16:05:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Gevroska on 2026-12-01T16:05:13Z.


merge-check
base: 6bfb5c5153
head: 4dd6842738
merge: clean (361bda0b)
build: cargo build --workspace passed
tests: 2,905 passed, 0 failed, 51 ignored. The suite also reported 28 runtime skips covering native wave64, heap windows, driver-cache control and the D3D12 debug layer. I disabled dev/test debug symbols on the retry after the first compile ran out of disk space. Test selection and assertions stayed the same.

review: All nine pixel-ballot tests passed on my RTX 3080. GPU readback matched the expected output for both lowering forms across eight literal-carry draws. The disassembly check also covered a carry derived from WaveReadLaneAt. Source review confirmed that the old XCL_PS_BALLOT_QUADOP switch is gone and the direct DXIL cache key changed.

performance: I ran one matched 60-second retail game startup on each revision, main first, with no inputs, on-demand shader compilation and a fresh XCL cache for each run. Main showed 1,301 frames (1,301 PresentX) and peaked at 15,844 MB commit. The merge showed 1,430 frames (1,431 PresentX) and peaked at 15,905 MB. Both exited cleanly with zero crashes or device removals. The NVIDIA driver cache was shared across runs, so I would use this pair as a startup regression check only.

verdict: not yet. The cache test stopped before GPU dispatch. I still can’t confirm cold or warm behavior on the revised head, or whether it rejects entries from the old alternate cache. The affected AMD RDNA2 driver also needs a check on that hardware.

hardware / tool and model: NVIDIA GeForce RTX 3080, driver 32.0.16.1692, Ryzen 7 5700X, Windows 11 Education 25H2 (26200.9457). OpenAI Codex GPT-6.2 Sol ran the tests. Independent Codex agents reviewed the source and evidence. Their exact models were not recorded. GPT-6.2 Astra drafted this comment.

I reviewed and approved this comment before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7317011684 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7317011684). Originally posted by [Gevroska](https://github.com/Gevroska) on 2026-12-01T16:05:13Z. --- merge-check base: 6bfb5c5153ccc23517daf30aa1071ddb0fadb53c head: 4dd6842738511d3de90b272d1f87aa745d165799 merge: clean (361bda0b) build: cargo build --workspace passed tests: 2,905 passed, 0 failed, 51 ignored. The suite also reported 28 runtime skips covering native wave64, heap windows, driver-cache control and the D3D12 debug layer. I disabled dev/test debug symbols on the retry after the first compile ran out of disk space. Test selection and assertions stayed the same. review: All nine pixel-ballot tests passed on my RTX 3080. GPU readback matched the expected output for both lowering forms across eight literal-carry draws. The disassembly check also covered a carry derived from WaveReadLaneAt. Source review confirmed that the old XCL_PS_BALLOT_QUADOP switch is gone and the direct DXIL cache key changed. performance: I ran one matched 60-second retail game startup on each revision, main first, with no inputs, on-demand shader compilation and a fresh XCL cache for each run. Main showed 1,301 frames (1,301 PresentX) and peaked at 15,844 MB commit. The merge showed 1,430 frames (1,431 PresentX) and peaked at 15,905 MB. Both exited cleanly with zero crashes or device removals. The NVIDIA driver cache was shared across runs, so I would use this pair as a startup regression check only. verdict: not yet. The cache test stopped before GPU dispatch. I still can’t confirm cold or warm behavior on the revised head, or whether it rejects entries from the old alternate cache. The affected AMD RDNA2 driver also needs a check on that hardware. hardware / tool and model: NVIDIA GeForce RTX 3080, driver 32.0.16.1692, Ryzen 7 5700X, Windows 11 Education 25H2 (26200.9457). OpenAI Codex GPT-6.2 Sol ran the tests. Independent Codex agents reviewed the source and evidence. Their exact models were not recorded. GPT-6.2 Astra drafted this comment. I reviewed and approved this comment before posting.
CharlyRien commented 2026-12-01 16:20:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by CharlyRien on 2026-12-01T16:20:01Z.


merge-check
base: 6bfb5c5153
head: 4dd6842738
merge: clean (local trial merge 875cebf8, not pushed; git diff --check clean; +164/-22 in gpu/dxil/lanes.rs and kernel.rs)
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 (debug, on the merged tree) -> 2903 passed, 2 failed, 51 ignored; SKIPPED: 25 (22 no wave64, 1 no heap windows (opt-in), 1 no heap windows, 1 no GPU_UPLOAD heaps); failing: test_title_draws_with_a_root_signature_under_the_debug_layer and test_title_runs_under_the_debug_layer_with_dred (e2e), the same 2 that fail on main b2b1f109 alone on this card (not rerun on 6bfb5c51). ps_ballot_tests in release on the GPU, GPU skips not allowed: 9 passed, 0 failed, the PR's tests included, no SKIPPED.
review: none blocking. 4dd1796f..4dd68427 changes only lanes.rs: the XCL_PS_BALLOT_QUADOP switch is gone, the quadOp form is reachable from tests only (QUAD_OP_IN_TEST, cfg(test)), so a cached translation can no longer get the old form under the default identity (the point of the earlier checks). Outside tests quad_op is false: the code XCL emits is the one I checked on 4dd1796f (https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7312909993, with its smoke and world runs). Tier 1 (translator only), so no new smoke or title run on this head.
performance: as in my check of 4dd1796f (one more lane read per pixel-shader carry ballot; 60 s smoke there 93 % of main's frames, +347 MB peak commit, no removal); not remeasured on this head.
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 3090 24 GB (driver 616.56, Resizable BAR off), AMD Ryzen 9 5950X, 32 GB, Windows 11 build 22631 / AI use: Claude Code (Claude Opus 5.5) ran the merge, the build, the PR's tests and the suite on this machine and read the diff; checked and posted by me.

<!-- greyfinch-sync:ivall/xcl:comment:7317428148 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7317428148). Originally posted by [CharlyRien](https://github.com/CharlyRien) on 2026-12-01T16:20:01Z. --- merge-check base: 6bfb5c5153ccc23517daf30aa1071ddb0fadb53c head: 4dd6842738511d3de90b272d1f87aa745d165799 merge: clean (local trial merge 875cebf8, not pushed; `git diff --check` clean; +164/-22 in `gpu/dxil/lanes.rs` and `kernel.rs`) build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 (debug, on the merged tree) -> 2903 passed, 2 failed, 51 ignored; SKIPPED: 25 (22 no wave64, 1 no heap windows (opt-in), 1 no heap windows, 1 no GPU_UPLOAD heaps); failing: `test_title_draws_with_a_root_signature_under_the_debug_layer` and `test_title_runs_under_the_debug_layer_with_dred` (e2e), the same 2 that fail on main b2b1f109 alone on this card (not rerun on 6bfb5c51). `ps_ballot_tests` in release on the GPU, GPU skips not allowed: 9 passed, 0 failed, the PR's tests included, no SKIPPED. review: none blocking. 4dd1796f..4dd68427 changes only `lanes.rs`: the `XCL_PS_BALLOT_QUADOP` switch is gone, the `quadOp` form is reachable from tests only (`QUAD_OP_IN_TEST`, `cfg(test)`), so a cached translation can no longer get the old form under the default identity (the point of the earlier checks). Outside tests `quad_op` is `false`: the code XCL emits is the one I checked on 4dd1796f (https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7312909993, with its smoke and world runs). Tier 1 (translator only), so no new smoke or title run on this head. performance: as in my check of 4dd1796f (one more lane read per pixel-shader carry ballot; 60 s smoke there 93 % of main's frames, +347 MB peak commit, no removal); not remeasured on this head. verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 3090 24 GB (driver 616.56, Resizable BAR off), AMD Ryzen 9 5950X, 32 GB, Windows 11 build 22631 / AI use: Claude Code (Claude Opus 5.5) ran the merge, the build, the PR's tests and the suite on this machine and read the diff; checked and posted by me.
Foniass commented 2026-12-01 20:52:59 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T20:52:59Z.


Follow-up review (head 4dd68427, since 4dd1796, diff read, not a merge-check):

  • XCL_PS_BALLOT_QUADOP outside the translation's cache identity: fixed. The switch and ps_ballot_quad_op are gone; only tests can pick the quadOp form, through the cfg(test) cell QUAD_OP_IN_TEST (lanes.rs ~19-24, ~916-919; kernel.rs ~255-264), and other builds always emit the quadReadLaneAt form.
  • Crash fix checked only on the first head; frame cost not measured: partly fixed. The code emitted by default has not changed since 4dd1796f, which a merge-check on the PR showed building on an RX 9070 XT and an RDNA2 iGPU where main crashes. The cost of 4 quadReadLaneAt against 3 quadOp per pixel-shader ballot is still only covered by 60 s smoke runs capped at 60 presents per second, as Not tested says.

New: none.

Fine: the lane-by-lane form sets bit p from quad member p, matching the old own << (lane & 3) layout, and both forms end in the same ballot_ps_quad + note_own_bit; the DXIL test checks both forms in wave32 and wave64 with and without a v_readfirstlane operand; the GPU test compares both forms pixel by pixel including helper lanes on the triangles' edge.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7325416479 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7325416479). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T20:52:59Z. --- Follow-up review (head 4dd68427, since 4dd1796, diff read, not a merge-check): - **`XCL_PS_BALLOT_QUADOP` outside the translation's cache identity:** fixed. The switch and `ps_ballot_quad_op` are gone; only tests can pick the `quadOp` form, through the `cfg(test)` cell `QUAD_OP_IN_TEST` (`lanes.rs` ~19-24, ~916-919; `kernel.rs` ~255-264), and other builds always emit the `quadReadLaneAt` form. - **Crash fix checked only on the first head; frame cost not measured:** partly fixed. The code emitted by default has not changed since `4dd1796f`, which a merge-check on the PR showed building on an RX 9070 XT and an RDNA2 iGPU where `main` crashes. The cost of 4 `quadReadLaneAt` against 3 `quadOp` per pixel-shader ballot is still only covered by 60 s smoke runs capped at 60 presents per second, as **Not tested** says. New: none. Fine: the lane-by-lane form sets bit `p` from quad member `p`, matching the old `own << (lane & 3)` layout, and both forms end in the same `ballot_ps_quad` + `note_own_bit`; the DXIL test checks both forms in wave32 and wave64 with and without a `v_readfirstlane` operand; the GPU test compares both forms pixel by pixel including helper lanes on the triangles' edge. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
bmjask commented 2026-12-02 06:43:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T06:43:41Z.

Code review location: crates/xcl/src/gpu/dxil/lanes.rs; line 932

@@ -891,23 +898,45 @@ impl Lw {
     }
 
     /// Pixel-shader ballot including helper lanes (parity with HLSL `ballot_px` in
-    /// `recomp/emit.rs`): each quad collects its 4 bits through `QuadReadAcross*`
-    /// (which see helper lanes) and feeds them to [`Lw::ballot_ps_quad`]. Entry `EXEC` in
-    /// `setup_pixel` runs before `self.gfx` is set, so it stays live-lanes-only.
+    /// `recomp/emit.rs`): each quad collects its 4 bits through `QuadReadLaneAt` (which sees
+    /// helper lanes) and feeds them to [`Lw::ballot_ps_quad`]. Entry `EXEC` in `setup_pixel`
+    /// runs before `self.gfx` is set, so it stays live-lanes-only.
+    ///
+    /// Not through `QuadReadAcross*` (`quadOp`), as it was: an AMD RDNA2 driver (amdxc64
+    /// 32.0.21030.2001 and 32.0.21045.29003) dies with a null read at the start of the pipeline
+    /// build of a retail title's pixel shader in which 10 of 27 such ballots take a value that
+    /// derives from `WaveReadLaneAt`. With the 4 reads the same pipeline builds. The compare
+    /// path reads its quad the same way for the same driver (`lower_valu`, #134).
     fn ballot_ps(&mut self, cond: Value) -> (Value, Value) {
         let z = self.c(0);
         if self.s.m.const_u64(cond) == Some(0) {
             return (z, z);
         }
-        let qbit = self.andc(self.lane, 3);
         let own_b = self.u(cond);
-        let own = self.bin(BinOp::Shl, own_b, qbit);
-        let qx = self.s.quad_op(own, super::ops::QuadDir::ReadAcrossX);
-        let qy = self.s.quad_op(own, super::ops::QuadDir::ReadAcrossY);
-        let qd = self.s.quad_op(own, super::ops::QuadDir::ReadAcrossDiagonal);
-        let q0 = self.or(own, qx);
-        let q1 = self.or(qy, qd);
-        let q = self.or(q0, q1);
+        #[cfg(test)]
+        let quad_op = QUAD_OP_IN_TEST.with(|c| c.get());
+        #[cfg(not(test))]
+        let quad_op = false;
+        let q = if quad_op {
+            let qbit = self.andc(self.lane, 3);
+            let own = self.bin(BinOp::Shl, own_b, qbit);
+            let qx = self.s.quad_op(own, super::ops::QuadDir::ReadAcrossX);
+            let qy = self.s.quad_op(own, super::ops::QuadDir::ReadAcrossY);
+            let qd = self.s.quad_op(own, super::ops::QuadDir::ReadAcrossDiagonal);
+            let q0 = self.or(own, qx);
+            let q1 = self.or(qy, qd);
+            self.or(q0, q1)
+        } else {
+            // (bit `p` = the quad's member `p`, the lane `4k + p`, as `own << (lane & 3)` above)
+            let mut q = z;
+            for p in 0..4u32 {

Not certain about this one: the new form quad-reads every member's predicate without masking it by that member's EXEC bit, unlike the compare path it copies (lower_valu.rs:1344-1361 ANDs each member with lanebit_at(el, eh, qbase|p)). In a quad where some lanes are hardware-inactive (after a discard/demote, or switched off by divergent control flow at the ballot), QuadReadLaneAt of those lanes is undefined, and that bit goes into the mask through ballot_ps_quad. A later s_cbranch_vccnz / s_and_saveexec on it can see lanes set that should be clear. The quadOp form had the same gap.

<!-- greyfinch-sync:ivall/xcl:review-comment:4765731405 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#discussion_r4765731405). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T06:43:41Z. **Code review location:** `crates/xcl/src/gpu/dxil/lanes.rs`; line 932 ~~~~diff @@ -891,23 +898,45 @@ impl Lw { } /// Pixel-shader ballot including helper lanes (parity with HLSL `ballot_px` in - /// `recomp/emit.rs`): each quad collects its 4 bits through `QuadReadAcross*` - /// (which see helper lanes) and feeds them to [`Lw::ballot_ps_quad`]. Entry `EXEC` in - /// `setup_pixel` runs before `self.gfx` is set, so it stays live-lanes-only. + /// `recomp/emit.rs`): each quad collects its 4 bits through `QuadReadLaneAt` (which sees + /// helper lanes) and feeds them to [`Lw::ballot_ps_quad`]. Entry `EXEC` in `setup_pixel` + /// runs before `self.gfx` is set, so it stays live-lanes-only. + /// + /// Not through `QuadReadAcross*` (`quadOp`), as it was: an AMD RDNA2 driver (amdxc64 + /// 32.0.21030.2001 and 32.0.21045.29003) dies with a null read at the start of the pipeline + /// build of a retail title's pixel shader in which 10 of 27 such ballots take a value that + /// derives from `WaveReadLaneAt`. With the 4 reads the same pipeline builds. The compare + /// path reads its quad the same way for the same driver (`lower_valu`, #134). fn ballot_ps(&mut self, cond: Value) -> (Value, Value) { let z = self.c(0); if self.s.m.const_u64(cond) == Some(0) { return (z, z); } - let qbit = self.andc(self.lane, 3); let own_b = self.u(cond); - let own = self.bin(BinOp::Shl, own_b, qbit); - let qx = self.s.quad_op(own, super::ops::QuadDir::ReadAcrossX); - let qy = self.s.quad_op(own, super::ops::QuadDir::ReadAcrossY); - let qd = self.s.quad_op(own, super::ops::QuadDir::ReadAcrossDiagonal); - let q0 = self.or(own, qx); - let q1 = self.or(qy, qd); - let q = self.or(q0, q1); + #[cfg(test)] + let quad_op = QUAD_OP_IN_TEST.with(|c| c.get()); + #[cfg(not(test))] + let quad_op = false; + let q = if quad_op { + let qbit = self.andc(self.lane, 3); + let own = self.bin(BinOp::Shl, own_b, qbit); + let qx = self.s.quad_op(own, super::ops::QuadDir::ReadAcrossX); + let qy = self.s.quad_op(own, super::ops::QuadDir::ReadAcrossY); + let qd = self.s.quad_op(own, super::ops::QuadDir::ReadAcrossDiagonal); + let q0 = self.or(own, qx); + let q1 = self.or(qy, qd); + self.or(q0, q1) + } else { + // (bit `p` = the quad's member `p`, the lane `4k + p`, as `own << (lane & 3)` above) + let mut q = z; + for p in 0..4u32 { ~~~~ --- Not certain about this one: the new form quad-reads every member's predicate without masking it by that member's EXEC bit, unlike the compare path it copies (lower_valu.rs:1344-1361 ANDs each member with `lanebit_at(el, eh, qbase|p)`). In a quad where some lanes are hardware-inactive (after a discard/demote, or switched off by divergent control flow at the ballot), `QuadReadLaneAt` of those lanes is undefined, and that bit goes into the mask through `ballot_ps_quad`. A later `s_cbranch_vccnz` / `s_and_saveexec` on it can see lanes set that should be clear. The quadOp form had the same gap.
bmjask commented 2026-12-02 06:43:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T06:43:41Z.

Review: COMMENTED


Review of 4dd68427: 2 finding(s). 1 are inline. These are on lines outside the diff:

crates/xcl/src/gpu/recomp/emit.rs:6842: This only changes the direct translator. The HLSL path's ballot_px, which ballot_fn picks for every non-compare PS mask, carry ballots included, still builds its quad bits from QuadReadAcrossX/Y/Diagonal(own), the same quadOp-of-a-WaveReadLaneAt-derived-value pattern that crashes amdxc64. Any pixel shader that falls back to HLSL, or any run with XCL_DIRECT_DXIL=0, still gets carry ballots of v_readfirstlane-derived values lowered to dx.op.quadOp, and the RX 6700 XT driver still dies in CreateGraphicsPipelineState. Changing ballot_px in the HLSL prelude to four QuadReadLaneAt(own_b, p) << p would fix both paths. The Lw::ballot_ps doc comment (lanes.rs:900) still says it matches HLSL ballot_px, which is no longer true.


These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it.

<!-- greyfinch-sync:ivall/xcl:review:6145941935 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#pullrequestreview-6145941935). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T06:43:41Z. **Review:** COMMENTED --- Review of `4dd68427`: 2 finding(s). 1 are inline. These are on lines outside the diff: **`crates/xcl/src/gpu/recomp/emit.rs:6842`**: This only changes the direct translator. The HLSL path's `ballot_px`, which `ballot_fn` picks for every non-compare PS mask, carry ballots included, still builds its quad bits from `QuadReadAcrossX/Y/Diagonal(own)`, the same quadOp-of-a-WaveReadLaneAt-derived-value pattern that crashes amdxc64. Any pixel shader that falls back to HLSL, or any run with `XCL_DIRECT_DXIL=0`, still gets carry ballots of `v_readfirstlane`-derived values lowered to `dx.op.quadOp`, and the RX 6700 XT driver still dies in CreateGraphicsPipelineState. Changing `ballot_px` in the HLSL prelude to four `QuadReadLaneAt(own_b, p) << p` would fix both paths. The `Lw::ballot_ps` doc comment (lanes.rs:900) still says it matches HLSL `ballot_px`, which is no longer true. --- _These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it._
Decodere commented 2026-12-02 08:38:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-12-02T08:38:14Z.


merge-check
base: 1c8b551475
head: 4dd6842738
merge: clean trial merge into 1c8b551475e1e7bfe48f94448492a4c3544a2e0f (trial-merge commit e7a6a5435c8efc2a116b7777528c47f3af577bdc; git diff --check clean).
build: cargo build --workspace -> ok; cargo build --release -p xcl -> ok.
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture (43 targets) -> 2910 passed, 0 failed, 51 ignored (+1 new test vs main 1c8b5514; all 43 targets green including gpu_two_pass_cache_e2e). All 9 gpu::dxil::lanes::ps_ballot_tests passed with 0 skips, including direct_ps_non_vopc_carry_ballot_reads_its_quad_lane_by_lane and gpu_direct_ps_carry_ballot_draws_the_same_lane_by_lane_as_through_quadop (runs the wave32 matrix on RTX 4060; wave64 loop iteration requires native wave64 hardware). 28 SKIPPED lines — all hardware/environment-expected on RTX 4060 (22 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 2 no heap windows, 1 cannot disable the driver cache (Windows Developer Mode required)).
review: read the full merged diff (2 files: crates/xcl/src/gpu/dxil/kernel.rs +4, crates/xcl/src/gpu/dxil/lanes.rs +160/-22, total +164/-22). Lw::ballot_ps replaces the 3 QuadReadAcross* (quadOp) calls with 4 QuadReadLaneAt(own_b, p) << p reads ORed into q before ballot_ps_quad(q) and note_own_bit(lo, hi, cond), preserving exact bit layout (bit p = quad member p = lane 4k + p) and helper-lane visibility while avoiding the amdxc64 crash on quadOp fed by WaveReadLaneAt. Verified on the prior cache-invalidation disagreement: XCL_PS_BALLOT_QUADOP is removed (quad_op is unconditionally false outside #[cfg(test)]), and crates/xcl/build.rs:36-49, 143-155 hashes all non-*tests.rs files under src/gpu/dxil (including lanes.rs and kernel.rs) into XCL_DIRECT_DXIL_SOURCE_ID, so prior direct-DXIL cache entries are invalidated automatically. Non-blocking notes: HLSL ballot_px (recomp/emit.rs) still uses QuadReadAcross* for XCL_DIRECT_DXIL=0 (clean separate follow-up), and AMD GPU re-confirmation on this head remains valuable for needs:amd-test.
performance: Tier 3 60 s retail smoke (title: 29640639) shows no regression vs main 1c8b5514 baseline (1462 frames, presents per 2 s (last 3): 48 53 59, peak commit: 16043 MB): 1606 frames (+9.8%), presents per 2 s (last 3): 60 61 60, peak commit: 16402 MB (+2.2%), 0 device removals, 0 crashes.

xcl-smoke v1
commit: e7a6a5435c8efc2a116b7777528c47f3af577bdc
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1606 (PresentX 1606)
presents per 2 s (last 3): 60 61 60
device removals: 0
crashes: 0
peak commit: 16402 MB

verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)

<!-- greyfinch-sync:ivall/xcl:comment:7339719910 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7339719910). Originally posted by [Decodere](https://github.com/Decodere) on 2026-12-02T08:38:14Z. --- merge-check base: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f head: 4dd6842738511d3de90b272d1f87aa745d165799 merge: clean trial merge into `1c8b551475e1e7bfe48f94448492a4c3544a2e0f` (trial-merge commit `e7a6a5435c8efc2a116b7777528c47f3af577bdc`; `git diff --check` clean). build: `cargo build --workspace` -> ok; `cargo build --release -p xcl` -> ok. tests: `cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture` (43 targets) -> 2910 passed, 0 failed, 51 ignored (+1 new test vs `main` `1c8b5514`; all 43 targets green including `gpu_two_pass_cache_e2e`). All 9 `gpu::dxil::lanes::ps_ballot_tests` passed with 0 skips, including `direct_ps_non_vopc_carry_ballot_reads_its_quad_lane_by_lane` and `gpu_direct_ps_carry_ballot_draws_the_same_lane_by_lane_as_through_quadop` (runs the wave32 matrix on RTX 4060; wave64 loop iteration requires native wave64 hardware). 28 `SKIPPED` lines — all hardware/environment-expected on RTX 4060 (22 `no wave64`, 2 `no d3d12SDKLayers.dll`, 1 `no D3D12 debug layer`, 2 `no heap windows`, 1 `cannot disable the driver cache (Windows Developer Mode required)`). review: read the full merged diff (2 files: `crates/xcl/src/gpu/dxil/kernel.rs` +4, `crates/xcl/src/gpu/dxil/lanes.rs` +160/-22, total +164/-22). `Lw::ballot_ps` replaces the 3 `QuadReadAcross*` (`quadOp`) calls with 4 `QuadReadLaneAt(own_b, p) << p` reads ORed into `q` before `ballot_ps_quad(q)` and `note_own_bit(lo, hi, cond)`, preserving exact bit layout (`bit p = quad member p = lane 4k + p`) and helper-lane visibility while avoiding the `amdxc64` crash on `quadOp` fed by `WaveReadLaneAt`. Verified on the prior cache-invalidation disagreement: `XCL_PS_BALLOT_QUADOP` is removed (`quad_op` is unconditionally `false` outside `#[cfg(test)]`), and `crates/xcl/build.rs:36-49, 143-155` hashes all non-`*tests.rs` files under `src/gpu/dxil` (including `lanes.rs` and `kernel.rs`) into `XCL_DIRECT_DXIL_SOURCE_ID`, so prior direct-DXIL cache entries are invalidated automatically. Non-blocking notes: HLSL `ballot_px` (`recomp/emit.rs`) still uses `QuadReadAcross*` for `XCL_DIRECT_DXIL=0` (clean separate follow-up), and AMD GPU re-confirmation on this head remains valuable for `needs:amd-test`. performance: Tier 3 60 s retail smoke (`title: 29640639`) shows no regression vs `main` `1c8b5514` baseline (`1462` frames, `presents per 2 s (last 3): 48 53 59`, `peak commit: 16043 MB`): `1606` frames (+9.8%), `presents per 2 s (last 3): 60 61 60`, `peak commit: 16402 MB` (+2.2%), 0 device removals, 0 crashes. ``` xcl-smoke v1 commit: e7a6a5435c8efc2a116b7777528c47f3af577bdc gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1606 (PresentX 1606) presents per 2 s (last 3): 60 61 60 device removals: 0 crashes: 0 peak commit: 16402 MB ``` verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)
stijn-boer commented 2026-12-02 08:47:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by stijn-boer on 2026-12-02T08:47:53Z.


I tested 4dd68429 in a release build on a Radeon RX 9060 XT. The driver version recorded for this setup was 32.0.32029.2010. I ran title 7952987A for 720 seconds with the Series S (lockhart) profile with PSO tracing enabled.

The run got past pixel shader record 7381166e806847c9. The trace shows that the driver blob was absent and that the matching graphics PSO compile completed in 989 ms:

 driver compile start #2396: graphics PSO, 70444 B DXIL, record 7381166e806847c9, driver blob absent
 driver compile finish #2396: graphics PSO, 70444 B DXIL, 989 ms

The title stayed up until the configured 720-second cutoff and exited with code 0x0. XCL reported 1,799 frames shown.

AI use - Codex (GPT-6) checked the saved logs and drafted this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7339940036 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7339940036). Originally posted by [stijn-boer](https://github.com/stijn-boer) on 2026-12-02T08:47:53Z. --- I tested `4dd68429` in a release build on a Radeon RX 9060 XT. The driver version recorded for this setup was `32.0.32029.2010`. I ran title `7952987A` for 720 seconds with the Series S (`lockhart`) profile with PSO tracing enabled. The run got past pixel shader record `7381166e806847c9`. The trace shows that the driver blob was absent and that the matching graphics PSO compile completed in 989 ms: ```text driver compile start #2396: graphics PSO, 70444 B DXIL, record 7381166e806847c9, driver blob absent driver compile finish #2396: graphics PSO, 70444 B DXIL, 989 ms ``` The title stayed up until the configured 720-second cutoff and exited with code `0x0`. XCL reported 1,799 frames shown. AI use - Codex (GPT-6) checked the saved logs and drafted this comment.
bmjask commented 2026-12-02 14:13:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T14:13:33Z.


@Prime1997 could you take a look at this one for review and merge? My automated review notes are above, if any.

<!-- greyfinch-sync:ivall/xcl:comment:7348192828 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7348192828). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T14:13:33Z. --- @Prime1997 could you take a look at this one for review and merge? My automated review notes are above, if any.
Chrysana commented 2026-12-02 14:27:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Chrysana on 2026-12-02T14:27:34Z.


@ArtuArtaza 4dd68427 no longer merges into main, which is at 5eaadb54 now. It last merged cleanly at 1c8b5514. The conflict is one spot in crates/xcl/src/gpu/dxil/kernel.rs, translate_entry_with: main added a test-only thread-local for idioms at the same lines where this PR adds QUAD_OP_IN_TEST. Keeping both lines resolves it:

    #[cfg(test)]
    let idioms = super::idioms::IDIOMS_IN_TEST.with(|c| c.get());
    #[cfg(test)]
    let quad_op = super::lanes::QUAD_OP_IN_TEST.with(|c| c.get());
    // ...
            #[cfg(test)]
            super::idioms::IDIOMS_IN_TEST.with(|c| c.set(idioms));
            #[cfg(test)]
            super::lanes::QUAD_OP_IN_TEST.with(|c| c.set(quad_op));

I was about to run an AMD merge-check on 4dd68427 (RX 9070 XT and an RDNA2 iGPU, including the cold, warm and old-cache case from Gevroska's check). I'll run it on the rebased head instead, so it counts for the head that gets merged.

AI use: Claude Code (Claude Opus 5.5) found the conflict in a trial merge and drafted this note.

<!-- greyfinch-sync:ivall/xcl:comment:7348578330 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7348578330). Originally posted by [Chrysana](https://github.com/Chrysana) on 2026-12-02T14:27:34Z. --- @ArtuArtaza `4dd68427` no longer merges into `main`, which is at `5eaadb54` now. It last merged cleanly at `1c8b5514`. The conflict is one spot in `crates/xcl/src/gpu/dxil/kernel.rs`, `translate_entry_with`: `main` added a test-only thread-local for `idioms` at the same lines where this PR adds `QUAD_OP_IN_TEST`. Keeping both lines resolves it: ```rust #[cfg(test)] let idioms = super::idioms::IDIOMS_IN_TEST.with(|c| c.get()); #[cfg(test)] let quad_op = super::lanes::QUAD_OP_IN_TEST.with(|c| c.get()); // ... #[cfg(test)] super::idioms::IDIOMS_IN_TEST.with(|c| c.set(idioms)); #[cfg(test)] super::lanes::QUAD_OP_IN_TEST.with(|c| c.set(quad_op)); ``` I was about to run an AMD merge-check on `4dd68427` (RX 9070 XT and an RDNA2 iGPU, including the cold, warm and old-cache case from Gevroska's check). I'll run it on the rebased head instead, so it counts for the head that gets merged. AI use: Claude Code (Claude Opus 5.5) found the conflict in a trial merge and drafted this note.
Foniass commented 2026-12-02 15:08:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T15:08:40Z.


Follow-up review (head 1895d9e8, since 4dd68427, diff read, not a merge-check; checks red):

  • Earlier points: unchanged; this push is a rebase onto the current main, which threads its new IDIOMS_IN_TEST cell through the same translator-thread setup next to this PR's QUAD_OP_IN_TEST.

New: none.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7349801446 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7349801446). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-02T15:08:40Z. --- Follow-up review (head 1895d9e8, since 4dd68427, diff read, not a merge-check; checks red): - **Earlier points:** unchanged; this push is a rebase onto the current `main`, which threads its new `IDIOMS_IN_TEST` cell through the same translator-thread setup next to this PR's `QUAD_OP_IN_TEST`. New: none. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Pipodi commented 2026-12-02 16:23:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-12-02T16:23:33Z.


merge-check
base: 5eaadb54c1
head: 1895d9e8ea
merge: clean (merge commit 98a226d9, gpu/dxil/lanes.rs and kernel.rs, +164/-22)
build: cargo build --workspace -> ok (also cargo test --workspace --no-run on the merge and cargo build --release -p xcl on the clean head)
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2975 passed, 0 failed, 52 ignored; failing: none. 25 SKIPPED lines: 22 "no wave64", 2 "no heap windows", 1 "cannot disable the driver cache". All 9 ps_ballot_tests pass, including direct_ps_non_vopc_carry_ballot_reads_its_quad_lane_by_lane and gpu_direct_ps_carry_ballot_draws_the_same_lane_by_lane_as_through_quadop (wave32 legs only: this card has no wave64, and the test leaves those legs out without a SKIPPED line).
review: no blocking finding; whole diff read, with ballot_ps_quad, note_own_bit and HLSL ballot_px.

  1. The head is a rebase: git range-diff 4dd68427 -> 1895d9e8 differs only in kernel.rs context, where main's IDIOMS_IN_TEST now sits next to this PR's QUAD_OP_IN_TEST (Chrysana's resolution); the added and removed lines are identical. The patch id changes with that context (10c5b0b4 -> b896a344), so by #3041's rule earlier checks are not carried.
  2. Default path: quad_op is false outside cfg(test), so XCL always emits 4 QuadReadLaneAt(own_b, p) << p, the same nibble as own << (lane & 3) ORed with the 3 QuadReadAcross*, then the same ballot_ps_quad + note_own_bit. No env switch is left, so the translated cache cannot hold the quadOp form under the default identity.
  3. Not in this PR, not blocking (bmjask): HLSL ballot_px (recomp/emit.rs:6877) still builds its quad bits through QuadReadAcross*, so XCL_DIRECT_DXIL=0 and HLSL fallbacks keep the pattern, and the ballot_ps doc comment ("parity with HLSL ballot_px") is now only true of the bits, not of the ops.
  4. bmjask's inline point (quad reads of lanes not masked by their EXEC bit, unlike the compare path) applies to the quadOp form on main too; no change in behaviour from this PR.
    CI: the PR description check is red on this head because the description's PR-side xcl-smoke block names the pre-rebase head 4dd68427 ("needs an xcl-smoke block made on this PR's head commit 1895d9e8ea"). It blocks merging until the author reruns scripts/smoke.ps1 on 1895d9e8 and replaces the block. Build and test is green.
    performance: no regression measured; the shader cost is reasoned. Per pixel-shader carry ballot, main emits and + shl + 3 quadOp + 3 or; this PR emits 4 quadReadLaneAt + their shifts + ors, so one more cross-lane quad read and about 2 more ALU ops (the DXIL test asserts exactly 4 more lane reads and no quadOp). On NVIDIA both ops lower to a quad shuffle, so the cost is about one shuffle per ballot, small next to the rest of a pixel shader even in the worst case CharlyRien counted (95 ballots in one shader); there is no memory cost. Measured on NVIDIA: retail title, 60 s, XCL_PREPARE=0, the same scripted presses, one warm-up run, gamesave moved aside before each run: frames 1601 vs main's 1609 (99.5 %), peak commit 19311 vs 18303 MB (105.5 %, under 125 %), no device removal or crash on either side. The run is capped at 60 presents per second, so it does not isolate the per-pixel cost. The AMD crash itself is not covered here (stijn-boer's RX 9060 XT run on the previous head is).

main 5eaadb54:

xcl-smoke v1
commit: 5eaadb54c14e0fc29597b2a1689d7dbd83491303
gpu: NVIDIA GeForce RTX 4090
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1609 (PresentX 1609)
presents per 2 s (last 3): 60 60 61
device removals: 0
crashes: 0
peak commit: 18303 MB

this PR 1895d9e8 (clean checkout):

xcl-smoke v1
commit: 1895d9e8ea3c64f7e91f4a0211f2a7aacff5c525
gpu: NVIDIA GeForce RTX 4090
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1601 (PresentX 1601)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 19311 MB

verdict: safe to merge (the code; the red PR description check still needs the author's smoke block on 1895d9e8)
hardware / tool and model: NVIDIA GeForce RTX 4090 24 GB, driver 621.40; Intel Core i9-13900K, 32 GB; Windows 11 build 26300; rustc 1.100.0; tests debug, smoke release. Claude Code, Claude Opus 5.5 read the diff, ran the build, the suite and the smoke run of the head (main's block is from an earlier run of 5eaadb54 on the same machine today), and wrote this check.

<!-- greyfinch-sync:ivall/xcl:comment:7351876562 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7351876562). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-12-02T16:23:33Z. --- merge-check base: 5eaadb54c14e0fc29597b2a1689d7dbd83491303 head: 1895d9e8ea3c64f7e91f4a0211f2a7aacff5c525 merge: clean (merge commit 98a226d9, gpu/dxil/lanes.rs and kernel.rs, +164/-22) build: cargo build --workspace -> ok (also `cargo test --workspace --no-run` on the merge and `cargo build --release -p xcl` on the clean head) tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2975 passed, 0 failed, 52 ignored; failing: none. 25 SKIPPED lines: 22 "no wave64", 2 "no heap windows", 1 "cannot disable the driver cache". All 9 `ps_ballot_tests` pass, including `direct_ps_non_vopc_carry_ballot_reads_its_quad_lane_by_lane` and `gpu_direct_ps_carry_ballot_draws_the_same_lane_by_lane_as_through_quadop` (wave32 legs only: this card has no wave64, and the test leaves those legs out without a SKIPPED line). review: no blocking finding; whole diff read, with `ballot_ps_quad`, `note_own_bit` and HLSL `ballot_px`. 1) The head is a rebase: `git range-diff` 4dd68427 -> 1895d9e8 differs only in `kernel.rs` context, where main's `IDIOMS_IN_TEST` now sits next to this PR's `QUAD_OP_IN_TEST` (Chrysana's resolution); the added and removed lines are identical. The patch id changes with that context (10c5b0b4 -> b896a344), so by #3041's rule earlier checks are not carried. 2) Default path: `quad_op` is `false` outside `cfg(test)`, so XCL always emits 4 `QuadReadLaneAt(own_b, p) << p`, the same nibble as `own << (lane & 3)` ORed with the 3 `QuadReadAcross*`, then the same `ballot_ps_quad` + `note_own_bit`. No env switch is left, so the translated cache cannot hold the `quadOp` form under the default identity. 3) Not in this PR, not blocking (bmjask): HLSL `ballot_px` (`recomp/emit.rs:6877`) still builds its quad bits through `QuadReadAcross*`, so `XCL_DIRECT_DXIL=0` and HLSL fallbacks keep the pattern, and the `ballot_ps` doc comment ("parity with HLSL `ballot_px`") is now only true of the bits, not of the ops. 4) bmjask's inline point (quad reads of lanes not masked by their EXEC bit, unlike the compare path) applies to the `quadOp` form on main too; no change in behaviour from this PR. CI: the `PR description` check is red on this head because the description's PR-side `xcl-smoke` block names the pre-rebase head 4dd68427 ("needs an `xcl-smoke` block made on this PR's head commit 1895d9e8ea3c"). It blocks merging until the author reruns `scripts/smoke.ps1` on 1895d9e8 and replaces the block. `Build and test` is green. performance: no regression measured; the shader cost is reasoned. Per pixel-shader carry ballot, main emits `and` + `shl` + 3 `quadOp` + 3 `or`; this PR emits 4 `quadReadLaneAt` + their shifts + `or`s, so one more cross-lane quad read and about 2 more ALU ops (the DXIL test asserts exactly 4 more lane reads and no `quadOp`). On NVIDIA both ops lower to a quad shuffle, so the cost is about one shuffle per ballot, small next to the rest of a pixel shader even in the worst case CharlyRien counted (95 ballots in one shader); there is no memory cost. Measured on NVIDIA: retail title, 60 s, XCL_PREPARE=0, the same scripted presses, one warm-up run, gamesave moved aside before each run: frames 1601 vs main's 1609 (99.5 %), peak commit 19311 vs 18303 MB (105.5 %, under 125 %), no device removal or crash on either side. The run is capped at 60 presents per second, so it does not isolate the per-pixel cost. The AMD crash itself is not covered here (stijn-boer's RX 9060 XT run on the previous head is). main 5eaadb54: ``` xcl-smoke v1 commit: 5eaadb54c14e0fc29597b2a1689d7dbd83491303 gpu: NVIDIA GeForce RTX 4090 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1609 (PresentX 1609) presents per 2 s (last 3): 60 60 61 device removals: 0 crashes: 0 peak commit: 18303 MB ``` this PR 1895d9e8 (clean checkout): ``` xcl-smoke v1 commit: 1895d9e8ea3c64f7e91f4a0211f2a7aacff5c525 gpu: NVIDIA GeForce RTX 4090 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1601 (PresentX 1601) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 19311 MB ``` verdict: safe to merge (the code; the red `PR description` check still needs the author's smoke block on 1895d9e8) hardware / tool and model: NVIDIA GeForce RTX 4090 24 GB, driver 621.40; Intel Core i9-13900K, 32 GB; Windows 11 build 26300; rustc 1.100.0; tests debug, smoke release. Claude Code, Claude Opus 5.5 read the diff, ran the build, the suite and the smoke run of the head (main's block is from an earlier run of 5eaadb54 on the same machine today), and wrote this check.
stijn-boer commented 2026-12-03 12:59:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by stijn-boer on 2026-12-03T12:59:34Z.


merge-check
base: a815de932c
head: 1895d9e8ea
merge: clean (local merge 44e06ae10d50853649b1963816563e43beeb2025; git diff --check clean)
build: cargo build --release -p xcl passed on both trees
tests: cargo test -p xcl --lib ps_ballot_tests -- --test-threads=1 --show-output --nocapture -> 10 passed, 0 failed, 0 ignored, 0 skips on the merge. The full workspace suite was outside this AMD run. An independent same-head NVIDIA merge-check reported 2,975 passed, 0 failed, and 52 ignored.
review: the AMD GPU pixel comparison passed and #3455 compiled the target PSO that crashes on main. The later AMD compiler crash has the same exception, DLL offset, fault address, and driver version as an independent report on a main revision without #3455. That report exercised a different PSO record.
performance: 60 s smoke for 2c508222, 1,495 to 1,603 frames and 16,165 to 11,684 MB peak commit. Both runs completed with zero device removals and crashes. One startup pair does not establish a repeatable performance delta.
verdict: safe to merge: this head fixes the reproduced AMD crash at the target PSO, the focused AMD checks passed, and the independent same-head workspace suite passed. The later crash matches a pre-existing AMD driver signature. The exact later mesh PSO still lacks a matched baseline run.
hardware / tool and model: Radeon RX 9060 XT (32.0.32029.2010), Ryzen 7 5700X, Windows 10 21H2 build 19044.6332 / OpenAI Codex (GPT-6, exact variant unavailable)

Independent same-head workspace results

AMD retest of #3455 on plain main

Tested #3455 head 1895d9e8ea3c64f7e91f4a0211f2a7aacff5c525 on main a815de932c4dc8da3b383ca44f4b094aa406fec9, which already includes #3707 through its upstream merge. #3455 was the only added PR. Local merge 44e06ae10d50853649b1963816563e43beeb2025 and git diff --check were clean.

Setup: Radeon RX 9060 XT (driver 32.0.32029.2010), Ryzen 7 5700X, Windows 10 21H2 build 19044.6332, Rust 1.100.0, Agility SDK 1.620.2 with matching debug layer, and DXC/DXIL 1.9.2609.5. Separate build directories and fresh XCL data roots.

  • cargo test -p xcl --lib ps_ballot_tests -- --test-threads=1 --show-output --nocapture reported 10 passed, 0 failed, 0 ignored, 0 skips. The two added checks also passed in isolation. The GPU check compared the lane-by-lane and quad-op paths pixel by pixel. The separate wave64 helper-lane test passed without skipping.
  • cargo build --release -p xcl passed on both trees. Ran scripts/smoke.ps1 -Game <local folder> -Seconds 60 -Xcl <release binary> for 2c508222, with XCL_UMA_DRIVER=mixed and PSO tracing enabled.
Build Exit Frames Peak commit Device removals / crashes
Plain main 0x0 1,495 16,165 MB 0 / 0
main + #3455 0x0 1,603 11,684 MB 0 / 0

In this pair the merge logged 7.2% more frames and 27.7% lower peak commit. Both runs ended near 60 presents per two seconds. A single startup smoke pair does not isolate shader cost or establish a repeatable performance delta.

Coverage limits: Neither trace contained the previously reported PSO record 7381166e806847c9. This retest verifies the synthetic GPU parity case and retail startup, with the original retail PSO case and full workspace suite still unverified in this run.

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

Extended AMD PSO retest

Both builds used the 720 s cutoff, the lockhart profile, PSO tracing, separate fresh XCL data roots, and explicitly separate empty XCL_DXIL_CACHE directories for fixture 7952987A. The AMD driver cache was left enabled. The earlier 60 s smoke pair used fresh XCL data roots but did not isolate the default DXIL cache. The long test used the same base and PR head, with local merge 2ae408e456b4907aa9377c093f44b4e0914bbd67.

Build Target graphics PSO 7381166e806847c9 Later result
Plain main Compile #5201 began at 144.141 s, driver blob absent. No finish; amdxc64.dll+0x7380f8 raised 0xc0000005 at 144.422 s. Process exited 0xc0000005; peak commit 27,771 MB.
main + #3455 Compile #3319 began at 148.543 s, driver blob absent. The matching finish reported 3 ms. A later mesh PSO compile (#5809) started at 285.085 s. The same worker hit 0xc0000005 at amdxc64.dll+0x861b9f at 288.790 s. Process exited 0xc0000005; peak commit 34,795 MB.

The #3455 process had already exited when I checked to stop it early. The target compile fix was verified. The baseline crashed before it reached the later mesh PSO, so this pair cannot tell whether that later crash also occurs on main. The long runs ended at different points and do not provide a matched performance comparison.

Prior AMD crash evidence: An RX 9070 XT report on main without #3455, at revision 078358a0 on the same driver 32.0.32029.2010, recorded 0xc0000005 in amdxc64.dll+0x861b9f reading address 0x8. The PSO records differ, so this establishes that the signature predates #3455 while the exact later mesh case remains unpaired.

<!-- greyfinch-sync:ivall/xcl:comment:7379150497 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7379150497). Originally posted by [stijn-boer](https://github.com/stijn-boer) on 2026-12-03T12:59:34Z. --- merge-check base: a815de932c4dc8da3b383ca44f4b094aa406fec9 head: 1895d9e8ea3c64f7e91f4a0211f2a7aacff5c525 merge: clean (local merge 44e06ae10d50853649b1963816563e43beeb2025; git diff --check clean) build: cargo build --release -p xcl passed on both trees tests: cargo test -p xcl --lib ps_ballot_tests -- --test-threads=1 --show-output --nocapture -> 10 passed, 0 failed, 0 ignored, 0 skips on the merge. The full workspace suite was outside this AMD run. An independent same-head NVIDIA merge-check reported 2,975 passed, 0 failed, and 52 ignored. review: the AMD GPU pixel comparison passed and #3455 compiled the target PSO that crashes on main. The later AMD compiler crash has the same exception, DLL offset, fault address, and driver version as an independent report on a main revision without #3455. That report exercised a different PSO record. performance: 60 s smoke for 2c508222, 1,495 to 1,603 frames and 16,165 to 11,684 MB peak commit. Both runs completed with zero device removals and crashes. One startup pair does not establish a repeatable performance delta. verdict: safe to merge: this head fixes the reproduced AMD crash at the target PSO, the focused AMD checks passed, and the independent same-head workspace suite passed. The later crash matches a pre-existing AMD driver signature. The exact later mesh PSO still lacks a matched baseline run. hardware / tool and model: Radeon RX 9060 XT (32.0.32029.2010), Ryzen 7 5700X, Windows 10 21H2 build 19044.6332 / OpenAI Codex (GPT-6, exact variant unavailable) [Independent same-head workspace results](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7351876562) **AMD retest of #3455 on plain main** Tested #3455 head `1895d9e8ea3c64f7e91f4a0211f2a7aacff5c525` on `main` `a815de932c4dc8da3b383ca44f4b094aa406fec9`, which already includes #3707 through its upstream merge. #3455 was the only added PR. Local merge `44e06ae10d50853649b1963816563e43beeb2025` and `git diff --check` were clean. **Setup:** Radeon RX 9060 XT (driver 32.0.32029.2010), Ryzen 7 5700X, Windows 10 21H2 build 19044.6332, Rust 1.100.0, Agility SDK 1.620.2 with matching debug layer, and DXC/DXIL 1.9.2609.5. Separate build directories and fresh XCL data roots. - `cargo test -p xcl --lib ps_ballot_tests -- --test-threads=1 --show-output --nocapture` reported **10 passed, 0 failed, 0 ignored, 0 skips**. The two added checks also passed in isolation. The GPU check compared the lane-by-lane and quad-op paths pixel by pixel. The separate wave64 helper-lane test passed without skipping. - `cargo build --release -p xcl` passed on both trees. Ran `scripts/smoke.ps1 -Game <local folder> -Seconds 60 -Xcl <release binary>` for `2c508222`, with `XCL_UMA_DRIVER=mixed` and PSO tracing enabled. | Build | Exit | Frames | Peak commit | Device removals / crashes | |---|---|---:|---:|---:| | Plain `main` | `0x0` | 1,495 | 16,165 MB | 0 / 0 | | `main` + #3455 | `0x0` | 1,603 | 11,684 MB | 0 / 0 | In this pair the merge logged 7.2% more frames and 27.7% lower peak commit. Both runs ended near 60 presents per two seconds. A single startup smoke pair does not isolate shader cost or establish a repeatable performance delta. **Coverage limits:** Neither trace contained the previously reported PSO record `7381166e806847c9`. This retest verifies the synthetic GPU parity case and retail startup, with the original retail PSO case and full workspace suite still unverified in this run. **AI use:** OpenAI Codex (GPT-6, exact variant unavailable) prepared the builds, ran the tests, and drafted this report. **Extended AMD PSO retest** Both builds used the 720 s cutoff, the `lockhart` profile, PSO tracing, separate fresh XCL data roots, and explicitly separate empty `XCL_DXIL_CACHE` directories for fixture `7952987A`. The AMD driver cache was left enabled. The earlier 60 s smoke pair used fresh XCL data roots but did not isolate the default DXIL cache. The long test used the same base and PR head, with local merge `2ae408e456b4907aa9377c093f44b4e0914bbd67`. | Build | Target graphics PSO `7381166e806847c9` | Later result | |---|---|---| | Plain `main` | Compile #5201 began at 144.141 s, driver blob absent. No finish; `amdxc64.dll+0x7380f8` raised `0xc0000005` at 144.422 s. | Process exited `0xc0000005`; peak commit 27,771 MB. | | `main` + #3455 | Compile #3319 began at 148.543 s, driver blob absent. The matching finish reported 3 ms. | A later mesh PSO compile (#5809) started at 285.085 s. The same worker hit `0xc0000005` at `amdxc64.dll+0x861b9f` at 288.790 s. Process exited `0xc0000005`; peak commit 34,795 MB. | The #3455 process had already exited when I checked to stop it early. The target compile fix was verified. The baseline crashed before it reached the later mesh PSO, so this pair cannot tell whether that later crash also occurs on main. The long runs ended at different points and do not provide a matched performance comparison. **Prior AMD crash evidence:** An [RX 9070 XT report on main without #3455](https://github.com/xcl-dev/xcl/issues/42#issuecomment-7364124885), at revision 078358a0 on the same driver 32.0.32029.2010, recorded 0xc0000005 in amdxc64.dll+0x861b9f reading address 0x8. The PSO records differ, so this establishes that the signature predates #3455 while the exact later mesh case remains unpaired.
ArtuArtaza commented 2026-12-03 14:33:20 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ArtuArtaza on 2026-12-03T14:33:20Z.


Test report on RDNA2 (author's run, not a merge-check): RX 6700 XT, driver 32.0.21045.29003, Windows 11 26200, rustc 1.100.0.

This PR merged into main a815de93, retail title, 240 s, XCL_DEVICE_TYPE=lockhart XCL_PREPARE=0 XCL_PSO_AHEAD=0 XCL_PSO_TRACE=1, A every 15 s from 30 s, two runs each:

  • main a815de93: driver compile start #2258: graphics PSO, 70024 B DXIL, record 7381166e806847c9 at 61.8 s, then unhandled exception 0xc0000005 in amdxc64.dll+0x671f78 at 62.0 s. The other run did not ask for that pipeline in its 240 s.
  • merged: the pipeline of record 7381166e806847c9 builds (716 ms at 137.8 s; from the driver's cache at 58.8 s in the second run). Both runs reach 240 s (2804 and 2839 frames), 0 device removals, 0 crashes.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 on the merge: 3014 passed, 6 failed, 56 ignored, 4 SKIPPED. Main a815de93: 3013 passed, the same 6 failed (5 tests, the one #3473 fixes among them), 56 ignored. All 10 ps_ballot_tests pass.

(Runs and this note by Claude Code with Claude Opus 5.5, from my account.)

<!-- greyfinch-sync:ivall/xcl:comment:7381641371 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7381641371). Originally posted by [ArtuArtaza](https://github.com/ArtuArtaza) on 2026-12-03T14:33:20Z. --- Test report on RDNA2 (author's run, not a merge-check): RX 6700 XT, driver 32.0.21045.29003, Windows 11 26200, rustc 1.100.0. This PR merged into main `a815de93`, retail title, 240 s, `XCL_DEVICE_TYPE=lockhart XCL_PREPARE=0 XCL_PSO_AHEAD=0 XCL_PSO_TRACE=1`, A every 15 s from 30 s, two runs each: - main `a815de93`: `driver compile start #2258: graphics PSO, 70024 B DXIL, record 7381166e806847c9` at 61.8 s, then `unhandled exception 0xc0000005 in amdxc64.dll+0x671f78` at 62.0 s. The other run did not ask for that pipeline in its 240 s. - merged: the pipeline of record `7381166e806847c9` builds (716 ms at 137.8 s; from the driver's cache at 58.8 s in the second run). Both runs reach 240 s (2804 and 2839 frames), 0 device removals, 0 crashes. - `cargo test --workspace --no-fail-fast -- --test-threads=4` on the merge: 3014 passed, 6 failed, 56 ignored, 4 SKIPPED. Main `a815de93`: 3013 passed, the same 6 failed (5 tests, the one #3473 fixes among them), 56 ignored. All 10 `ps_ballot_tests` pass. (Runs and this note by Claude Code with Claude Opus 5.5, from my account.)
stijn-boer commented 2026-12-03 15:00:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by stijn-boer on 2026-12-03T15:00:40Z.


@throny could you take a look at this one for review and merge?

<!-- greyfinch-sync:ivall/xcl:comment:7382408718 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3455#issuecomment-7382408718). Originally posted by [stijn-boer](https://github.com/stijn-boer) on 2026-12-03T15:00:40Z. --- @throny could you take a look at this one for review and merge?
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/3455:upstream-pr/3455'
git switch 'upstream-pr/3455'

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