Repository navigation
Recompiler tests: GPU checks for VOP3 bit-field, perm, align and min3/max3/med3 - #445
AC-Storm-YT wants to merge 1 commit into
Conversation
…/max3/med3 v_bfi_b32, v_bfm_b32, v_perm_b32, v_alignbit_b32, v_alignbyte_b32 and v_min3 / v_max3 / v_med3 (u32 and i32) are translated but had no test. One kernel runs all eleven as wave64 and wave32 over 32 dispatches of operand triples (edge values and every v_perm_b32 selector kind, mixed with arbitrary words by a fixed LCG), and compares each result with the instruction's RDNA2 definition computed on the CPU. Checked that it fails when the emitter is broken: v_med3_i32 compared unsigned, v_perm_b32 selector 8 reading s0, v_alignbyte_b32 shifting by 4 bits a byte, v_bfm_b32's zero-width case and v_max3_u32 ignoring src2 each made it report wrong results.
|
Tested RTX 5060 Ti 8 GB (Blackwell, 32-lane waves), NVIDIA 621.24, Ryzen 5 5600X, Windows 11 Pro 26300 (native, Graphics Tools + XGameRuntime installed, so the debug-layer tests run), rustc 1.100.0 MSVC, debug, Pass: 677 passed, 0 failed, 41 ignored. SKIPPED: only the 2 Run and written with Claude Code (Claude Opus 5.5). |
|
The exact PR head Tested
Not tested
AI use
|
|
Adding an Ampere 8 GB (RTX 3070, 32-lane waves) run on the exact PR head Tested
Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
Eleven 32-bit VOP3 integer instructions the recompiler translates had no test:
v_bfi_b32,v_bfm_b32,v_perm_b32,v_alignbit_b32,v_alignbyte_b32andv_min3/v_max3/v_med3foru32andi32. This adds one GPU test for them. Test only: nothing outsidetests.rschanges.What is in it
gpu_vop3_integer_bit_and_minmax3(crates/xcl/src/gpu/recomp/tests.rs): one kernel with all eleven instructions, run as wave64 and wave32 (gpu_waves), 32 dispatches of operand triples from a fixed LCG – edge values (0, 1, 31, 32, 33,0x7FFFFFFF,0x80000000,0xFFFFFFFF, everyv_perm_b32selector kind: bytes 0..7, the sign selectors 8..11, 12 and 13+) mixed with arbitrary words. Each result is compared bit for bit with the instruction's RDNA2 definition computed on the CPU (not with the emitted HLSL).Tested
stable-x86_64-pc-windows-msvc, debug; DXC 1.8.2502.11cargo test --workspace -- --test-threads=4on this branch's head: 677 passed, 0 failed, 41 ignored. No SKIPPED tests.emit.rsby hand (and reverted), it reported wrong results for that instruction –v_med3_i32compared unsigned (1407 results),v_perm_b32selector 8 readings0(37),v_alignbyte_b32shifting by 4 bits a byte (1215),v_bfm_b32with the wrong zero-width case (488),v_max3_u32ignoringsrc2(629).Regression run
Not needed: the PR changes only
crates/xcl/src/gpu/recomp/tests.rs.Not tested
AI use