Commit graph

222504 commits

Author SHA1 Message Date
Marc Alcala Prieto
5666c0cafc panfrost: Build the Gallium driver for v14
Enable building panfrost for v14.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41081>
2026-05-13 17:37:36 +00:00
Marc Alcala Prieto
9d866a0729 panfrost: Implement RUN_FRAGMENT2 on the Gallium driver
Added structure pan_fb_state and related logic to store and emit the
fragment state.

Also, move some temporary registers to non-conflicting ones.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41081>
2026-05-13 17:37:36 +00:00
Marc Alcala Prieto
f36ba515d3 pan/bi,va: Use dedicated LD_VAR_BUF_FLAT* opcodes on v14+
On v14+, flat source formats are no longer supported by LD_VAR_BUF and
LD_VAR_BUF_IMM opcodes. This patch makes the compiler emit the
dedicated LD_VAR_BUF_FLAT* opcodes instead.

Add the ISA definitions, handle the new opcodes, and add packing tests
for both immediate and indirect forms.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41081>
2026-05-13 17:37:36 +00:00
Marc Alcala Prieto
aed500c3f7 pan/va: Fix packing test for LdVarBufImmF16 on v11
Encoding for LdVarBufImmF16 on v11 changed compared to v10. Updated the
test to check for the right encoding.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41081>
2026-05-13 17:37:36 +00:00
Marc Alcala Prieto
05faa0e648 pan: Add v14 support
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41081>
2026-05-13 17:37:35 +00:00
Marc Alcala Prieto
0350d2d094 panvk: Build for v14
Enable building panvk for v14.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41081>
2026-05-13 17:37:35 +00:00
Marc Alcala Prieto
9af40de9ef panvk: Handle provoking vertex and simultaneous reuse on v14
The provoking vertex bit in RUN_FRAGMENT2 is located in a register
instead of a descriptor stored in memory. That means we don't need to
patch memory, resulting in a much leaner implementation compared to
RUN_FRAGMENT.

Also, implement the simultaneous reuse copy path with the corresponding
tiler pointer patching.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41081>
2026-05-13 17:37:35 +00:00
Marc Alcala Prieto
a7ae37656d panvk: Implement RUN_FRAGMENT2
Added structure panvk_fb_layer_state and related logic to store and emit
per-layer fragment state.

Also, move some temporary registers to non-conflicting ones.

Incremental rendering is left as TODO for later.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41081>
2026-05-13 17:37:35 +00:00
Marc Alcala Prieto
1f2edeb54a pan/lib: Build for v14
Enable building libpanfrost for v14. Also, modify format mappings to
account for the new architecture specification.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41081>
2026-05-13 17:37:35 +00:00
Marc Alcala Prieto
bc5d206eb5 pan/afrc: Add v14+ AFRC YUV compression mappings
v14+ no longer uses specific AFRC compression formats for YUV. Instead,
generic R8/R8G8 and R10/R10G10 formats are used.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41081>
2026-05-13 17:37:35 +00:00
Marc Alcala Prieto
8e9d2326ba pan/afbc: Add v14+ AFBC YUV compression mappings
On v14+, many AFBC YUV modes map to generic RGB compression modes.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41081>
2026-05-13 17:37:35 +00:00
Marc Alcala Prieto
ce3f5b2ba3 pan/format: Add v14+ YUV pipe format mappings
Map the multiplane and special internal formats to the new v14+ YUV
formats. Note v14+ has a much simplified list of formats.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41081>
2026-05-13 17:37:35 +00:00
Marc Alcala Prieto
37b5cb614d pan/texture: Add v14+ YUV pipe format mappings
v14+ no longer uses specific clump formats for YUV.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41081>
2026-05-13 17:37:35 +00:00
Marc Alcala Prieto
af35fc44a7 pan/desc: Implement pan_emit_fbd for v14+
Also, modify pan_emit_fbd's signature to take a pointer to
pan_fbd_descs.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41081>
2026-05-13 17:37:35 +00:00
Marc Alcala Prieto
9421888623 pan/fb: Implement pan_emit_fb_desc for v14+
Also, modify pan_emit_fb_desc's signature to take a pointer to
pan_fb_descs.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41081>
2026-05-13 17:37:35 +00:00
Marc Alcala Prieto
50a3f5ccdb pan/clc: Build for v14
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41081>
2026-05-13 17:37:34 +00:00
Marc Alcala Prieto
68c17e0157 pan/genxml: Build libpanfrost_decode for v14
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41081>
2026-05-13 17:37:34 +00:00
Marc Alcala Prieto
53f95c5646 pan/decode: Remove progress-related decoding logic
Progress is no longer encoded by the CS builder.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41081>
2026-05-13 17:37:34 +00:00
Marc Alcala Prieto
a5681aade4 pan/genxml: Implement RUN_FRAGMENT2
Add support for emitting and decoding RUN_FRAGMENT2 instructions.

