shader: lower v_mac_legacy_f32 in pixel_aot #775
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/781"
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 R0Y00/Xbox2Windows. Originally posted by JB2WIN on 2026-11-23T02:57:09Z.
Change
tools/pixel_aot.pynow lowersv_mac_legacy_f32: the e32 form, and e64 withclampand source modifiers. The result isD = legacy_mul(S0, S1) + D, with the destination as the tied accumulator. It reuses the existingmad_legacyexpression, so0 * xis 0 even for an infinite or NaNx, and the add is unfused.Semantics source is LLVM 15.0.7
VOP2Instructions.td:let HasExtDPP = 0, HasExt32BitDPP = 0 in def VOP_MAC_LEGACY_F32 : VOP_MAC <f32>;defm V_MAC_LEGACY_F32 : VOP2Inst <"v_mac_legacy_f32", VOP_MAC_LEGACY_F32>;, underConstraints = "$vdst = $src2"andisGFX6GFX7GFX10.Encodings. On gfx1013, LLVM 15 prints
v_mac_legacy_f32_e32 v1, v2, v3with the suffix:[0x02,0x07,0x02,0x0c]. The e64 form is[0x01,0x00,0x06,0xd5,0x02,0x07,0x02,0x00].Refused. These stay refused:
DPP_ALU;v_fmac_legacy_f32, which is "not supported on this GPU" for gfx1013;An untracked accumulator is refused the same way as for
v_mac_f32.AI-assisted (Claude Code).
Verification
Environment: Windows 11 10.0.26200.9974, NVIDIA GeForce RTX 3080 (driver 32.0.16.2124) and WARP 10.0.26100.9818. The D3D12 debug layer was enabled. Head is rebased on current
main.draw-mac-legacy(pixel_aot_mac_legacy_{hardware,warp}):clamp.rdna2_tools_check.pyfail.DPP_ALUexclusion, the table assertion fails.ctest --preset dev --no-tests=error -R "^pixel_aot_mac_legacy_": 2/2 passed. It takes 5.4 s on the RTX 3080 and 1.9 s on WARP.ctest --preset dev --no-tests=error: 346/346 passed. Skipped:bvh_wave64_hardware,bvh_wave64_warpandwave_shuffle_warp.tests/pixel_aot_check.py binarywith LLVM 15.0.7, through a localclang -cc1asshim forllvm-mc: exit 0.form_coverage_check.py,rdna2_tools_check.py,pso_readiness_check.pyanddocs_links_check.pypass.docs/coverage/rdna2.tsvdoes not list this form. gfx1030 hasv_fmac_legacy_f32instead, so the coverage counts only for gfx1013.🤖 Generated with Claude Code