tombox-xshader tests: bit-exact buffer_load/store_dwordx2/3/4, buffer_*_format_*, buffer_atomic_swap/umin and v_mbcnt_lo/hi #297
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
library
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/omonkeyz--xbox-emulator!297
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/297/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?
@MeNoSkills on GitHub · 2026-11-23 16:41 UTC · original
MeNoSkills:test/mubuf-wide→main· +290 −0 · 4 files · 1 commits · closed without mergingTest only, no change to the translator. It adds the first bit-exact exec cases for MUBUF and VOP3 instructions that no exec group verified until now (the
TOMBOX_EXEC_VERIFIEDmethod from #286: of 817 mnemonics, 40 are in no group).What is added
tests/exec_mem/mubuf_wide.rs(compute harness for the plain dword forms, the pixel resource harness for the format and atomic forms):buffer_load_dwordx2,_x3,_x4: each of the four addressing forms (VGPR offset, immediate only, VGPR + immediate + SGPR, SOFFSET only) at four offsets; every loaded register is checked, and the register right after the last one is checked to be untouched (matters forx3, which must not write a fourth register). Note the RDNA2 opcode order:x4is 0x0e andx3is 0x0f (stores: 0x1e / 0x1f); the decode check in the harness would flag a swapped table.buffer_store_dwordx2,_x3,_x4: the same addressing forms; the whole 16-dword buffer is compared afterwards, so a store that writes too many or too few dwords fails.buffer_load_format_x/xy/xyz/xyzw: on a float-typed view (R32_FLOAT elements: unused channels read 0, 0, 1.0) and on a uint-typed view (RGBA32_UINT elements, selected by an integer use of the loaded registers). VDATA at v2, v3 and v4 so that every component is observed through the exported registers, and the registers past the last component must keep their value.buffer_store_format_xyzwon the uint view (four dwords of element idx) and on the float view (only x lands, neighbours untouched).buffer_atomic_swapandbuffer_atomic_umin, with and without GLC (returned value vs the data register), on eight (word, data) pairs including 0, 0xffffffff and 0x80000000.tests/exec_vop/mbcnt.rs:v_mbcnt_lo_u32_b32andv_mbcnt_hi_u32_b32(VOP3 0x365 / 0x366, 277 uses in the analysed titles). One invocation is one lane with nothing below it, so the result is the second operand whatever the mask; 6 masks x 5 addends plus inline-constant operands.Expected values come from the instruction semantics and the test data, not from the translator. Each case also runs a second time with its inputs coming from registers at run time, as the other groups in these files do.
Results
All pass on WARP and on an NVIDIA RTX 4070 Ti (Windows 10 build 19045, MSVC,
TOMBOX_EXEC_HW=1); the 8 new tests take about 9 s. They found no difference with the translator, so this adds coverage and no fix. Sensitivity check: makingmubuf_dwordsreturn 4 fordwordx3and making the typed load always read channel x makes 4 of the 7 buffer tests fail; both mutations were reverted and are not in the PR. WithTOMBOX_EXEC_VERIFIEDset, the new groups add 13 mnemonics to the verified set (buffer_load_dwordx2/3/4,buffer_store_dwordx2/3/4,buffer_load_format_x/xy/xyz/xyzw,buffer_store_format_xyzw,buffer_atomic_swap,buffer_atomic_umin), plus the twov_mbcntones.python .github/scripts/pr_gate.py --base upstream/main --head HEAD: 0 problems; the branch is on mainf89e410.What this does not check
infer_tbuf_types); the float and uint views are the two that the harness can create. Integer-format buffers other than uint4 remain the known gap (#105, owned by someone else, not touched here).v_mbcntonly for lane 0: a wave with several lanes is outside the one-lane-per-invocation model.@omonkeyz on GitHub · 2026-11-25 13:48 UTC · original
Applied on main in
a0feb8f(cherry-picked onto the current history with your authorship kept; comment lines stripped per CONTRIBUTING). Thank you.Pull request closed