Recompiler: SDWA register uses come from the extension dword #805

Open
upipibi wants to merge 1 commit from upstream-pr/811 into main
upipibi commented 2026-11-24 05:45:52 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by upipibi on 2026-11-24T05:45:52Z.


rdna2::sgpr_uses and rdna2::vgpr_uses read an SDWA instruction as its base dword only. A source whose S bit is set (an SGPR) is no SGPR read; the second one is reported as a VGPR read of the register with the same number; and the SGPR pair a v_cmp_*_sdwa writes instead of VCC (SD) is no write. For v_cmp_lt_f32_sdwa s5, v1, s2, main gives no SGPR at all and a read of v1 and v2.

What that reaches (all on main e50836b):

  • constant_samplers (recomp/mod.rs, used by translate) keeps a constant in an SGPR the compare has overwritten, so an image instruction after it still gets static sampler words.
  • geometry_wave32_hazards and mesh_wave's mask state do not take the compare's result for a mask (s_bcnt1_i32_b32 of it is no "whole-wave mask reduction").
  • the first-use lines of the shader report (shaders.rs).

x64_masks.rs reads the extension dword itself (x64_masks::uses) and is unchanged: it builds register bit sets per operand with its own per-lane rules, so using the shared function there would be a rewrite, not a small change.

Independent of #790 / #791 (other hunks of rdna2.rs; the three merge cleanly in any order).

What is in it

  • crates/xcl/src/gpu/rdna2.rs: sgpr_uses adds the SDWA scalar sources (S0 / S1; an inline constant or NULL is no register) and the compare's SDST pair (not for v_cmpx, which writes EXEC); vgpr_uses does not count a VSRC1 whose S1 is set. Test sdwa_register_uses_come_from_the_extension_dword (7 words).
  • crates/xcl/src/gpu/recomp/tests.rs: sdwa_compare_destination_is_a_write_to_the_analyses – the two caller-visible effects above on hand-built programs.

Tested

  • NVIDIA GeForce RTX 3070 8 GB, driver 616.56 (32.0.16.1656), 32-lane waves only; Ryzen 9 5950X; Windows 11 Pro 26100; Rust 1.100.0 MSVC, debug.
  • The two new tests on main's rdna2.rs: both fail – (([], []), ([1, 2], [])) where (([2], [5, 6]), ([1], [])) is expected; no "whole-wave mask reduction"; and constant_samplers returns the sampler words for the image instruction after the compare too ([(16, [1, 2, 3, 4]), (32, [1, 2, 3, 4])]). With the change both pass.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 on 204f4b9: two runs. Run 2: 706 passed, 0 failed, 41 ignored (xcl lib: 665 passed, 0 failed, 21 ignored). Run 1: 703 passed, 3 failed, 41 ignored – placed_title_textures_share_vram_and_preserve_pixels ("cubemap extra_pages must be reused at same va") and the two tests its poisoned lock takes with it: the failure of #718, which main shows on this machine too.
  • SKIPPED GPU tests: 2, both no wave64: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.

Regression run

From eizispark's run (https://github.com/ivall/xcl/pull/811#issuecomment-7124196969), thanks:

main:

xcl-smoke v1
commit: beaa245ca04e212f064efc7cafcdce104bc5c0a2
gpu: AMD Radeon RX 9070 XT
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1660 (PresentX 1660)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14862 MB

PR:

xcl-smoke v1
commit: 204f4b91f12204b0c386e9c1599999d76b428f51
gpu: AMD Radeon RX 9070 XT
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1661 (PresentX 1661)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14859 MB

Not tested

  • No retail title, no XCL_SAMPLE_* data: the game-data tests passed without running. Whether a retail shader has an SDWA compare into an SGPR is not known to me.
  • AMD / Intel GPUs, wave64 hardware.
  • No D3D12 debug layer on this machine (Graphics Tools not installed): test_title_draws_with_a_root_signature_under_the_debug_layer and uploads_start_from_each_subresources_state return early.
  • The SDWA compare's implicit VCC write (SD clear) is still not reported, as for the plain VOPC form.

