compute: lower op_sel on VOP3 v_fma_f16 in direct compute #3234
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3234"
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 Leyukaka on 2026-11-28T00:14:05Z.
Fixes #3233. Part of #2935. Target branch
main.Change (
src/gfx1013_direct_compute.inl, the binary16 FMA lowering inDirectCompute::float_alu): VOP3v_fma_f16acceptsop_sel.op_sel: "the last value controls destination", 0 selects the low bits and 1 the high bits). That page does not say what happens to the other destination half. Keeping it mirrors whatmainalready does for the low-half write. I have not measured it on console hardware.op_selon an SGPR or constant source, with the new message "unsupported v_fma_f16 high-half op_sel on non-VGPR source";op_selwith clamp;v_fmac_f16withop_sel;tests/native_fma_f16_check.py: the one refusal control that used a VGPR source selection now uses an inline-constant source, which stays refused.Tests. The setup was Windows 11 with an NVIDIA GeForce RTX 5080 and DXC from the Windows SDK 10.0.26100, on
main14d56502plus this commit.native_fma_f16_opsel_irandnative_fma_f16_opsel_hardware(wave32 request, groups 0 and 1, EXEC set before the per-lane setup) cover the seven forms found in the captured requests.0xABCD1234, so a wrong destination half also changes the kept half.tests/f16_packed_model.py:0xABCD4980,0xABCD4880,0xABCD4A80,0x4E001234,0x4D001234,0x4CC01234and0x45001234.v_fmac_f16DPP, and clamp withop_sel.main'snative_compute_ir_dump, the new test fails with "unsupported v_fma_f16 high-half op_sel".-R "native_fma_f16|native_f16|native_sdwa_f16|native_packed|native_cvt_f16|native_direct_container".Measured with
compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests, onmain14d56502and with this commit.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-28T01:07:28Z.
Review: APPROVED
Independent review of
728b5fe057integrated over main7364e6a9, tree a63cbe956636157d3cab71a4d025619540f81bc0. The VOP3 selector reads the requested VGPR halves before abs/neg and preserves the other destination half. The three refusal cases still reject selected non-VGPR operands, DPP on FMAC and clamp on the new op_sel path. The replay checks 14 exact result words across two groups and all guards.Debug and Release /O2 each passed all nine tested entries, including the existing packed F16 and slot-67 wave-size checks. Windows 11 26200.9974, RTX 4060 Laptop driver 32.0.16.1656. No skips. Main has since added #3229's runtime-only output diagnostics and its fixture, outside the compiler and standalone replay inputs tested here.