Commit graph

222726 commits

Author SHA1 Message Date
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
Lionel Landwerlin
d6751f2a3b anv: further optimize dirty state after secondary emission
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
Marc Alcala Prieto
94a7d50433 pan: Layer offset is not longer available starting on v14
Setting layer_offset would not cause any issues, but it's ignored by the
GPU. Therefore, removing it for correctness.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41645>
2026-05-19 16:26:00 +00:00
Nanley Chery
ec40c95385 anv: Add transfer_src usage for ANDROID_external_format_resolve
The android extension enables the driver to blit from single-sampled
color attachments.

Adding this image usage expressess that functionality and causes anv to
generate the ISL_FORMAT_RAW-formatted clear color during fast-clears.
This fixes an assert failure when anv tries to override the clear color
format used for a blorp_blit() call to ISL_FORMAT_RAW.

There are other ways to handle this, but this solution is consistent
with our handling of multisample images (which may be resolved as well).

Fixes: 465c186fc5 ("anv: Prepare for format width changes in blorp_copy()")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15463
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41650>
2026-05-19 15:41:52 +00:00
Nanley Chery
da547a1a4d intel/blorp: Halve max bpp for some redescribed blits
We cannot use 128bpp formats with Y-tiling on gfx6 and prior.

Fixes: eb8883f3ef ("intel/blorp: Redescribe surfaces for copies")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15435
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41650>
2026-05-19 15:41:52 +00:00
Marek Olšák
8a68ae989d ac,radeonsi: remove all frag_coord_xy code
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is now dead code. This code is not used by RADV.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41461>
2026-05-19 15:03:51 +00:00
Marek Olšák
e38203f02c radeonsi: don't treat sample_pos as using frag_coord
We always use sample_id to load the sample position from memory.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41461>
2026-05-19 15:03:51 +00:00
Marek Olšák
7ff4454b41 radeonsi: enable nir_frag_coord_use_pixel_coord
no change in behavior other than getting pixel_coord from the beginning
unconditionally

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41461>
2026-05-19 15:03:51 +00:00
Marek Olšák
159f22abbe radeonsi: switch to nir_frag_coord_xy_z_w_separate with w_rcp
FYI, ac_nir_lower_ps_early is only used by radeonsi.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41461>
2026-05-19 15:03:51 +00:00
Marek Olšák
cb66de3beb radv: switch to nir_frag_coord_xy_z_w_separate with w_rcp
Only Cyberpunk affected:

Totals from 10 (0.00% of 202429) affected shaders:
Latency: 337370 -> 337366 (-0.00%)

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41461>
2026-05-19 15:03:50 +00:00
Marek Olšák
63deaf3bfe nir: add nir_frag_coord_use_pixel_coord for OpenGL
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41461>
2026-05-19 15:03:50 +00:00
Marek Olšák
2d8d200c70 nir: change nir_frag_coord_form options to a bitmask
this makes it easier to add more options

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41461>
2026-05-19 15:03:50 +00:00
Marek Olšák
7f5a307c12 nir: handle load_frag_coord_w_rcp in multiple passes, same as non-rcp
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41461>
2026-05-19 15:03:50 +00:00
Marek Olšák
cbdbdd50ad nir: add missing SYSTEM_VALUE_FRAG_COORD_W_RCP
for nir_intrinsic_load_frag_coord_w_rcp.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41461>
2026-05-19 15:03:50 +00:00
Valentine Burley
8b919f9979 panvk/ci: Mark dEQP-VK.subgroups.* as flaky on G925
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/100209404
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/100207249

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41677>
2026-05-19 14:43:11 +00:00
Jose Maria Casanova Crespo
e40989f451 v3dv: advertise VK_EXT_scalar_block_layout on V3D 7.1+
The scalarBlockLayout feature was already exposed via the Vulkan 1.2
feature struct, but Vulkan 1.1 clients (e.g. Dawn) need the EXT to
discover it.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41673>
2026-05-19 14:24:54 +00:00
Jose Maria Casanova Crespo
cd9f2648d3 v3dv: avoid 16F TLB usage for B10G11R11_UFLOAT copies
B10G11R11_UFLOAT_PACK32 maps to V3D_INTERNAL_TYPE_16F on the TLB,
which canonicalizes NaN bit patterns when arbitrary 32 bits are
reinterpreted as that format. The same canonicalization happens in
the blit shader when sampling a B10G11R11 source. Both break the
bit-exactness that vkCmdCopyImage, vkCmdCopyImageToBuffer and
vkCmdCopyBufferToImage require, since the spec defines them as raw
byte copies for any pair of texel-size compatible formats.

Fix it by aliasing the format to R32_UINT whenever B10G11R11 is
involved.

This fixes dEQP-VK.api.copy_and_blit.*b10g11r11*,
dEQP-VK.image.subresource_layout.*b10g11r11* and
dEQP-VK.api.image_clearing.*b10g11r11* failures on V3D 7.1.7 (rpi5)
and V3D 4.2 (rpi4).

Assisted-by: Claude Opus 4.7
Cc: mesa-stable
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41599>
2026-05-19 13:29:35 +00:00
Samuel Pitoiset
b1083190d0 radv: enable radv_wait_for_vm_map_updates for Forza Horizon 6
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It seems to have the same bug as Forza Horizon 5.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41637>
2026-05-19 12:33:10 +00:00
Georg Lehmann
4df9d03e7a spirv: always preserve infinities for FMin, FMax and FClamp
Don't ask me why these game engines do not use NMin and friends,
maybe they don't know those exist.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15481
Backport-to: 26.1

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41661>
2026-05-19 11:45:17 +00:00
Lionel Landwerlin
f19fc91c51 anv: bump max compute workgroup count
The HW can do up to UINT32_MAX but we're using that value to signal
indirect dispatch arguments.

A game like Resident Evil Requiem will use more than 64k on X
dimension.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41592>
2026-05-19 11:23:52 +00:00
Eric Engestrom
a554dd031a Revert "ci/build: restore riscv64 build as it works again"
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This reverts commit 3bb34744fc.

Apparently qemu is flaky now, neither working nor failing reliably,
that's going to be fun for whoever tries to ever re-enable it 🙃

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41672>
2026-05-19 11:34:42 +02:00
Eric Engestrom
3bb34744fc ci/build: restore riscv64 build as it works again
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
No idea what was changed on the runners, but they work now so let's
restore the coverage :)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41669>
2026-05-19 09:39:31 +02:00
Marek Olšák
2d44e1b907 nir/tests: use ASSERT_EQ instead of ASSERT_TRUE in nir_opt_varyings tests
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41329>
2026-05-19 04:26:55 +00:00