AI use

  • Claude Code with Claude Fable 5.2 (Anthropic): found it while reading the SDWA decoding for #790, wrote the code, the tests and this description, and ran the tests.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5466833461 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/811). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-24T05:45:52Z. --- `rdna2::sgpr_uses` and `rdna2::vgpr_uses` read an SDWA instruction as its base dword only. A source whose S bit is set (an SGPR) is no SGPR read; the second one is reported as a VGPR read of the register with the same number; and the SGPR pair a `v_cmp_*_sdwa` writes instead of VCC (SD) is no write. For `v_cmp_lt_f32_sdwa s5, v1, s2`, `main` gives no SGPR at all and a read of v1 and v2. What that reaches (all on `main` e50836b): - `constant_samplers` (`recomp/mod.rs`, used by `translate`) keeps a constant in an SGPR the compare has overwritten, so an image instruction after it still gets static sampler words. - `geometry_wave32_hazards` and `mesh_wave`'s mask state do not take the compare's result for a mask (`s_bcnt1_i32_b32` of it is no "whole-wave mask reduction"). - the first-use lines of the shader report (`shaders.rs`). `x64_masks.rs` reads the extension dword itself (`x64_masks::uses`) and is unchanged: it builds register bit sets per operand with its own per-lane rules, so using the shared function there would be a rewrite, not a small change. Independent of #790 / #791 (other hunks of `rdna2.rs`; the three merge cleanly in any order). **What is in it** - `crates/xcl/src/gpu/rdna2.rs`: `sgpr_uses` adds the SDWA scalar sources (S0 / S1; an inline constant or NULL is no register) and the compare's SDST pair (not for `v_cmpx`, which writes EXEC); `vgpr_uses` does not count a VSRC1 whose S1 is set. Test `sdwa_register_uses_come_from_the_extension_dword` (7 words). - `crates/xcl/src/gpu/recomp/tests.rs`: `sdwa_compare_destination_is_a_write_to_the_analyses` – the two caller-visible effects above on hand-built programs. **Tested** - NVIDIA GeForce RTX 3070 8 GB, driver 616.56 (32.0.16.1656), 32-lane waves only; Ryzen 9 5950X; Windows 11 Pro 26100; Rust 1.100.0 MSVC, debug. - The two new tests on `main`'s `rdna2.rs`: both fail – `(([], []), ([1, 2], []))` where `(([2], [5, 6]), ([1], []))` is expected; no "whole-wave mask reduction"; and `constant_samplers` returns the sampler words for the image instruction after the compare too (`[(16, [1, 2, 3, 4]), (32, [1, 2, 3, 4])]`). With the change both pass. - `cargo test --workspace --no-fail-fast -- --test-threads=4` on 204f4b9: two runs. Run 2: 706 passed, 0 failed, 41 ignored (xcl lib: 665 passed, 0 failed, 21 ignored). Run 1: 703 passed, 3 failed, 41 ignored – `placed_title_textures_share_vram_and_preserve_pixels` ("cubemap extra_pages must be reused at same va") and the two tests its poisoned lock takes with it: the failure of #718, which `main` shows on this machine too. - SKIPPED GPU tests: 2, both `no wave64`: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. **Regression run** From eizispark's run (https://github.com/ivall/xcl/pull/811#issuecomment-7124196969), thanks: main: ``` xcl-smoke v1 commit: beaa245ca04e212f064efc7cafcdce104bc5c0a2 gpu: AMD Radeon RX 9070 XT title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1660 (PresentX 1660) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14862 MB ``` PR: ``` xcl-smoke v1 commit: 204f4b91f12204b0c386e9c1599999d76b428f51 gpu: AMD Radeon RX 9070 XT title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1661 (PresentX 1661) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14859 MB ``` **Not tested** - No retail title, no `XCL_SAMPLE_*` data: the game-data tests passed without running. Whether a retail shader has an SDWA compare into an SGPR is not known to me. - AMD / Intel GPUs, wave64 hardware. - No D3D12 debug layer on this machine (Graphics Tools not installed): `test_title_draws_with_a_root_signature_under_the_debug_layer` and `uploads_start_from_each_subresources_state` return early. - The SDWA compare's implicit VCC write (SD clear) is still not reported, as for the plain VOPC form. **AI use** - Claude Code with Claude Fable 5.2 (Anthropic): found it while reading the SDWA decoding for #790, wrote the code, the tests and this description, and ran the tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ethandepstein-del commented 2026-11-24 07:06:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ethandepstein-del on 2026-11-24T05:57:39Z.


