Commit graph

73587 commits

Author SHA1 Message Date
Rob Clark
f8b61c96cf rusticl: Support/ignore -qcom-accelerate-16-bit
Some apps when they see adreno just blindly stuff in this compiler arg.
Just silently ignore it.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41520>
2026-05-18 14:26:50 +00:00
Rob Clark
185c89084a freedreno/a6xx: Expose subgroup ops
This is needed for cl31

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41520>
2026-05-18 14:26:50 +00:00
Matthieu Oechslin
4527b30a04 r600: Fix crash on R600/R700 with custom border color
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
r600_pipe_sampler_view may be NULL. This is properly checked
when emmiting samplers on EG+, but not on R600/R700.
Fix a crash on Tesseract

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Fixes: 5bee7c0b
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41432>
2026-05-18 13:17:05 +00:00
Georg Lehmann
0a6816d860 tgsi: delete unused lowering pass
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41595>
2026-05-18 08:45:53 +00:00
Dave Airlie
b38df2d62d u_blitter: only set texcoord.w to sample for multisample sources
Since the change to use TXF instead of TXF_LZ, TXF takes sample
or lod on the final component, whereas before with TXF_LZ the
lod was ignored.

Don't pass in a sample if the input texture isn't multisampled.

KHR-GL46.packed_depth_stencil.blit.depth32f_stencil8
on nvk/zink

Fixes: 9440c0e1614a ("gallium/u_blitter: stop emitting TEX_LZ")
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41628>
2026-05-18 07:42:58 +00:00
Benjamin Cheng
01a36c1540 radeonsi/video: Cleanup dpb buffer
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15492
Fixes: 26979becec ("radeonsi/video: Add video decoder using ac_video_dec")
Reviewed-by: David Rosca <david.rosca@amd.com>
Signed-off-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41627>
2026-05-17 21:51:09 +00:00
yserrr
968a13a916 llvmpipe: fix UB and incorrect value in compute caps shift
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
`1 << 31` invokes signed shift UB. When the int result is assigned
to uint64_t, sign extension produces 0xFFFFFFFF80000000 (~18 EiB)
instead of the intended 0x80000000 (2 GiB).

Use 1ull << 31 to perform the shift in unsigned 64-bit type.

The 2 GiB value matches the surrounding finite cap values and
OpenCL minimum requirements, making the original intent clear.

Detected by UBSan with piglit.

Fixes: a65b74af51 ("llvmpipe: init shader and compute caps")
Signed-off-by: yserrr <dlwognsdc610@naver.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41464>
2026-05-17 11:52:13 +00:00
Karol Herbst
bd465e710c Revert "rusticl: link the C++ runtime statically"
This reverts commit 528ceeb49b.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41488>
2026-05-15 22:59:58 +00:00
Valentine Burley
6cf5da8dd3 ci/deqp: Rewrite headless Android WSI patch
Update the headless Android WSI patch to fix intermittent timeout issues. It
now uses an ImageReader listener to actively drain and instantly release frames
from the buffer queue. This acts as a "null compositor" that prevents buffer
starvation while maintaining stable GPU backpressure.

This fixes dEQP-VK.wsi.android.maintenance1.* in newer VKCTS versions and
resolves the race conditions that caused occasional teardown crashes.

Also rebase build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch
on top of the updated WSI patch.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41541>
2026-05-15 17:38:59 +00:00
Marek Olšák
3831935818 nir/opt_move_to_top: add an option to exclude moving at_offset/at_sample loads
This splits the nir_move_to_top_input_loads option into 2 options. The latter
option is mainly for at_offset/at_sample loads. Then it updates most places to
use only the first option.

The rationale is that moving at_sample loads makes Control (game) shaders
worse, as per the code comment.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41167>
2026-05-14 16:48:39 -04:00
Tanner Van De Walle
3ef1db42c7 gallium/u_blitter: add lower-bound assert on target
blitter_get_fs_texfetch_col asserts target < PIPE_MAX_TEXTURE_TYPES
but not >= 0. MSVC's prefast static analyzer reports C33010
(UNCHECKED_LOWER_BOUND_FOR_ENUMINDEX) when target is later used as
an array subscript, since it cannot prove the non-negative side of
the bound. Extending the existing assert to both sides silences the
warning and is a real bound check.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41447>
2026-05-14 17:46:16 +00:00
Tanner Van De Walle
427158f784 draw: add lower-bound assert on shader_stage
draw_set_sampler_views asserts shader_stage < DRAW_MAX_SHADER_STAGE
but not >= 0. MSVC's prefast static analyzer reports C33010
(UNCHECKED_LOWER_BOUND_FOR_ENUMINDEX) when shader_stage is
subsequently used as an array subscript, since it cannot prove the
non-negative side of the bound. Extending the existing assert to
both sides silences the warning and is a real bound check.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41447>
2026-05-14 17:46:16 +00:00
Emma Anholt
76c39acad7 ci: Update VK CTS to 1.4.5.3 with fixes.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
I've pulled in a pile of changes to reduce the overhead (runtime and
memory) when sharding for deqp-runner, along with a bunch of fixes for
KHR_display testing that we recently enabled, plus a few others that
affect our drivers.

