Commit graph

222748 commits

Author SHA1 Message Date
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
Karol Herbst
68dc336af7 nir: handle new multadd opcodes in lowerings and opts
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
bb2b7c58fc nir/opt_algebraic: add fmad and ffma_weak lowering rules
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:28 +00:00
Karol Herbst
9ffa7c826f nir/tests: handle 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:28 +00:00
Karol Herbst
7ce841cb71 nir: validate new float_mul_add options
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:28 +00:00
Karol Herbst
32e91a7467 nir: add new float multiply-add opcodes
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:28 +00:00
Karol Herbst
0251be32cb nir: rename nir_fmad to nir_fmad_old
We'll add a new opcode called fmad and this would conflict with the
helper.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:27 +00:00
Karol Herbst
a9b18f8607 nir: rename ffma to ffma_old
We'll get three new opcodes to properly model float multiply-add.
ffma_old is temporary and will be deleted at the end of this series.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:27 +00:00
Karol Herbst
bdb5301281 lima: rename ppir_op_ffma to ppir_op_fmad
It's not actually a fused operation.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:25 +00:00
Karol Herbst
337018fcbb glsl/softfp: rename ffma to fmad
They were always implemented as unfused.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:25 +00:00
Samuel Pitoiset
29b86874c3 radv: move radv_GetDeviceFaultInfoEXT() to radv_device.c
Because radv_debug.c will be moved to a subdirectory called tools/ and
this is entrypoint from VK_EXT_device_fault.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41598>
2026-05-19 17:48:46 +00:00
Samuel Pitoiset
4dc158a8cb radv: remove an outdated comment in radv_GetDeviceFaultInfoEXT()
The driver exports GPU hang reports already.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41598>
2026-05-19 17:48:46 +00:00
Samuel Pitoiset
d348e324da radv: advertise VK_EXT_device_fault by default
This is can still be useful if the kernel has no GPUVM query support
becuse it's possible to export GPU hang reports.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41598>
2026-05-19 17:48:45 +00:00
squidbus
840952cc35 kk: Enable maintenance extensions through VK_KHR_maintenance10
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Full CTS tests pass.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41663>
2026-05-19 17:28:18 +00:00
squidbus
8aae6232ab kk: Support new query pool and dynamic rendering flags
New flags allow for reseting query pools on create and configuring
new resolve options on render pass resolves.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41663>
2026-05-19 17:28:18 +00:00
squidbus
9027793074 kk: Fix image copies for depth/stencil<->color and differing subresources
The buffer copy path needs to account for depth/stencil aspect copies
to compatible color formats. It also must account for differing image
subresource ranges; for example the depth/stencil <-> color tests copy
from level 0 to level 3.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41663>
2026-05-19 17:28:18 +00:00
squidbus
7033dee54f kk: Support device without queue
Queue-less devices can be used for compiling pipelines.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41663>
2026-05-19 17:28:18 +00:00
squidbus
e503f8399a kk: Disable A8_UNORM format
Opaque black border does not work properly and needs working around.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41663>
2026-05-19 17:28:18 +00:00
squidbus
6b6a8cbe67 kk: Handle accurate OpSMod and default point size requirements
Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41663>
2026-05-19 17:28:18 +00:00
squidbus
a512fec6b9 kk: Implement index buffer robustness for BindIndexBuffer2
Re-uses unroll logic to create padded index buffer. We only need to
handle it when the bound range is a subset of the buffer.

This could be optimized, particularly for indirect case, by using
a separate shader program which creates an indirect command buffer
to issue the draw command. However, Metal 4 provides a command for
indexed draws that takes a GPU address and length, and is documented
to provide the robustness guarantees we need, so this solution is
only really needed short-term until Metal 4 encoders.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41663>
2026-05-19 17:28:18 +00:00
squidbus
65acc110d4 kk: Create image layout from vk_image
`vk_image_init` sanitizes create info parameters for us, which we should
use instead.

For example, `maintenance5` blit-with-remaining-layers tests pass the layer
count in `depth` and later pull it out inside the test to set the `arrayLayers`.
They do not reset `depth` to 1, but `vk_image_create` sanitizes it for us.

While we're here, also pull out the extra stencil plane created from original
NVK code, as we don't use it.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41663>
2026-05-19 17:28:18 +00:00
Lionel Landwerlin
7882321d4f anv: only reprogram line-stipple if enabled
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41581>
2026-05-19 16:53:38 +00:00