Independent native Windows NVIDIA RTX 5080 (wave32) + D3D12 debug layer build/test run and code review at head 204f4b91f12204b0c386e9c1599999d76b428f51.

Code Review

  • Clean fix in rdna2::{sgpr_uses, vgpr_uses}: reads SDWA S0 (bit 23) and S1 (bit 31) from the extension dword so SGPR operands are tracked in sgpr_uses (and excluded from vgpr_uses when VSRC1 has S1=1), and tracks ENC_VOPC SDST pairs (ext[14:8] when SD=1 and not V_CMPX / NULL). Both unit tests cleanly verify decoder and downstream recompiler analyses. No issues found.

Tested

  • Environment: NVIDIA GeForce RTX 5080 (16 GB, wave32, driver 617.42 / 32.0.16.1742), Windows 11 Pro 25H2 (26200.9974), D3D12 debug layer installed (d3d12SDKLayers.dll), rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC from Windows SDK 10.0.26100.0, debug build.
  • Command: cargo build --workspace && cargo test --workspace -- --test-threads=4
  • Result: 706 passed, 0 failed, 41 ignored (0 new warnings).
  • PR-specific tests (2/2 ok):
    • gpu::rdna2::tests::sdwa_register_uses_come_from_the_extension_dword
    • gpu::recomp::tests::sdwa_compare_destination_is_a_write_to_the_analyses
  • SKIPPED (2):
    • gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask (no wave64)
    • gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware (no wave64)

Not tested

  • AMD/wave64 hardware, release build, and retail titles.

AI use: Antigravity (Gemini 4 Neon reviewed the diff; Gemini 4 Hydrogen ran the RTX 5080 workspace tests) drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7123438054 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/811#issuecomment-7123438054). Originally posted by [ethandepstein-del](https://github.com/ethandepstein-del) on 2026-11-24T05:57:39Z. --- Independent native Windows **NVIDIA RTX 5080 (wave32)** + **D3D12 debug layer** build/test run and code review at head `204f4b91f12204b0c386e9c1599999d76b428f51`. ### Code Review - Clean fix in `rdna2::{sgpr_uses, vgpr_uses}`: reads SDWA `S0` (bit 23) and `S1` (bit 31) from the extension dword so SGPR operands are tracked in `sgpr_uses` (and excluded from `vgpr_uses` when `VSRC1` has `S1=1`), and tracks `ENC_VOPC` `SDST` pairs (`ext[14:8]` when `SD=1` and not `V_CMPX` / `NULL`). Both unit tests cleanly verify decoder and downstream recompiler analyses. No issues found. ### Tested - **Environment:** NVIDIA GeForce RTX 5080 (16 GB, wave32, driver `617.42` / `32.0.16.1742`), Windows 11 Pro 25H2 (`26200.9974`), D3D12 debug layer installed (`d3d12SDKLayers.dll`), `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC, DXC from Windows SDK `10.0.26100.0`, debug build. - **Command:** `cargo build --workspace && cargo test --workspace -- --test-threads=4` - **Result:** **706 passed, 0 failed, 41 ignored** (0 new warnings). - **PR-specific tests (2/2 `ok`):** - `gpu::rdna2::tests::sdwa_register_uses_come_from_the_extension_dword` - `gpu::recomp::tests::sdwa_compare_destination_is_a_write_to_the_analyses` - **SKIPPED (2):** - `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask` (`no wave64`) - `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` (`no wave64`) ### Not tested - AMD/wave64 hardware, release build, and retail titles. **AI use:** Antigravity (Gemini 4 Neon reviewed the diff; Gemini 4 Hydrogen ran the RTX 5080 workspace tests) drafted this report.
MesshM commented 2026-11-24 07:06:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by MesshM on 2026-11-24T06:06:50Z.