The big new set of failures looks like it's from more complete coverage of
blitting between formats.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41243>
2026-05-14 04:22:21 +00:00
Emma Anholt
32f25cbbb0 lvp/ci: Drop an old skip long since fixed in the CTS.
This was fixed in vulkan-cts-1.3.7

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41243>
2026-05-14 04:22:21 +00:00
Dave Airlie
510998e493 nak: fix image size for multisample arrays
Fixes KHR-GL45.shader_image_size.*ms*

without padding the last component gets replicated so the array
size gets shifted.

Fixes: 65d836fb26 ("nak: Lower MSAA image load/store/atomic/size")
Reviewed-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41522>
2026-05-14 01:57:40 +00:00
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
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
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
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
Lorenzo Rossi
32ca5f7515 panfrost: Plumb VS varying_layout in FS
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This allows us to use LD_VAR_BUF instead of LD_VAR when the shaders are
linked together.

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40761>
2026-05-13 09:15:58 +00:00
Lorenzo Rossi
12b9a23cb5 panfrost: Split default key creation in helper function
This will make it easier to create new default keys in other places

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40761>
2026-05-13 09:15:58 +00:00
David Rosca
804ff19a5a radeonsi/uvd_enc: Skip extra padding bytes in output bitstream
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Trailing zeroes should be harmless, but it seems to cause issues with
latest ffmpeg (which looks like an ffmpeg bug).
The extra bytes are useless, so we can just skip them like we already
do on VCN to workaround it.

Cc: mesa-stable
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41485>
2026-05-13 07:12:53 +00:00
Pavel Ondračka
6cb04bb791 r300/ci: run EGL deqp tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41517>
2026-05-12 21:52:34 +00:00
Eric Engestrom
1f5a54a289 zink+nvk/ci: update expected fails
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41515>
2026-05-12 19:01:58 +00:00
Jesse Natalie
7931dd09ba va: Wrap assert-only code in NDEBUG
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41445>
2026-05-12 15:44:25 +00:00
Marek Olšák
f4f3326fa2 radeonsi: handle any size of shader args in the LLVM PS prolog
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
this will be needed for perspective-correct interpolation at offset/sample

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:46 +00:00
Marek Olšák
b0df142b93 radeonsi: stop using TGSI definitions for interpolation
define our own

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:46 +00:00
Marek Olšák
2fe4c47a21 radeonsi: simplify get_interp_info_from_input_load
it's only used for color inputs

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:46 +00:00
Marek Olšák
38cea8334e radeonsi: declare prolog LINEAR_SAMPLE/CENTER VGPRs only if used
Small PS have their VGPR usage equal to the number of input VGPRs,
and this reduces it.

4 input VGPRs removed in most cases.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:46 +00:00
Marek Olšák
cfc9038a3d radeonsi: declare prolog LINE_STIPPLE_TEX_ENA VGPR only if needed
Small PS have their VGPR usage equal to the number of input VGPRs,
and this reduces it.

1 input VGPR removed from the PS prolog in most cases.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:46 +00:00
Marek Olšák
e6db0492f6 radeonsi: declare prolog ANCILLARY & SAMPLE_COVERAGE VGPRs only if used
Small PS have their VGPR usage equal to the number of input VGPRs,
and this reduces it.

2 input VGPRs removed from the PS prolog in most cases.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
280f8e6ab5 aco,radeonsi: declare prolog CENTROID VGPRs only if used
Small PS have their VGPR usage equal to the number of input VGPRs,
and this reduces it.

4 input VGPRs removed in most cases.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
5126258f55 aco,radeonsi: don't forward LINE_STIPPLE_TEX_ENA VGPR from the PS prolog
It's unused. This frees 1 VGPR in the prolog for temps.

This only affects radeonsi.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
e50b114d25 radeonsi: move SI_SPI_PS_INPUT_ADDR_FOR_PROLOG into a helper function
it will be dynamic

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
c488d02c5e ac: add ac_shader_args::line_stipple_tex_ena
for later use

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
7376c311c4 radeonsi: use shader_info::fs::uses_sample_shading for ac_nir_lower_ps_early
This was missing and it slightly improves code generation.
8 is always correct with maximum sample shading.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
b63f866c84 radeonsi: remove dead get_frag_coord_from_pixel_coord optimization
It's applied unconditionally by ac_nir_lower_ps_early. It was probably
replaced by that at some point.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
c9c0dce948 aco,radeonsi: use enums for color barycentrics instead of input VGPR indices
The VGPR indices will be dynamic. This replaces hardcoded VGPR indices
with enums in the PS prolog key.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
97660e91b5 ac,radeonsi: add helpers to print SPI_SHADER_COL/Z_FORMAT
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
1c76351aee ac,radeonsi: add a helper to print PS input VGPR layout
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
5e6952307d radeonsi: fix a typo in si_shader_update_spi_shader_formats
The failure is reproducible with:
    AMD_DEBUG=mono piglit/bin/fbo-drawbuffers-none use_frag_out -auto -fbo

Fixes: 88986dcc9c - radeonsi: account for outputs_written when updating spi_shader_col_format

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
933b25b0b6 nir: add an option to ignore INTERP_MODE_NONE in nir_shader_gather_info
Color interpolation (INTERP_MODE_NONE) has unknown barycentrics
and it could be flat shading at runtime.

It's a problem when shader_info is expected to match what's actually
used.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Mike Blumenkrantz
131eb49121 zink: fix mixing of mesh descriptor bindings with gfx bindings
this is illegal, need separate everything

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41426>
2026-05-11 16:58:30 +00:00