Recompiler: include RMW destination reads in rdna2::vgpr_uses and sgpr_uses #2124

Open
Decodere wants to merge 1 commit from upstream-pr/2134 into main
Decodere commented 2026-11-25 05:42:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-25T05:42:47Z.


What is in it
Tracks implicit read-modify-write (RMW) destination reads in rdna2::vgpr_uses() and rdna2::sgpr_uses() (crates/xcl/src/gpu/rdna2.rs) for RDNA2 instructions whose ISA table marks VDST/SDST as input: false, output: true:

  • In vgpr_uses(): extends the RMW accumulator list (V_FMAC_F32 / V_MAC_F32 / V_FMAC_LEGACY_F32) to include V_FMAC_F16, V_PK_FMAC_F16, V_DOT2C_F32_F16, and V_DOT4C_I32_I8. Previously, recomp::partition::classify wiped LANE_ID taint accumulated into VDST by those four instructions and falsely classified wave-cut-dependent shaders as Tier::Exact. (V_WRITELANE_B32 is intentionally not added, preserving mesh_wave.rs's vgpr_reads.first() == None expectation.)
  • In sgpr_uses(): appends w to r for S_CMOV* (S_CMOV_B32, S_CMOV_B64, S_CMOVK_I32), S_ADDK_I32, S_MULK_I32, S_BITSET0_B32, S_BITSET0_B64, S_BITSET1_B32, and S_BITSET1_B64 (matching x64_masks::keeps_destination, with NULL 125 already excluded from w). Previously, recomp::mesh_wave::analyze wiped mask taint on SDST across those scalar RMW ops and dropped mask-derived S_CBRANCH_SCC* branches from mask_scc_branches.
  • Adds 3 unit tests in gpu::rdna2::tests covering direct vgpr_uses (all 4 vector accumulators + negative controls including V_DOT2_F32_F16, V_ADD_NC_U32, V_WRITELANE_B32), direct sgpr_uses (all 9 scalar RMW ops, NULL 125, and plain overwrites), and end-to-end taint propagation through recomp::partition::classify and recomp::mesh_wave::analyze.

Part of #336

Tested
Environment: Windows 11 Home 26200, Intel Core i5-11400F, 32 GB RAM, NVIDIA GeForce RTX 4060 8 GB (driver 621.14, wave32), Rust 1.100.0, DXC 1.9.2609.5 (01b62ad4).

  • Failing-first pre-fix check (cargo test -j 4 -p xcl --lib gpu::rdna2::tests::rmw_ -- --nocapture): 0 passed, 3 failed (V_FMAC_F16 omitted VDST from vgpr_uses reads, S_ADDK_I32 omitted SDST from sgpr_uses reads, and partition::classify returned Tier::Exact on V_MBCNT_LO_U32_B32 -> V_FMAC_F16 -> EXP).
  • Post-fix targeted CPU tests: gpu::rdna2::tests 20 passed / 0 failed (debug & --release), gpu::recomp::partition::tests 44 passed / 0 failed, gpu::recomp::mesh_wave::tests 13 passed / 0 failed (pure CPU tests, CI WARP-safe).
  • Full release workspace build & test (cargo build --release --workspace and cargo test --release --workspace -- --test-threads=4 --nocapture): 1,157 passed, 0 failed, 46 ignored across 21 test binaries (1101 in xcl lib, 56 across the remaining 20 binaries), with 27 SKIPPED lines on this RTX 4060:
    • 20 no wave64 (RTX 4060 is wave32-only)
    • 3 per-lane form: refused (wave32 f16 arithmetic, f16 packed, f32 conversions)
    • 2 no d3d12SDKLayers.dll / no D3D12 debug layer
    • 1 cannot disable the driver cache (Windows Developer Mode not enabled)
    • 1 no heap windows

Regression run
Paired 60 s runs via scripts/smoke.ps1 on clean origin/main (6020a33b) and clean PR head (5ea738c9):

Main (6020a33b16ba2de25b3aef5947552f2dc1831f09):

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

PR (5ea738c9377b677733621fa33e85f11f386b962c):

xcl-smoke v1
commit: 5ea738c9377b677733621fa33e85f11f386b962c
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1556 (PresentX 1557)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14523 MB

Not tested

  • Native wave64 GPU execution (20 no wave64 skips on RTX 4060), D3D12 debug layer tests (2 skips without d3d12SDKLayers.dll), driver cache disable toggle (1 skip without Windows Developer Mode), and heap-window OOM fallback (1 skip without XCL_HEAP_WINDOWS).
  • Retail titles other than title: 29640639 (and partition::classify / mesh_wave::analyze are analysis passes not yet wired into runtime translation).

AI use
Google Antigravity (Gemini 4 Neon) wrote the rdna2::vgpr_uses/sgpr_uses fixes, unit tests, and this PR description. All pre-fix/post-fix unit tests, full release workspace tests, paired 60 s smoke runs, and scripts/pr_check.py --local validation were run locally on this machine.

<!-- greyfinch-sync:ivall/xcl:issue:5485886632 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2134). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-25T05:42:47Z. --- **What is in it** Tracks implicit read-modify-write (RMW) destination reads in `rdna2::vgpr_uses()` and `rdna2::sgpr_uses()` (`crates/xcl/src/gpu/rdna2.rs`) for RDNA2 instructions whose ISA table marks `VDST`/`SDST` as `input: false, output: true`: - In `vgpr_uses()`: extends the RMW accumulator list (`V_FMAC_F32` / `V_MAC_F32` / `V_FMAC_LEGACY_F32`) to include `V_FMAC_F16`, `V_PK_FMAC_F16`, `V_DOT2C_F32_F16`, and `V_DOT4C_I32_I8`. Previously, `recomp::partition::classify` wiped `LANE_ID` taint accumulated into `VDST` by those four instructions and falsely classified wave-cut-dependent shaders as `Tier::Exact`. (`V_WRITELANE_B32` is intentionally not added, preserving `mesh_wave.rs`'s `vgpr_reads.first() == None` expectation.) - In `sgpr_uses()`: appends `w` to `r` for `S_CMOV*` (`S_CMOV_B32`, `S_CMOV_B64`, `S_CMOVK_I32`), `S_ADDK_I32`, `S_MULK_I32`, `S_BITSET0_B32`, `S_BITSET0_B64`, `S_BITSET1_B32`, and `S_BITSET1_B64` (matching `x64_masks::keeps_destination`, with `NULL` `125` already excluded from `w`). Previously, `recomp::mesh_wave::analyze` wiped mask taint on `SDST` across those scalar RMW ops and dropped mask-derived `S_CBRANCH_SCC*` branches from `mask_scc_branches`. - Adds 3 unit tests in `gpu::rdna2::tests` covering direct `vgpr_uses` (all 4 vector accumulators + negative controls including `V_DOT2_F32_F16`, `V_ADD_NC_U32`, `V_WRITELANE_B32`), direct `sgpr_uses` (all 9 scalar RMW ops, `NULL` `125`, and plain overwrites), and end-to-end taint propagation through `recomp::partition::classify` and `recomp::mesh_wave::analyze`. Part of #336 **Tested** Environment: Windows 11 Home 26200, Intel Core i5-11400F, 32 GB RAM, NVIDIA GeForce RTX 4060 8 GB (driver 621.14, wave32), Rust 1.100.0, DXC `1.9.2609.5` (`01b62ad4`). - Failing-first pre-fix check (`cargo test -j 4 -p xcl --lib gpu::rdna2::tests::rmw_ -- --nocapture`): 0 passed, 3 failed (`V_FMAC_F16` omitted `VDST` from `vgpr_uses` reads, `S_ADDK_I32` omitted `SDST` from `sgpr_uses` reads, and `partition::classify` returned `Tier::Exact` on `V_MBCNT_LO_U32_B32` -> `V_FMAC_F16` -> `EXP`). - Post-fix targeted CPU tests: `gpu::rdna2::tests` 20 passed / 0 failed (debug & `--release`), `gpu::recomp::partition::tests` 44 passed / 0 failed, `gpu::recomp::mesh_wave::tests` 13 passed / 0 failed (pure CPU tests, CI WARP-safe). - Full release workspace build & test (`cargo build --release --workspace` and `cargo test --release --workspace -- --test-threads=4 --nocapture`): 1,157 passed, 0 failed, 46 ignored across 21 test binaries (`1101` in `xcl` lib, `56` across the remaining 20 binaries), with 27 `SKIPPED` lines on this RTX 4060: - 20 `no wave64` (RTX 4060 is wave32-only) - 3 `per-lane form: refused` (wave32 f16 arithmetic, f16 packed, f32 conversions) - 2 `no d3d12SDKLayers.dll` / `no D3D12 debug layer` - 1 `cannot disable the driver cache` (Windows Developer Mode not enabled) - 1 `no heap windows` **Regression run** Paired 60 s runs via `scripts/smoke.ps1` on clean `origin/main` (`6020a33b`) and clean PR head (`5ea738c9`): Main (`6020a33b16ba2de25b3aef5947552f2dc1831f09`): ``` xcl-smoke v1 commit: 6020a33b16ba2de25b3aef5947552f2dc1831f09 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1583 (PresentX 1583) presents per 2 s (last 3): 60 61 60 device removals: 0 crashes: 0 peak commit: 14516 MB ``` PR (`5ea738c9377b677733621fa33e85f11f386b962c`): ``` xcl-smoke v1 commit: 5ea738c9377b677733621fa33e85f11f386b962c gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1556 (PresentX 1557) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14523 MB ``` **Not tested** - Native wave64 GPU execution (20 `no wave64` skips on RTX 4060), D3D12 debug layer tests (2 skips without `d3d12SDKLayers.dll`), driver cache disable toggle (1 skip without Windows Developer Mode), and heap-window OOM fallback (1 skip without `XCL_HEAP_WINDOWS`). - Retail titles other than `title: 29640639` (and `partition::classify` / `mesh_wave::analyze` are analysis passes not yet wired into runtime translation). **AI use** Google Antigravity (Gemini 4 Neon) wrote the `rdna2::vgpr_uses`/`sgpr_uses` fixes, unit tests, and this PR description. All pre-fix/post-fix unit tests, full release workspace tests, paired 60 s smoke runs, and `scripts/pr_check.py --local` validation were run locally on this machine.
DavidM1911 commented 2026-11-25 07:05:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T06:32:40Z.


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:7154900057 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2134#issuecomment-7154900057). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T06:32:40Z. --- 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-28 20:18:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T20:18:49Z.


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:7245194091 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2134#issuecomment-7245194091). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T20:18:49Z. --- 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.
Foniass commented 2026-12-01 07:27:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:27:12Z.


Triage (#1607) – head 5ea738c

No open PR changes rdna2::sgpr_uses / vgpr_uses this way, and main does not have it: only the three FMAC/MAC accumulators read VDST there. The commit "DXIL: fix compact SGPR liveness for RMW/CMOV SALU" (carried by #2604 and the amd-dev merge #3547) treats the same S_CMOV/S_ADDK/S_MULK/S_BITSET ops as read-modify-write, but in dxil/compact.rs's own use/def table. It is a different function, so it is not a duplicate.
No problems found in the diff.
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:7304074005 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2134#issuecomment-7304074005). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:27:12Z. --- **Triage (#1607)** – head 5ea738c No open PR changes `rdna2::sgpr_uses` / `vgpr_uses` this way, and main does not have it: only the three FMAC/MAC accumulators read VDST there. The commit "DXIL: fix compact SGPR liveness for RMW/CMOV SALU" (carried by #2604 and the amd-dev merge #3547) treats the same S_CMOV/S_ADDK/S_MULK/S_BITSET ops as read-modify-write, but in `dxil/compact.rs`'s own use/def table. It is a different function, so it is not a duplicate. No problems found in the diff. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
BBareth commented 2026-12-01 09:38:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by BBareth on 2026-12-01T09:38:54Z.


merge-check claim
head: 5ea738c937

<!-- greyfinch-sync:ivall/xcl:comment:7307002860 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2134#issuecomment-7307002860). Originally posted by [BBareth](https://github.com/BBareth) on 2026-12-01T09:38:54Z. --- merge-check claim head: 5ea738c9377b677733621fa33e85f11f386b962c
BBareth commented 2026-12-01 10:00:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by BBareth on 2026-12-01T10:00:00Z.


merge-check
base: 493dbd3dd0
head: 5ea738c937
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2903 passed, 0 failed, 51 ignored; 28 SKIPPED lines, as on the base; failing: none. The base alone, same machine, same commit: 2900 passed, 0 failed, 51 ignored, 28 SKIPPED lines (22 no wave64, 2 no heap windows, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 cannot disable the driver cache). The three new tests ran and passed: rmw_vector_accumulators_read_vdst, rmw_scalar_ops_read_sdst, rmw_uses_propagate_taint_in_partition_and_mesh_wave.
review: no blocking finding; one file (+124/-1), every line read. rdna2::sgpr_uses now lists SDST among the reads of the conditional moves (S_CMOV*) and of S_ADDK_I32, S_MULK_I32 and S_BITSET0/1_B32/B64, and vgpr_uses lists VDST among the reads of V_FMAC_F16, V_PK_FMAC_F16, V_DOT2C_F32_F16 and V_DOT4C_I32_I8; these instructions keep or accumulate into their destination. The analyses that use these lists (the new test covers partition and mesh_wave) see more reads, which should only make them more conservative. main already has tests for the scalar cases in two analyses (cmov_and_rmw_salu_read_sdst_..., scc_reading_and_rmw_scalar_ops_preserve_mask_taint); they still pass on the merge. Not tested here: a retail shader whose classification changes with this; no GPU test is involved.
performance: none at run time; a program that was classified too optimistically may now take the more conservative form (not measured).
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124); i7-12700K; Windows 11 26200. Claude Code, Claude Fable 5.2 read the diff, ran the build and the suite and wrote this check.

<!-- greyfinch-sync:ivall/xcl:comment:7307516923 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2134#issuecomment-7307516923). Originally posted by [BBareth](https://github.com/BBareth) on 2026-12-01T10:00:00Z. --- merge-check base: 493dbd3dd0cd50b4c3e8d28f73ab9b504fcd8158 head: 5ea738c9377b677733621fa33e85f11f386b962c merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2903 passed, 0 failed, 51 ignored; 28 SKIPPED lines, as on the base; failing: none. The base alone, same machine, same commit: 2900 passed, 0 failed, 51 ignored, 28 SKIPPED lines (22 no wave64, 2 no heap windows, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 cannot disable the driver cache). The three new tests ran and passed: `rmw_vector_accumulators_read_vdst`, `rmw_scalar_ops_read_sdst`, `rmw_uses_propagate_taint_in_partition_and_mesh_wave`. review: no blocking finding; one file (+124/-1), every line read. `rdna2::sgpr_uses` now lists SDST among the reads of the conditional moves (`S_CMOV*`) and of `S_ADDK_I32`, `S_MULK_I32` and `S_BITSET0/1_B32/B64`, and `vgpr_uses` lists VDST among the reads of `V_FMAC_F16`, `V_PK_FMAC_F16`, `V_DOT2C_F32_F16` and `V_DOT4C_I32_I8`; these instructions keep or accumulate into their destination. The analyses that use these lists (the new test covers partition and mesh_wave) see more reads, which should only make them more conservative. `main` already has tests for the scalar cases in two analyses (`cmov_and_rmw_salu_read_sdst_...`, `scc_reading_and_rmw_scalar_ops_preserve_mask_taint`); they still pass on the merge. Not tested here: a retail shader whose classification changes with this; no GPU test is involved. performance: none at run time; a program that was classified too optimistically may now take the more conservative form (not measured). verdict: safe to merge hardware / tool and model: RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124); i7-12700K; Windows 11 26200. Claude Code, Claude Fable 5.2 read the diff, ran the build and the suite and wrote this check.
Decodere commented 2026-12-02 07:47:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-12-02T07:47:13Z.


Keeping open: still fixes RMW destination reads in rdna2::vgpr_uses and rdna2::sgpr_uses (crates/xcl/src/gpu/rdna2.rs); MERGEABLE/CLEAN with green CI and 1/2 safe to merge from @BBareth, waiting for a 2nd / AMD check. (AI note: checked with Antigravity, Gemini 4 Neon.)

<!-- greyfinch-sync:ivall/xcl:comment:7338607439 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2134#issuecomment-7338607439). Originally posted by [Decodere](https://github.com/Decodere) on 2026-12-02T07:47:13Z. --- Keeping open: still fixes RMW destination reads in `rdna2::vgpr_uses` and `rdna2::sgpr_uses` (`crates/xcl/src/gpu/rdna2.rs`); `MERGEABLE`/`CLEAN` with green CI and 1/2 `safe to merge` from @BBareth, waiting for a 2nd / AMD check. (AI note: checked with Antigravity, Gemini 4 Neon.)
ClosetPie107 commented 2026-12-02 17:13:05 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-12-02T17:13:05Z.


Linux / AMD RDNA4 (RADV, Wine + vkd3d-proton): full test suite on 5ea738c

Merged onto main 5eaadb54 (clean merge) and compared with main run twice on the same machine.

Setup

  • AMD Radeon RX 9070 16 GB (RDNA4, RADV GFX1201, Mesa 26.3.1), Ryzen 5 9600X, 30 GiB RAM, CachyOS (kernel 7.3.7)
  • Wine 11.23 (system), stock vkd3d-proton v3.1-83-gcae8353ed and DXVK dxgi.dll from GE-Proton11-16, DXC 1.9.2609.5
  • Debug build, cross-compiled for x86_64-pc-windows-msvc with cargo-xwin; test binaries run under Wine

Tested: cargo xwin test --workspace --target x86_64-pc-windows-msvc --no-fail-fast -- --test-threads=4 --skip <31 tests>

passed failed ignored
main 5eaadb54 2769 177 52
this PR merged 2773 176 52
  • Tests that fail with this PR and pass on main: hle::d3d12x::vram::tests::spares_stay_out_of_dump_tracking_until_handed_out.
    • A one-off: on this PR build it passes 5 of 5 times alone and 3 of 3 times in its module (hle::d3d12x::vram::tests, 4 threads). The PR only touches gpu/rdna2.rs.
  • Tests this PR adds: 3 of 3 pass (rmw_vector_accumulators_read_vdst, rmw_scalar_ops_read_sdst, rmw_uses_propagate_taint_in_partition_and_mesh_wave).
  • Passing here and failing on main: gpu::recomp::tests::gpu_qsad_and_mqsad, gpu::recomp::tests::gpu_split_wave64_cross_half_operations (flaky on main under Wine).
About the failures on main and the 31 skipped tests (same for every PR in this batch)
  • Most of main's 177 failures under Wine come from #175: once a test has set up the real device, vkd3d-proton refuses the command allocators XCL adopts (d3d12_command_list_Reset: Invalid command allocator), and later tests get E_INVALIDARG (0x80070057). Running vkd3d-proton master with its vtable check taken out, hle::d3d12x::sparse::tests goes from 106 passed / 38 failed to 144 / 0.
  • The 31 skipped tests make vkd3d-proton's dxil-spirv call std::terminate() (Cannot reliably convert LLVM pointer type, we cannot differentiate between Function and Private), which kills the whole test binary. They are the split-wave64, dispatch-chain and bridged-mask GPU tests, gpu_compute_mode_dispatch_abi, gpu_compute_thread_limits_leave_the_lanes_past_them_out, the two gpu_mesh_mode_* tests, and console_wave64_compute_through_the_pso_hook_dispatch_and_read_back, plus serialize_root_signature_strips_console_flags_and_preserves_pc_flags, whose null descriptor vkd3d-proton dereferences. The dxil-spirv ones crash the same way with vkd3d-proton master (f8c1cae8, dxil-spirv 93ab44c5).
  • main was run twice: same counts, same failure set. SKIPPED lines (same as main): no heap windows (2), no D3D12 debug layer (2-3), driver cache control not implemented in vkd3d-proton (1).

Not tested: Windows, NVIDIA, a retail title / scripts/smoke.ps1, a review of the diff. This is a test report, not a merge-check.

AI use: omp (Claude Opus 5.5) merged, built and ran the suites on this machine, compared the results with main, and drafted this report. The user asked for it to be posted.

<!-- greyfinch-sync:ivall/xcl:comment:7353061056 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2134#issuecomment-7353061056). Originally posted by [ClosetPie107](https://github.com/ClosetPie107) on 2026-12-02T17:13:05Z. --- **Linux / AMD RDNA4 (RADV, Wine + vkd3d-proton): full test suite on `5ea738c`** Merged onto `main` `5eaadb54` (clean merge) and compared with `main` run twice on the same machine. **Setup** - AMD Radeon RX 9070 16 GB (RDNA4, RADV GFX1201, Mesa 26.3.1), Ryzen 5 9600X, 30 GiB RAM, CachyOS (kernel 7.3.7) - Wine 11.23 (system), stock vkd3d-proton `v3.1-83-gcae8353ed` and DXVK `dxgi.dll` from GE-Proton11-16, DXC 1.9.2609.5 - Debug build, cross-compiled for `x86_64-pc-windows-msvc` with `cargo-xwin`; test binaries run under Wine **Tested:** `cargo xwin test --workspace --target x86_64-pc-windows-msvc --no-fail-fast -- --test-threads=4 --skip <31 tests>` | | passed | failed | ignored | |---|---|---|---| | `main` `5eaadb54` | 2769 | 177 | 52 | | this PR merged | 2773 | 176 | 52 | - **Tests that fail with this PR and pass on `main`:** `hle::d3d12x::vram::tests::spares_stay_out_of_dump_tracking_until_handed_out`. - A one-off: on this PR build it passes 5 of 5 times alone and 3 of 3 times in its module (`hle::d3d12x::vram::tests`, 4 threads). The PR only touches `gpu/rdna2.rs`. - **Tests this PR adds:** 3 of 3 pass (`rmw_vector_accumulators_read_vdst`, `rmw_scalar_ops_read_sdst`, `rmw_uses_propagate_taint_in_partition_and_mesh_wave`). - Passing here and failing on `main`: `gpu::recomp::tests::gpu_qsad_and_mqsad`, `gpu::recomp::tests::gpu_split_wave64_cross_half_operations` (flaky on `main` under Wine). <details><summary>About the failures on <code>main</code> and the 31 skipped tests (same for every PR in this batch)</summary> - Most of `main`'s 177 failures under Wine come from #175: once a test has set up the real device, vkd3d-proton refuses the command allocators XCL adopts (`d3d12_command_list_Reset: Invalid command allocator`), and later tests get `E_INVALIDARG` (`0x80070057`). Running vkd3d-proton master with its vtable check taken out, `hle::d3d12x::sparse::tests` goes from 106 passed / 38 failed to 144 / 0. - The 31 skipped tests make vkd3d-proton's dxil-spirv call `std::terminate()` (`Cannot reliably convert LLVM pointer type, we cannot differentiate between Function and Private`), which kills the whole test binary. They are the split-wave64, dispatch-chain and bridged-mask GPU tests, `gpu_compute_mode_dispatch_abi`, `gpu_compute_thread_limits_leave_the_lanes_past_them_out`, the two `gpu_mesh_mode_*` tests, and `console_wave64_compute_through_the_pso_hook_dispatch_and_read_back`, plus `serialize_root_signature_strips_console_flags_and_preserves_pc_flags`, whose null descriptor vkd3d-proton dereferences. The dxil-spirv ones crash the same way with vkd3d-proton master (`f8c1cae8`, dxil-spirv `93ab44c5`). - `main` was run twice: same counts, same failure set. `SKIPPED` lines (same as `main`): no heap windows (2), no D3D12 debug layer (2-3), driver cache control not implemented in vkd3d-proton (1). </details> **Not tested:** Windows, NVIDIA, a retail title / `scripts/smoke.ps1`, a review of the diff. This is a test report, not a `merge-check`. **AI use:** omp (Claude Opus 5.5) merged, built and ran the suites on this machine, compared the results with `main`, and drafted this report. The user asked for it to be posted.
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/2134:upstream-pr/2134'
git switch 'upstream-pr/2134'

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