Test run of 204f4b91f12204b0c386e9c1599999d76b428f51 on AMD RDNA4. I merged it onto current main beaa245 locally (clean merge) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 715 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 674 passed, 0 failed, 21 ignored
  • 0 SKIPPED; sdwa_register_uses_come_from_the_extension_dword passes.

Review: src0 now comes from the extension dword's bits [7:0] with S0 at bit 23, src1's S1 at bit 31, and a v_cmp_*_sdwa with SD set writes its SGPR pair instead of VCC (not for v_cmpx), with null (125) left out. That matches the SDWA layout in the RDNA2 ISA. I found nothing to change.

Not tested: no retail title or regression run (I have no unpacked game), no XCL_SAMPLE_* tests, release build; the PR's head on its old base was not run, only its merge onto main.

Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

<!-- greyfinch-sync:ivall/xcl:comment:7123597512 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/811#issuecomment-7123597512). Originally posted by [MesshM](https://github.com/MesshM) on 2026-11-24T06:06:50Z. --- Test run of `204f4b91f12204b0c386e9c1599999d76b428f51` on AMD RDNA4. I merged it onto current `main` `beaa245` locally (clean merge) and tested that tree. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on the merge: **715 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 674 passed, 0 failed, 21 ignored - **0 `SKIPPED`**; `sdwa_register_uses_come_from_the_extension_dword` passes. **Review:** src0 now comes from the extension dword's bits [7:0] with S0 at bit 23, src1's S1 at bit 31, and a `v_cmp_*_sdwa` with SD set writes its SGPR pair instead of VCC (not for `v_cmpx`), with null (125) left out. That matches the SDWA layout in the RDNA2 ISA. I found nothing to change. **Not tested:** no retail title or regression run (I have no unpacked game), no `XCL_SAMPLE_*` tests, release build; the PR's head on its old base was not run, only its merge onto `main`. Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
Anon64 commented 2026-11-24 07:06:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-24T06:37:31Z.


Regression runs for this PR's head 204f4b9 and for its base main e50836b, on a retail title (same title, 60 s each), made with scripts/smoke.ps1 (release, clean tree at each commit) and pasted unedited, for Regression run.

main:

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

this PR:

xcl-smoke v1
commit: 204f4b91f12204b0c386e9c1599999d76b428f51
gpu: NVIDIA GeForce RTX 3060
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1642 (PresentX 1642)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16607 MB

Tested

  • NVIDIA GeForce RTX 3060 12 GB (driver 581.80, wave32), Intel Core i9-14900KF, Windows 11 25H2 26200.9974, Rust 1.90.0

Not tested

  • the unit tests on this machine
  • whether the title reaches the changed code; this is a regression check only

Report written with Claude Code (Claude Opus 5.5) from runs on this machine.

<!-- greyfinch-sync:ivall/xcl:comment:7124124616 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/811#issuecomment-7124124616). Originally posted by [Anon64](https://github.com/Anon64) on 2026-11-24T06:37:31Z. --- Regression runs for this PR's head `204f4b9` and for its base `main` `e50836b`, on a retail title (same title, 60 s each), made with `scripts/smoke.ps1` (release, clean tree at each commit) and pasted unedited, for **Regression run**. main: ``` xcl-smoke v1 commit: e50836bdf6f5c026f281d545ed86fb2f07ba6e6a gpu: NVIDIA GeForce RTX 3060 title: retail-title seconds: 60 exit: 0x0 frames shown: 1648 (PresentX 1648) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16639 MB ``` this PR: ``` xcl-smoke v1 commit: 204f4b91f12204b0c386e9c1599999d76b428f51 gpu: NVIDIA GeForce RTX 3060 title: retail-title seconds: 60 exit: 0x0 frames shown: 1642 (PresentX 1642) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16607 MB ``` **Tested** - NVIDIA GeForce RTX 3060 12 GB (driver 581.80, wave32), Intel Core i9-14900KF, Windows 11 25H2 26200.9974, Rust 1.90.0 **Not tested** - the unit tests on this machine - whether the title reaches the changed code; this is a regression check only Report written with Claude Code (Claude Opus 5.5) from runs on this machine.
SlopTart commented 2026-11-24 07:06:50 +00:00 (Migrated from github.com)

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


