Recompiler tests: ds_swizzle_b32 lanes match RDNA2 hardware for every offset #518
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!518
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-518"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@AC-Storm-YT on GitHub · 2026-11-24 01:12 UTC · original
AC-Storm-YT:recomp-ds-swizzle-hw→main· +27 −0 · 1 files · 1 commits · openswizzle_lane, which decides which lane eachds_swizzle_b32lane reads, was only checked against the ISA's examples – about ten of the 65,536 offsets. This adds a test that checks it for every offset against what the hardware does. Test only: nothing outsidetests.rschanges, and no behaviour changes (swizzle_lanealready matched everywhere).What is in it
ds_swizzle_lanes_match_rdna2_hardware_for_every_offset(crates/xcl/src/gpu/recomp/tests.rs):swizzle_lanefor all 65,536 offsets × 32 lanes, hashed (FNV-1a 64) per mode – bit mode, quad permute, rotate, FFT – and compared with the same hash of a hardware table. The table (2 MiB) was measured by runningds_swizzle_b32natively (OpenCL C with inline RDNA assembly, AMD driver OpenCL 3679.0, 32-lane waves, each lane holding its lane id) for every offset on the Ryzen 7 9800X3D's integrated RDNA2 GPU (gfx1036, the console's GPU generation) and on an RX 9070 XT (gfx1201). Both GPUs gave the same table. The measuring script is not part of this PR.Tested
stable-x86_64-pc-windows-msvc, debug; DXC 1.8.2502.11cargo test --workspace -- --test-threads=4on this branch's head: 678 passed, 0 failed, 41 ignored. No SKIPPED tests.swizzle_laneis broken, and names the mode: with each of these changes made toemit.rsby hand (and reverted) – rotate ignoringoffset[10], FFT keeping the unmasked bits, quad permute reading 1-bit fields, bit mode applyingorbeforeand– it failed for rotate, FFT, quad permute and bit mode respectively.Regression run
Not needed: the PR changes only
crates/xcl/src/gpu/recomp/tests.rs.Not tested
swizzle_lane;gpu_ds_swizzle_modesalready runs 7 offsets end to end.AI use
@arcwiser on GitHub · 2026-11-24 01:23 UTC · original
Tested
c0946e9ed7745b9cede03de73da3bbcbc69957e5stable-x86_64-pc-windows-msvc; DXC 1.9.2602.17 from Windows SDK 10.0.28000.0; debugcargo test -p xcl --lib ds_swizzle_lanes_match_rdna2_hardware_for_every_offset -- --nocapture: 1 passed, 0 failed, 0 ignored.\scripts\test.ps1: 678 passed, 0 failed, 41 ignoredno wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardwareXCL_SAMPLE_*variables were set. The new exhaustiveds_swizzletest ran and passed in the full suite.Not tested
AI use
@PHeitor1 on GitHub · 2026-11-24 01:26 UTC · original
Tested
c0946e9merged ontomain508a0c7.RTX 5060 Ti 8 GB (Blackwell, 32-lane waves), NVIDIA 621.24, Ryzen 5 5600X, Windows 11 Pro 26300 (native, Graphics Tools + XGameRuntime installed), rustc 1.100.0 MSVC, debug,
cargo test --workspace --no-fail-fast -- --test-threads=4, noXCL_SAMPLE_*.Pass: 681 passed, 0 failed, 41 ignored. SKIPPED: only the 2
no wave64tests.ds_swizzle_lanes_match_rdna2_hardware_for_every_offsetpasses. The existinggpu_ds_swizzle_modesandgpu_ds_swizzle_and_bpermute_zero_inactive_lanesstill pass on the GPU.Run and written with Claude Code (Claude Opus 5.5).
@DavidM1911 on GitHub · 2026-11-25 13:53 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.