tombox-xshader tests: bit-exact v_cmp_class_f32 / v_cmpx_class_f32 and buffer_gl0_inv / buffer_gl1_inv #305
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!305
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/305/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 17:13 UTC · original
MeNoSkills:test/class-gl-inv→main· +128 −0 · 3 files · 1 commits · closed without mergingTest only, no change to the translator. It adds exec tests for three mnemonics that the full hardware run with
TOMBOX_EXEC_VERIFIED(main plus my open test PRs) still left in no group:v_cmp_class_f32(19 uses in the analysed titles; only thexform and the f16/f64 forms had exec tests),buffer_gl0_invandbuffer_gl1_inv(192 uses each).What is added
vopc_class_f32(exec_vop/vopc.rs, the f32 twin ofvopc_class_f16): 16 representative values (signalling and quiet NaN of both signs, +-inf, +-normal, +-denormal, +-0, largest and smallest normal, a NaN with the quiet bit as the only payload) against six masks each (the class's own bit, every other bit, an alternating pattern, own bit plus garbage in the upper 22 bits, none, all). The expected class comes from the IEEE bit pattern in the test, not from the translator.v_cmp_class_f32andv_cmpx_class_f32, in the VOPC encoding and in VOP3 with everyabs/negcombination (the modifiers act on the sign before the classification), inline float and integer constants and a 32-bit literal as the first operand, and the exec-zero case.buffer_gl_inv_leaves_the_buffer_contents_alone(exec_mem/cache_inv.rs):buffer_gl0_invandbuffer_gl1_inv, with and without a store to the same dword just before, at three offsets: the following load must return the stored (or the original) value and the rest of the buffer is compared. The translator lowers both as no-ops, so this pins that they neither change memory nor drop an earlier store.Results
All pass on an NVIDIA RTX 4070 Ti (Windows 10 build 19045, MSVC,
TOMBOX_EXEC_HW=1); withTOMBOX_EXEC_VERIFIEDset they writevopc_class_f32.txt(v_cmp_class_f32,v_cmpx_class_f32) andbuffer_gl_inv.txt(both gl invalidates). Sensitivity check: moving the quiet-NaN bit test intb_cmp_class(0x400000uto0x200000u) makesvopc_class_f32fail; reverted, not in the PR.python .github/scripts/pr_gate.py --base upstream/main --head HEAD: 0 problems; the branch is on mainf89e410.State of the gap list
The full run (145 passed, 0 failed, 2 ignored; plus
isa_sweep2 passed) on a branch with #284, #286, #287, #297 and #298 merged leaves 16 of 817 mnemonics in no group:v_interp_p1_f32,v_interp_p2_f32,v_interp_mov_f32: the tests from #287 run throughdraw_graphicsand do not callverified(); I will send that one-line change after #287 lands, to avoid touching a file the maintainer has already applied.v_cmp_class_f32,buffer_gl0_inv,buffer_gl1_inv: this PR.image_sample_c_l,image_gather4_c: tested inmimg.rs, but they need a shader model above the 6.5 of this machine's runtime, so the harness skips them here; they should verify on a newer runtime.ds_ordered_count,ds_gws_barrier,ds_gws_init,ds_gws_sema_br,ds_gws_sema_v,ds_gws_sema_p,ds_gws_sema_release_all,s_sendmsghalt: refused by the translator on purpose (0 uses in the analysed titles), nothing to verify.@QuentinDanblon on GitHub · 2026-11-23 18:37 UTC · original
Ran this PR's four tests on an NVIDIA RTX 5090 (driver 617.42, shader model 6.8,
TOMBOX_EXEC_HW=1) and on WARP: all pass on both, includingimage_mimg_compare_gatherandimage_mimg_gather_explicit_lod, so the SM > 6.5 cases forimage_sample_c_landimage_gather4_crun there with 0 skipped and match the reference bit-exact.@omonkeyz on GitHub · 2026-11-25 13:49 UTC · original
Applied on main in
36079a1(cherry-picked onto the current history with your authorship kept; comment lines stripped per CONTRIBUTING). Thank you.Pull request closed