2|
3|AMD + release-build datapoint - the axes your row lists as not tested.
4|
5|Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Wine = Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust 1.100.0 cross x86_64-pc-windows-gnu, release profile, XCL_NETWORK=0, native wave64. Same rig as my Linux rows in #42 / #718.
6|
7|Merged state: head 204f4b9 onto main beaa245, clean merge.
8|
9|Full suite, cargo test --workspace --release --no-fail-fast -- --test-threads=4: 705 passed, 10 failed, 41 ignored (17 suites). The 10 = this rig's 7 stable Wine-lane failures (my #42 row) + the #718 flaky trio firing that run (~2/5 rate, PR-independent). Nothing new fails. Your tests pass: gpu::rdna2::tests::sdwa_register_uses_come_from_the_extension_dword ok, sdwa_compare_destination_is_a_write_to_the_analyses ok.
10|
11|Not tested: retail titles (none here), Windows, RDNA4.
12|Counts only, no game data.
13|AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7124192177 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/811#issuecomment-7124192177). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-24T06:41:28Z. --- 2| 3|AMD + release-build datapoint - the axes your row lists as not tested. 4| 5|**Machine:** RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Wine = Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust 1.100.0 cross `x86_64-pc-windows-gnu`, **release** profile, `XCL_NETWORK=0`, native wave64. Same rig as my Linux rows in #42 / #718. 6| 7|**Merged state:** head `204f4b9` onto main `beaa245`, clean merge. 8| 9|**Full suite, `cargo test --workspace --release --no-fail-fast -- --test-threads=4`:** **705 passed, 10 failed, 41 ignored** (17 suites). The 10 = this rig's 7 stable Wine-lane failures (my #42 row) + the #718 flaky trio firing that run (~2/5 rate, PR-independent). Nothing new fails. Your tests pass: `gpu::rdna2::tests::sdwa_register_uses_come_from_the_extension_dword` ok, `sdwa_compare_destination_is_a_write_to_the_analyses` ok. 10| 11|**Not tested:** retail titles (none here), Windows, RDNA4. 12|Counts only, no game data. 13|AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
eizispark commented 2026-11-24 07:06:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by eizispark on 2026-11-24T06:41:45Z.


Hardware check of 204f4b91f12204b0c386e9c1599999d76b428f51 (verified clean merge with main beaa245): pass.

Tested

  • Hardware: AMD Radeon RX 9070 XT (RDNA4, driver 32.0.32015.16001), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11, rustc 1.100.0 (0ef1bc386 2026-11-09), release + test profile
  • cargo test --workspace -- --test-threads=4: 706 passed, 0 failed, 41 ignored (GPU tests skipped on this adapter: none)
  • sdwa_register_uses_come_from_the_extension_dword and sdwa_compare_destination_is_a_write_to_the_analyses: 2 passed, 0 failed

Regression run
main (beaa245):

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

PR (204f4b9):

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

Not tested

  • wave32-only GPUs (NVIDIA / Intel); gameplay past the menus

AI use

  • Antigravity (Gemini 4 Carbon) ran the build, test suite, and scripts/smoke.ps1 harness on this machine and formatted this report.
