tombox-xshader tests: v_fma_mixhi_f16 keeps the low half of the destination #39
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!39
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/39/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?
@artareias on GitHub · 2026-11-21 18:56 UTC · original
artareias:fix-v-fma-mix→main· +1 −1 · 1 files · 69 commits · closed without mergingProblem
vop::basic::vop3_basicfails 36v_fma_mixhi_f16cases. The expectation is(D16 >> 16) | (lo << 16), which moves the destination's initial high half into the low half. The register starts asD16 = 0xabcd0000, so its low half is0x0000; the test wants0x....abcdwhile the emitter returns0x....0000.The emitter is right: it writes the result into bits
[31:16]and keeps bits[15:0](RDNA 2 ISA guide,V_FMA_MIXLO_F16/V_FMA_MIXHI_F16, p. 173: the result goes to the low or high 16 bits of the destination). Themixloexpectation already keeps the other half in place (D16 | lo), somixhishould mirror it.Change
One expected value in
tests/exec_vop/basic.rs:(D16 >> 16) | (lo << 16)becomes(D16 & 0xffff) | (lo << 16). No emitter change.Testing
Windows 10 19045, MSVC 14.44, rustc 1.100.0, AMD Radeon RX 7600 (
TOMBOX_EXEC_HW=1) and WARP:vop3_basicfailing cases (RX 7600)vop3_basicfailing cases (WARP)v_fma_mixhi_f16failing casesThe change is one expected value inside
vop3_basic; I re-ran that test on both adapters, not the fullexecset. The 19 left are 18v_bfe_i32(#33) and 1v_fma_mix_f32.Observation:
v_fma_mix_f32is not fusedThe remaining case is
(1 + 2^-23) * (1 - 2^-24) - 1, which needs a single rounding (expected0x337ffffe). The emitter computesa * b + cand gets 0. The manual describes these ops as fused multiply-add. Usingtb_fma(asv_fma_f32does) fixes this case on the RX 7600, but on WARP the firstv_fma_mix_f32case then removes the device (0x887a0005) and every later case fails. I did not include that change; I'd rather not trade one failing case for a device removal in the default WARP mode. Noting it in case you know a fused form that WARP accepts.🤖 Generated with Claude Code
@omonkeyz on GitHub · 2026-11-22 13:13 UTC · original
Main's history was rewritten, which auto-closed this PR (sorry for the noise). Already on main (the identical line is there), so nothing is left to apply. Thanks!
@copilot-pull-request-reviewer[bot] on GitHub · 2026-11-21 18:56 UTC · original · reviewed
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Pull request closed