Karol Herbst
4f5e2e34d3
ci: update traces due to ffma rework
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:42 +00:00
Karol Herbst
e9c1cce35f
nir: remove ffma_old
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:42 +00:00
Karol Herbst
099e876a38
vtn_bindgen2: keep ffma_weak
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:42 +00:00
Karol Herbst
a140781aec
vtn/opencl: map mad to ffma_weak and fma to ffma
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:42 +00:00
Karol Herbst
09d50cc7a3
vtn: use ffma_weak
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:42 +00:00
Karol Herbst
d534a2057f
vtn: handle OpFmaKHR
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:42 +00:00
Karol Herbst
3e158b713c
vtn/glsl: translate fma as ffma_weak
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:41 +00:00
Karol Herbst
ac679a8504
glsl: translate fma as fma_weak
...
Our glsl compiler only supports OpenGL GLSL and there ffma is not
guaranteed to be fused.
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:41 +00:00
Karol Herbst
5160d6f806
tgsi_to_nir: translate MAD as ffma_weak
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:41 +00:00
Karol Herbst
16d47c246d
vulkan/meta: use nir_op_ffma_weak
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:41 +00:00
Karol Herbst
f3e8a5adda
mesa: use ffma_weak
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:41 +00:00
Karol Herbst
e1aaaf4ed0
nir: make lowering use new ffma opcodes
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:41 +00:00
Karol Herbst
109d93dd98
nir: update ffma helpers to use new opcodes
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:41 +00:00
Karol Herbst
aeea2e7c1f
nir: add fmad_or_ffma helpers and use it in lower_double_ops
...
We skip emitting ffma_weak here, because otherwise we'd require a lowering
loop with opt_algebraic and lower_double_ops and this way it's also
cheaper.
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:40 +00:00
Karol Herbst
eb817b1f63
virgl: advertise new muladd options
...
The "old" nir_to_tgsi_compiler_options enabled fusing for 32 and 64 bit,
and virglrenderer implements TGSI's MAD as an mul+add. But because virgl
also lowered it for 32 bits, we just enable fmad for 64 bit.
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:40 +00:00
Karol Herbst
323a3716a6
svga: use weak_ffma
...
The compiler supports the TGSI MAD instruction which maps to ffma_weak.
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:39 +00:00
Karol Herbst
1a0a329598
lima: support nir_op_fmad
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:39 +00:00
Karol Herbst
85c2023ee4
pvr: use ffma_weak for lowering
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:39 +00:00
Karol Herbst
5404b382fb
pco: port over to nir_op_ffma
...
It says fmad, but it's actually ffma.
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:39 +00:00
Karol Herbst
255811703f
etnaviv: port over to nir_op_fmad
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:39 +00:00
Karol Herbst
1d359cc677
d3d12: use nir_op_ffma_weak
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:39 +00:00
Karol Herbst
9bbb92a7cb
microsoft/compiler: support nir_op_ffma
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:38 +00:00
Karol Herbst
536ff644fa
bitfrost: support nir_op_ffma
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:38 +00:00
Karol Herbst
d823512442
kk: support nir_op_ffma
...
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:38 +00:00
Karol Herbst
59d994c8ca
agx: port over to nir_op_ffma
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:38 +00:00
Karol Herbst
5eb7d7d63b
r300: port over to nir_op_fmad
...
r300 doesn't advertise any fp64 support, so let's not set float_mul_add64
despite fuse_ffma64 being set.
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:37 +00:00
Karol Herbst
89868d37ce
r600,sfn: support new multadd opcodes
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:37 +00:00
Karol Herbst
eec83fd9f6
radeonsi: advertize new float multadd options
...
ac already handles advertizing fmad and ffma support, so simply decide
when nir should fuse, because radeonsi contrary to radv doesn't let aco do
all the fusing itself.
Also unset splitting for force_use_fma32 handling.
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:37 +00:00
Karol Herbst
6cf3cba68c
radv: use nir_op_ffma_weak
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:36 +00:00
Karol Herbst
3e334ea0d3
aco: support new multadd opcodes
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:36 +00:00
Karol Herbst
04696f9bf9
ac/llvm: support new multadd opcodes
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:35 +00:00
Karol Herbst
a80e254fd4
ac: use nir_op_ffma_weak
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:35 +00:00
Karol Herbst
570bfe1ee0
ac: handle new float multadd opcodes
...
This advertizes both ffma and fmad on a couple of chipsets to support
VK_KHR_shader_fma and to improve OpenCL fma performance, where fma is not
optional and the emulation is more expensive than slow fma.
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:35 +00:00
Karol Herbst
0082745b0a
tu: use nir_op_ffma_weak in lowering
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:35 +00:00
Karol Herbst
c473a76e1e
freedreno/ir2: use nir_op_fmad
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:35 +00:00
Karol Herbst
acad18d97e
ir3: port to nir_op_fmad
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:34 +00:00
Karol Herbst
d2f4b2d8e9
zink: port over to nir_op_ffma_weak
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:34 +00:00
Karol Herbst
4307f42b9e
nak: port over to nir_op_ffma
...
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:34 +00:00
Karol Herbst
55596204e4
nv30: advertize new float multadd options
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:34 +00:00
Karol Herbst
a140624691
nv50/ir: port over to new multadd opcodes
...
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:33 +00:00
Karol Herbst
246a431b41
i915: support nir_op_fmad
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:33 +00:00
Karol Herbst
a9206a271a
intel/brw: port over to nir_op_ffma
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:33 +00:00
Karol Herbst
6208a590cb
intel/jay: support nir_op_ffma
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:32 +00:00
Karol Herbst
df69364e69
intel/elk: port over to nir_op_ffma
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:32 +00:00
Karol Herbst
3d044b1b91
softpipe: keep weak_ffmas around
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:32 +00:00
Karol Herbst
eb4c6ad4db
llvmpipe: port over to ffma_weak
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:31 +00:00
Karol Herbst
2a6633a8ba
ntt: use ffma_weak
...
It used the TGSI MAD opcode to implement the old ffma, but this one let's
the driver choose to implement it as unfused or fused, so ffma_weak is a
better git over ffma or fmad.
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:31 +00:00
Karol Herbst
688e5cda94
nir/tests: use ffma_weak
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:31 +00:00
Karol Herbst
b7094546f4
nir: duplicate old ffma opts where necessary for new multadd ones
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:30 +00:00
Karol Herbst
86007ae1ad
nir: handle new multadd opcodes in helpers
...
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165 >
2026-05-19 18:13:30 +00:00