<!-- greyfinch-sync:ivall/xcl:comment:7124196969 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/811#issuecomment-7124196969). Originally posted by [eizispark](https://github.com/eizispark) on 2026-11-24T06:41:45Z. --- Hardware check of `204f4b91f12204b0c386e9c1599999d76b428f51` (verified clean merge with `main` `beaa245`): **pass**. **Tested** - Hardware: AMD Radeon RX 9070 XT (RDNA4, driver 32.0.32015.16001), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11, `rustc 1.100.0 (0ef1bc386 2026-11-09)`, release + test profile - `cargo test --workspace -- --test-threads=4`: `706 passed, 0 failed, 41 ignored` (GPU tests skipped on this adapter: `none`) - `sdwa_register_uses_come_from_the_extension_dword` and `sdwa_compare_destination_is_a_write_to_the_analyses`: `2 passed, 0 failed` **Regression run** `main` (`beaa245`): ``` xcl-smoke v1 commit: beaa245ca04e212f064efc7cafcdce104bc5c0a2 gpu: AMD Radeon RX 9070 XT title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1660 (PresentX 1660) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14862 MB ``` PR (`204f4b9`): ``` xcl-smoke v1 commit: 204f4b91f12204b0c386e9c1599999d76b428f51 gpu: AMD Radeon RX 9070 XT title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1661 (PresentX 1661) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14859 MB ``` **Not tested** - wave32-only GPUs (NVIDIA / Intel); gameplay past the menus **AI use** - Antigravity (Gemini 4 Carbon) ran the build, test suite, and `scripts/smoke.ps1` harness on this machine and formatted this report.
DavidM1911 commented 2026-11-25 11:09:28 +00:00 (Migrated from github.com)

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


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7160196766 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/811#issuecomment-7160196766). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T10:48:21Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
github-actions[bot] commented 2026-11-29 20:41:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T20:41:17Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7262278570 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/811#issuecomment-7262278570). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T20:41:17Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
relativespace2K commented 2026-11-30 03:10:00 +00:00 (Migrated from github.com)

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


merge-check
base: 53e85fb1
head: 204f4b91f1
merge: clean
build: cargo build --workspace -> failed
tests: not run, the build fails first: error[E0061]: this function takes 3 arguments but 2 arguments were supplied at crates/xcl/src/gpu/recomp/tests.rs:174, where the PR calls super::constant_samplers(&insts, &Default::default()) and main's constant_samplers (crates/xcl/src/gpu/recomp/mod.rs:1804) now takes (insts, leaders, follow: bool).
review: no finding on the change itself on its own base; the problem is that the base moved. git merge --no-ff is clean because the signature change landed elsewhere in the tree, so the merge looks fine and the compile is what catches it. The PR needs a rebase onto current main (the third argument is the follow flag that was added to constant_samplers), after which this should be re-checked on the new head.
performance: not applicable, it does not build.
verdict: not yet: does not build against current main; crates/xcl/src/gpu/recomp/tests.rs:174 calls constant_samplers with 2 arguments where main now takes 3 (the follow flag). Rebase onto main and it can be checked again.
hardware / tool and model: AMD Radeon RX 6800 XT 16 GB (RDNA2, wave64), driver 32.0.21045.29003; Ryzen 5 5600, 32 GB RAM; Windows 10 IoT Enterprise LTSC 2024, 10.0.26100 build 26100.9974; Rust 1.100.0; DXC 1.9.2602.17; debug build. DeepSeek Harness coding agent, model DeepSeek V4.1 Flash.

<!-- greyfinch-sync:ivall/xcl:comment:7267644844 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/811#issuecomment-7267644844). Originally posted by [relativespace2K](https://github.com/relativespace2K) on 2026-11-30T03:10:00Z. --- merge-check base: 53e85fb1 head: 204f4b91f12204b0c386e9c1599999d76b428f51 merge: clean build: cargo build --workspace -> failed tests: not run, the build fails first: `error[E0061]: this function takes 3 arguments but 2 arguments were supplied` at `crates/xcl/src/gpu/recomp/tests.rs:174`, where the PR calls `super::constant_samplers(&insts, &Default::default())` and main's `constant_samplers` (`crates/xcl/src/gpu/recomp/mod.rs:1804`) now takes `(insts, leaders, follow: bool)`. review: no finding on the change itself on its own base; the problem is that the base moved. `git merge --no-ff` is clean because the signature change landed elsewhere in the tree, so the merge looks fine and the compile is what catches it. The PR needs a rebase onto current `main` (the third argument is the `follow` flag that was added to `constant_samplers`), after which this should be re-checked on the new head. performance: not applicable, it does not build. verdict: not yet: does not build against current main; `crates/xcl/src/gpu/recomp/tests.rs:174` calls `constant_samplers` with 2 arguments where main now takes 3 (the `follow` flag). Rebase onto main and it can be checked again. hardware / tool and model: AMD Radeon RX 6800 XT 16 GB (RDNA2, wave64), driver 32.0.21045.29003; Ryzen 5 5600, 32 GB RAM; Windows 10 IoT Enterprise LTSC 2024, 10.0.26100 build 26100.9974; Rust 1.100.0; DXC 1.9.2602.17; debug build. DeepSeek Harness coding agent, model DeepSeek V4.1 Flash.
tiagonleal commented 2026-11-30 03:33:59 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonleal on 2026-11-30T03:33:59Z.


