shader: on RDNA2, VOP3 0x140 and VOP2 0x006 are v_fma_legacy_f32 and v_fmac_legacy_f32 (one rounding) #321
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by gagarinyury on 2026-11-27T11:21:55Z.
The opcode table names VOP3 0x140
v_mad_legacy_f32and VOP2 0x006v_mac_legacy_f32, and the lowering multiplies with the legacy rule and then adds, rounding twice. That is GFX10.1. On GFX10.3 (RDNA2) these encodings arev_fma_legacy_f32andv_fmac_legacy_f32, fused:llvm-mc -mcpu=gfx1030assemblesv_fma_legacy_f32 v0, v1, v2, v3to the same bytes as gfx1010'sv_mad_legacy_f32and rejectsv_mad_legacy_f32as "not supported on this GPU"; gfx1010 and gfx1013 do the opposite (GFX10_3InstsimpliesFeatureFmaLegacy32Insts, and VOP2 0x006 isV_FMAC_LEGACY_F32in the GFX10_B decoder namespace). The legacy zero rule (0 times anything is 0) stays; only the product's rounding changes, so results differ by at most one rounding step where the product is inexact.semantics_testsmodels both asmad_legacy.Plan: rename both, lower them as a fused multiply-add with the legacy zero rule, and update the semantics model.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by gagarinyury on 2026-11-27T11:22:14Z.
/claim
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-27T11:22:25Z.
Claimed by @gagarinyury. Open a draft pull request with
Refs #321in its description within 24 hours, or the claim expires.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-28T00:36:15Z.
Thank you for this. It is fixed on main by #323. I have not checked every case from this report in the game myself, so please retest on main
a6a58361and reopen this if you still see it. Closing as fixed.