Recompiler tests: GPU checks for three-input VOP3 logic and add-shift #545
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!545
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/545/head"
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?
@13hourstilliland on GitHub · 2026-11-24 01:36 UTC · original
13hourstilliland:recomp-vop3-three-input-tests→main· +52 −0 · 1 files · 1 commits · closed without mergingAdds a GPU test for six RDNA2 VOP3 instructions that
emit.rsalready translates but no test runs:v_or3_b32,v_xor3_b32,v_and_or_b32,v_lshl_or_b32,v_add_lshl_u32andv_xad_u32. Test only, no runtime change.What is in it
gpu_vop3_three_input_logic_and_add_shiftincrates/xcl/src/gpu/recomp/tests.rs, built like the open #445: one kernel with all six instructions, run as wave64 where the adapter has it and as wave32 everywhere (gpu_waves), 32 waves of operand triples from a fixed LCG mixed with edge values (0, 1, 31, 32, 33, 0x7FFFFFFF, 0x80000000, 0xFFFFFFFF, ...), each lane compared with the RDNA2 definition computed on the CPU. Shift counts use their low five bits and adds wrap.v_xad_u32is(a ^ b) + c, as in LLVM's AMDGPU patterns (ThreeOp_i32_Pats<xor, add, V_XAD_U32_e64>).gpu_valu_16_and_64_bit, away from the lines #445 and #202 add to, so it does not conflict with them.emit.rsexpressions changed on a local copy (or3 emitted with an xor, xor3 with an or, and_or with an xor, lshl_or with a 4-bit shift mask, add_lshl shifting only b, xad with an or), the test fails and names only that instruction (361 to 838 of 1024 lane results wrong). Those edits are not in the PR.Tested
stable-x86_64-pc-windows-gnu(MinGW linker), DXC 1.9.2609.5, debug build, commit7f6f458(identical tree to 6d9c320, author metadata amended; on main508a0c7)cargo test --workspace --no-fail-fast -- --test-threads=4, run in the interactive desktop session: 681 passed, 0 failed, 41 ignored (lib: 641 passed, 0 failed, 21 ignored; every other test binary ok,e2e3 of 3,gpu_vop3_three_input_logic_and_add_shiftok)SKIPPED(no wave64 on this GPU):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardwareNot tested
stable-x86_64-pc-windows-msvc): built with the GNU toolchain only.crates/xcl/srcruntime file changes).AI use
@WebIdentity1 on GitHub · 2026-11-24 01:50 UTC · original
Additional MSVC / wave64 validation for
7f6f4588da41ef1d33c5367ef80cf35b78cf398a: applied this PR's 52-line test patch to #546 head526f93cb1f1b6f5fb798514b246b76d5c686a05d, both based on main508a0c7. No runtime changes. #546 makes the shared helpers run both wave sizes, using split wave64 on NVIDIA.Tested
stable-x86_64-pc-windows-msvc, debug, SDK DXC 1.8.2502.11, public Agility 1.620.2.cargo test --locked -p xcl --lib gpu_vop3_three_input_logic_and_add_shift -- --nocapture --test-threads=1:XCL_ADAPTER=NVIDIA GeForce RTX 3090, driver 591.74,XCL_REQUIRE_GPU=mesh: 1 passed / 0 failed / 0 ignored, 662 filtered out, no skips. Both wave32 and split wave64 were checked by the combined helpers.XCL_ADAPTER=AMD Radeon(TM) Graphics, driver 32.0.21030.2001,XCL_REQUIRE_GPU=wave64,XCL_SPLIT_WAVE64unset: 1 passed / 0 failed / 0 ignored, 662 filtered out, no skips. Both native wave64 and wave32 were checked.tests.rsSHA256 is5eaf62a97856b9467ca47bee61a0e8f3f02dc0bdf2412f421ece3529437d41d4; verified against the remote source. Patches and logs retained locally.Not tested
Full workspace on this combined tree, release build, retail titles or console hardware. This report covers the PR combined with the separate test-helper change, not an unmodified run of this PR head. I did not repeat the author's mutation checks.
AI use
Codex (GPT-6) prepared the test-only integration, ran native Windows tests and wrote this report.
@Diskuss on GitHub · 2026-11-24 08:39 UTC · original · edited 2026-11-24 09:29 UTC
Tested on AMD Radeon RX 9070 XT (RDNA4) at
7f6f4588da41ef1d33c5367ef80cf35b78cf398aRyzen 7 5700X3D, 32 GB RAM, Windows 11 Pro build 26300.9974, driver 32.0.32015.7029, Rust 1.100.0 x86_64-pc-windows-msvc, DXC 1.9.2602.17, debug build.
Tested:
cargo build --workspace: OK.cargo test --workspace --no-fail-fast -- --test-threads=4: 681 passed, 0 failed, 41 ignored.cargo test -p xcl --lib gpu_vop3_three_input_logic_and_add_shift -- --test-threads=1: 1 passed, 0 failed. No SKIPPED line on stderr.gpu_waves(), which includes wave64 whenwave64_supported()is true. The test does not log which waves it ran, so I did not see wave64 directly. I infer it ran from the absence of SKIPPED and the pass.1ec4c98gave 715 passed, 0 failed, 41 ignored. The lower passed count is expected: this branch is 57 commits behind main.Not tested: retail title /
scripts/smoke.ps1(no game files), release build.Report written by Claude Code (Claude Sonnet 5.5) from a real run on this machine.
Correction (hidden skips): "0 SKIPPED" above means no
SKIPPEDline appeared in the normal run. A later-- --nocapturerun on this machine shows that two tests skip silently, because the D3D12 debug layer is not installed (no Graphics Tools /d3d12SDKLayers.dll). libtest captures their output, so they show asok:e2e::test_title_draws_with_a_root_signature_under_the_debug_layerandtexture_states::uploads_start_from_each_subresources_state. Neither is related to this change, and all other GPU tests ran on the RX 9070 XT.@ivall on GitHub · 2026-11-24 11:20 UTC · original
Closing as overlapping test coverage is proposed in #703, which covers the same six operations and additional instructions. Neither PR has been merged yet. Thank you for the contribution.
Pull request closed