merge-check
base: cfb9753a8c
head: 204f4b91f1
merge: clean (no textual conflict)
build: cargo build --workspace -> ok, but the lib test target does not compile on this base
tests: cargo test --workspace --no-fail-fast -j 8 -- --test-threads=4 -> not run: error[E0061]: this function takes 3 arguments but 2 arguments were supplied at crates/xcl/src/gpu/recomp/tests.rs:174, where the new test calls super::constant_samplers(&insts, &Default::default()). On current main constant_samplers takes a third argument, follow: bool (gpu/recomp/mod.rs:1804). Base alone on this PC: 2834 passed, 0 failed, 51 ignored.
review: whole diff read (+74/-4, gpu/rdna2.rs and the test). The decoder change itself raised no finding in the read: with an SDWA extension dword, a source marked as scalar is reported as an SGPR use and no longer as a VGPR use, and a compare with the SD bit reports its SDST as the mask destination. It could not be confirmed by its tests here because of the build error above. The fix is one argument in the test's call; after a rebase this needs a fresh check.
performance: decoder metadata only. scripts/smoke.ps1 on the merged release build (which does compile), 60 s of a retail title: 1684 frames and 15574 MB peak commit against 1678 and 1677 frames on the base. No device removal, no crash.
verdict: not yet: the test target does not compile on current main (one missing argument at tests.rs:174); needs a rebase
hardware / tool and model: RTX 5070 Ti 16 GB (617.42, wave32), Ryzen 7 9800X3D, 32 GB, Windows 11 26300, rustc 1.100.0 / Claude Code (Claude Fable 5.2 ran the build and wrote this; Claude Opus 5.5 read the diff first)

  • Tiago
<!-- greyfinch-sync:ivall/xcl:comment:7268001927 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/811#issuecomment-7268001927). Originally posted by [tiagonleal](https://github.com/tiagonleal) on 2026-11-30T03:33:59Z. --- merge-check base: cfb9753a8cbf5517ee36914b7041cb62b4a97582 head: 204f4b91f12204b0c386e9c1599999d76b428f51 merge: clean (no textual conflict) build: cargo build --workspace -> ok, but the lib test target does not compile on this base tests: cargo test --workspace --no-fail-fast -j 8 -- --test-threads=4 -> not run: `error[E0061]: this function takes 3 arguments but 2 arguments were supplied` at `crates/xcl/src/gpu/recomp/tests.rs:174`, where the new test calls `super::constant_samplers(&insts, &Default::default())`. On current `main` `constant_samplers` takes a third argument, `follow: bool` (`gpu/recomp/mod.rs:1804`). Base alone on this PC: 2834 passed, 0 failed, 51 ignored. review: whole diff read (+74/-4, `gpu/rdna2.rs` and the test). The decoder change itself raised no finding in the read: with an SDWA extension dword, a source marked as scalar is reported as an SGPR use and no longer as a VGPR use, and a compare with the SD bit reports its SDST as the mask destination. It could not be confirmed by its tests here because of the build error above. The fix is one argument in the test's call; after a rebase this needs a fresh check. performance: decoder metadata only. `scripts/smoke.ps1` on the merged release build (which does compile), 60 s of a retail title: 1684 frames and 15574 MB peak commit against 1678 and 1677 frames on the base. No device removal, no crash. verdict: not yet: the test target does not compile on current main (one missing argument at tests.rs:174); needs a rebase hardware / tool and model: RTX 5070 Ti 16 GB (617.42, wave32), Ryzen 7 9800X3D, 32 GB, Windows 11 26300, rustc 1.100.0 / Claude Code (Claude Fable 5.2 ran the build and wrote this; Claude Opus 5.5 read the diff first) - Tiago
upipibi commented 2026-12-01 00:15:10 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by upipibi on 2026-12-01T00:15:10Z.