Some existing decoding logic from decode.c is modified to be reusable
by the new RUN_FRAGMENT2 decoding logic.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41081>
2026-05-13 17:37:34 +00:00
Marc Alcala Prieto
4258888f4d pan/genxml: Add v14 definition
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41081>
2026-05-13 17:37:34 +00:00
Marc Alcala Prieto
f27d5b5884 pan/genxml: Add missing enum values on v9-v13
Note block-linear interleaved clump orderings are not supported on all
v10 architectures.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41081>
2026-05-13 17:37:33 +00:00
johniyoods
fb0123f42e egl/dri2: require valid render fd before advertising EGL_WL_bind_wayland_display
Commit 718ef151f2 removed the legacy non-dmabuf wl_drm path and now
gates the extension on has_dmabuf_import && has_dmabuf_export. These
flags reflect driver capability and do not depend on whether a valid DRM
render fd was assigned during display initialization.
Before commit 718ef151f2, dri2_get_capabilities() returned 0 for
kms_swrast paths because can_share_buffer is false there, so the
__DRI_IMAGE_CAP_GLOBAL_NAMES check naturally excluded software-only
devices. The replacement dmabuf flags do not have this property.

On a software-only device (e.g., vgem), fd_render_gpu stays -1 and
device_name is NULL, yet both dmabuf flags are true, causing the
extension to be incorrectly advertised. When a Wayland compositor calls
eglBindWaylandDisplayWL(), drmGetRenderDeviceNameFromFd(-1) returns NULL
and strdup(device_name) is called on a NULL pointer, causing a SIGSEGV.

Add an additional guard when setting WL_bind_wayland_display,
so the extension is only advertised when a valid DRM render fd is present

Fixes: 718ef151f2 ("egl/wayland: Remove support for non-dmabuf wl_drm")

Signed-off-by: johniyoods <johniyoods@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41527>
2026-05-13 16:16:48 +00:00
Rhys Perry
171210e36a aco/ra: remove precolored checks in get_reg_impl()
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Since tied definitions no longer use precoloring, I don't think this is
needed anymore.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41018>
2026-05-13 15:53:24 +00:00
Rhys Perry
faf8926ec8 aco/ra: use phi_dummy instead of is_phi()
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41018>
2026-05-13 15:53:23 +00:00
Rhys Perry
53cd74c284 aco/ra: don't rename phi operands in get_reg_phi()
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: *
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41018>
2026-05-13 15:53:22 +00:00
Rhys Perry
638cefc8f2 aco: fix regclasses for spill/reload subdword temporaries
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41018>
2026-05-13 15:53:21 +00:00
Rhys Perry
46047cf5ca aco/ra: fix fill() with certain subdword cases
If div_ceil(start.byte() + num_bytes, 4) != div_ceil(num_bytes, 4), like
v3b at byte=2.

