Repository navigation
Tests: VOP1 bit scans, bit reversal and not on the GPU - #736
marquezinii wants to merge 1 commit into
Conversation
v_ffbh_u32, v_ffbl_b32, v_ffbh_i32, v_bfrev_b32 and v_not_b32 are translated but no test ran them. The new test compares each with the ISA's pseudo-code (the loops, not the closed forms emit.rs uses) on 20 edge words and LCG words, as wave64 and wave32, with VGPR, SGPR, inline-constant and literal sources.
|
Test run of Tested
Review: The references match the ISA: the bit scans return −1 (0xFFFFFFFF) for 0, Not tested: no retail title or regression run (I have no unpacked game), no Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code. |
|
Test report for Tested
17 test binaries: 701 passed, 1 failed, 41 ignored. Same machine, This PR's tests:
Failures:
SKIPPED (no wave64 on this GPU): AI use: Claude Code (Claude Opus 5.5) ran the builds and tests and wrote this report from their output. |
v_ffbh_u32,v_ffbl_b32,v_ffbh_i32,v_bfrev_b32andv_not_b32are translated byemit.rsbut no test runs them, and no open PR covers them (#445, #638, #703 and #699 take the other untested integer ops). This adds one GPU test for the five. Test only: nothing outsidetests.rschanges.What is in it
gpu_vop1_bit_scans_and_reverse(crates/xcl/src/gpu/recomp/tests.rs): one kernel run throughgpu_waves. Inputs are 20 edge words (0, 1, -1, -2, the sign bit alone and with bit 0,0x7FFFFFFF,0xBFFFFFFF,0xC0000000, …) followed by LCG words, half of them with their low bits cleared so the scans from the bottom see long zero runs. Each result is compared with the ISA pseudo-code written as the loops it describes, not the closed formsemit.rsuses. Besides VGPR sources it covers an SGPR source, the inline constant 0 and a literal.Tested
stable-x86_64-pc-windows-msvc, debug; DXC 1.9.2602.17 (Windows SDK 10.0.26100.0)cargo test --workspace -- --test-threads=1on this branch: 702 passed, 0 failed, 41 ignoredcargo test --workspace -- --test-threads=4: the first run onmainf4ce27c was 701 passed, 0 failed, 41 ignored. After that, every run of the same command failed 3 tests, with this branch and withmainalike:placed_title_textures_share_vram_and_preserve_pixels("cubemap extra_pages must be reused at same va"), thentransitions_apply_when_their_list_is_submittedandd32s8_targets_take_their_own_size_of_video_memoryon the poisoned lock it leaves. They pass alone and single-threaded. This looks like the interaction in Tests: gpu_sparse_vram_descriptors_buffers_and_xmem fails beside the title-texture tests since #288 #343 / Tests: check cubemap tile reuse independently of idle page reclamation #447, not this change.gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no wave64)emit.rsby hand (and reverted) it reported wrong results:v_ffbh_u32without its zero case (33),ffbh_iwithout the sign inversion (48),v_bfrev_b32as a plain move (61). Removing the zero case ofv_ffbl_b32does not fail it, because HLSL'sfirstbitlow(0)is already0xFFFFFFFF.Regression run
Not needed: the PR changes only
crates/xcl/src/gpu/recomp/tests.rs.Not tested
gpu_wavesran the kernel as wave32AI use