Rebased onto main d0832e61 (c9ef0b8d). The only change is in the test: constant_samplers takes follow now, and it passes false, since the test's code is one straight block.

It still fixes the same thing: on main, rdna2::sgpr_uses/vgpr_uses still read an SDWA instruction as its base dword. So v_cmp_lt_f32_sdwa s5, v1, s2 reports no SGPR write and a read of v2, which reaches constant_samplers and geometry_wave32_hazards.

Windows, Ryzen 9 5950X: cargo build --workspace ok; cargo test -p xcl --lib 2744 passed, 0 failed, 31 ignored. The PR's two tests pass. With rdna2.rs as on main, sdwa_compare_destination_is_a_write_to_the_analyses fails (whole-wave mask reduction not found), so the test still catches it.

For merging it still needs the two xcl-smoke blocks (CONTRIBUTING.md, "Regression run"). I can't make those here, so anyone who can run scripts/smoke.ps1 on a title from main and from c9ef0b8d is welcome to post them.

<!-- greyfinch-sync:ivall/xcl:comment:7296114100 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/811#issuecomment-7296114100). Originally posted by [upipibi](https://github.com/upipibi) on 2026-12-01T00:15:10Z. --- Rebased onto `main` d0832e61 (c9ef0b8d). The only change is in the test: `constant_samplers` takes `follow` now, and it passes `false`, since the test's code is one straight block. It still fixes the same thing: on `main`, `rdna2::sgpr_uses`/`vgpr_uses` still read an SDWA instruction as its base dword. So `v_cmp_lt_f32_sdwa s5, v1, s2` reports no SGPR write and a read of v2, which reaches `constant_samplers` and `geometry_wave32_hazards`. Windows, Ryzen 9 5950X: `cargo build --workspace` ok; `cargo test -p xcl --lib` **2744 passed, 0 failed**, 31 ignored. The PR's two tests pass. With `rdna2.rs` as on `main`, `sdwa_compare_destination_is_a_write_to_the_analyses` fails (`whole-wave mask reduction` not found), so the test still catches it. For merging it still needs the two `xcl-smoke` blocks (CONTRIBUTING.md, "Regression run"). I can't make those here, so anyone who can run `scripts/smoke.ps1` on a title from `main` and from c9ef0b8d is welcome to post them.
Foniass commented 2026-12-01 04:11:08 +00:00 (Migrated from github.com)

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


Triage (#1607) – head c9ef0b8

No open or merged PR makes the same change. On main, rdna2::sgpr_uses ignores an SDWA instruction's S0/S1 bits and the VOPC SD destination, and vgpr_uses counts an S1-selected VSRC1 as a VGPR. #2068 touches SDWA VSRC1 only in the direct-DXIL lowering (lower_valu.rs), and #2479 (merged) covers reload::changes, not these helpers. The bit positions (S0 bit 23, SDST 14:8, SD bit 15, S1 bit 31) and the encoded test words check out.
The failing check is PR description; Build and test passes.
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:7300466502 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/811#issuecomment-7300466502). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T04:11:08Z. --- **Triage (#1607)** – head c9ef0b8 No open or merged PR makes the same change. On main, `rdna2::sgpr_uses` ignores an SDWA instruction's S0/S1 bits and the VOPC SD destination, and `vgpr_uses` counts an S1-selected VSRC1 as a VGPR. #2068 touches SDWA VSRC1 only in the direct-DXIL lowering (lower_valu.rs), and #2479 (merged) covers `reload::changes`, not these helpers. The bit positions (S0 bit 23, SDST 14:8, SD bit 15, S1 bit 31) and the encoded test words check out. The failing check is `PR description`; `Build and test` passes. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

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

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