Commit graph

73579 commits

Author SHA1 Message Date
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
Mike Blumenkrantz
5d97b25fa0 zink: delete unused descriptor variable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41426>
2026-05-11 16:58:30 +00:00
Mike Blumenkrantz
7d63efbd1a aux/trace: silence -Waddress warnings in macros
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41422>
2026-05-11 15:59:48 +00:00
Thong Thai
06c84cc773 frontends/va: Enable shader-based alpha blending
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41090>
2026-05-11 15:27:46 +00:00
Thong Thai
c96c7e77f7 gallium/vl: Implement compositor shader-based alpha blending
Implements shader-based global blending and pre-multiplied alpha support
to YUV compositing, allowing for transparent overlays and alpha-channel
based transparency with RGBA overlays.

Handle pre-multiplied alpha images by un-multiplying the pre-multiplied
alpha colours, to allow for straight-alpha (which is easier to
implement) to be applied.

Thanks nyanmisaka for the help, and for pointing out the difference
between pre-multiplied alpha and straight alpha.

Thanks David Rosca and Benjamin Cheng for improvements to the code and
spotting errors.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/12977

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41090>
2026-05-11 15:27:46 +00:00
Thong Thai
cfd2d9f411 gallium/video: Add enabled flag to vpp interface
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41090>
2026-05-11 15:27:46 +00:00
Thong Thai
45250d56fa vl/video_buffer: Set alpha swizzle if format has alpha
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41090>
2026-05-11 15:27:46 +00:00
Thong Thai
5c53e955ce pipe: Add PIPE_VIDEO_VPP_BLEND_MODE_PREMULTIPLIED_ALPHA
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41090>
2026-05-11 15:27:46 +00:00
Thong Thai
fa47f2ac8a gallium/auxiliary/vl: Fix typo in cs_create_shader pseudo-code comment
Fix typos in the size of proj, and chroma_proj, in the GLSL pseudo-code
comment portion of cs_create_shader.

Thanks Benjamin Cheng <benjamin.cheng@amd.com> for finding it.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41090>
2026-05-11 15:27:46 +00:00