Also, the non-const operator[] was unused and unsafe.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41018>
2026-05-13 15:53:21 +00:00
Rhys Perry
528aabb056 aco/ra: fix compact_relocate_vars path for get_reg_for_operand
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41018>
2026-05-13 15:53:20 +00:00
Rhys Perry
7c4429d21a aco: rework subdword definition RA validation a bit
Some issues fixed:
- check that byte=0 for p_as_uniform/etc
- validate 5+ byte definitions
- fix v3b pseudo definition validation
- fix validation when the index of the definition is not 0

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41018>
2026-05-13 15:53:19 +00:00
Rhys Perry
4249daeedd aco: add helpers to get instruction subdword capabilities
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41018>
2026-05-13 15:53:19 +00:00
Rhys Perry
43aeeb8b88 aco/ra: test the register file in get_reg_specified() when necessary
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: *
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41018>
2026-05-13 15:53:17 +00:00
Rhys Perry
2d5478fc3f aco/ra: fix v3b VALU at byte>0
This can happen with v_cndmask_b32, if we were required to take the
sub-dword path in get_reg_simple().

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41018>
2026-05-13 15:53:17 +00:00
Rhys Perry
62a268eb5f aco/validate: fix some RA validator error messages
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41018>
2026-05-13 15:53:17 +00:00
Karol Herbst
47bde74e91 ci: update OpenCL 3.1 piglit fails
Piglit does enforce the pre 3.1 behavior of clSetKernelArg

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41358>
2026-05-13 15:21:40 +00:00
Karol Herbst
7c07bbcdb5 rusticl: update names of types now core in 3.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41358>
2026-05-13 15:21:40 +00:00
Karol Herbst
6007e35857 bin/gen_release_notes: add paragraph on OpenCL support
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41358>
2026-05-13 15:21:40 +00:00
Karol Herbst
a50d2ce8d7 docs/features: add OpenCL 3.1 section
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41358>
2026-05-13 15:21:40 +00:00
Karol Herbst
47dca06b2e rusticl: implement CL 3.1 device features
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41358>
2026-05-13 15:21:40 +00:00
Karol Herbst
626ec83855 rusticl: implement CL 3.1 platform features
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41358>
2026-05-13 15:21:40 +00:00
Karol Herbst
e5526bbac0 rusticl: start implementing CL 3.1 support
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41358>
2026-05-13 15:21:40 +00:00
Karol Herbst
ac5db2d42e rusticl/kernel: return CL_INVALID_WORK_GROUP_SIZE in clEnqueueNDRangeKernel for an explicit 0 workgroup
See https://github.com/KhronosGroup/OpenCL-Docs/pull/1542

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41358>
2026-05-13 15:21:40 +00:00
Karol Herbst
f69fe4cd55 rusticl/kernel: update error code handling for clSetKernelExecInfo
See https://github.com/KhronosGroup/OpenCL-Docs/pull/1419

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41358>
2026-05-13 15:21:40 +00:00
Karol Herbst
dc47061e11 rusticl/program: handle CL_INVALID_CONTEXT for clCompileProgram and clLinkProgram
See https://github.com/KhronosGroup/OpenCL-Docs/pull/1453

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41358>
2026-05-13 15:21:40 +00:00
Karol Herbst
9e673e5773 include: update CL headers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41358>
2026-05-13 15:21:40 +00:00
Mary Guillemard
dd97257209 nir/lower_bit_size: Preserve float controls when lowering alu ops
fp_math_ctrl should be preserved when recreating alu operations.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15455
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41511>
2026-05-13 14:53:01 +00:00
Danylo Piliaiev
9a247643eb tu: Don't disable UBWC for D24S8+USAGE_SAMPLED+customBorderColorWithoutFormat
Apparently, this is a major footgun since it is not uncommon for apps to
enable all the features exposed by a driver. Having UBWC disabled for
D24S8 can result in a major performance loss, and the reason can be hard
for devs to spot. This footgun is already known to have happened a few
times. Furthermore, disabling UBWC depending on a Vulkan feature being
requested broke D24S8 sharing via external memory when only one device
was created with customBorderColorWithoutFormat.

Fortunately, there is the depthStencilSwizzleOneSupport feature, which
was added after the above hardware deficiency was found and, when false,
forbids the problematic state combination.

To prevent the footgun described above, we now set
depthStencilSwizzleOneSupport to false by default. This allows UBWC to be
enabled for D24S8 in all cases while remaining conformant. We also have
the tu_enable_d24s8_border_color_workaround driconf option, which enables
the previous workaround for apps that don't know about
depthStencilSwizzleOneSupport, which is currently only the ANGLE
translation layer.

One caveat is that we cannot use the fast border color HW feature for
D24S8+USAGE_SAMPLED+VK_FORMAT_UNDEFINED, so a new driconf toggle is
added. enable_fast_border_color_for_undefined_formats is set for DXVK and
vkd3d-proton since they are known not to use border colors with D24S8.
Lacking fast border colors is a much smaller penalty than not having UBWC
for D24S8.

For some context also see: https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/4346

This partially reverts 36916949.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41514>
2026-05-13 14:03:00 +00:00
Danylo Piliaiev
ea8de0742b tu/a8xx: Fix reading border_color from sampler memory
Fixes: 77e83d1449 ("tu: gen8 sampler support")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41514>
2026-05-13 14:03:00 +00:00
Erik Faye-Lund
50fd51bb9c pan/ci: fix gitlab rules after move
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Without this, changes to the shared compiler sources doesn't trigger any
jobs. Whoops.

Fixes: b02bc53261 ("pan: Move util/* to compiler/")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41528>
2026-05-13 13:13:24 +00:00
Erik Faye-Lund
dfc06fd114 pan/ci: add missing gitlab rule
Fixes: f091bdf392 ("pan: Lift pan_get_model into its own lib")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41528>
2026-05-13 13:13:24 +00:00
Erik Faye-Lund
ffadd54940 pan/ci: remove outdated gitlab rule
This directory doesn't exist any more.

Fixes: e55de285cc ("panfrost: Kill panfrost-job.h")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41528>
2026-05-13 13:13:23 +00:00