Commit graph

207071 commits

Author SHA1 Message Date
Job Noorman
917c56c78c ir3: add ir3_split_off_scalar helper
This implements the common pattern of splitting-off a scalar value from
a vector. It handles both 64b (via ir3_64b) and normal register scalars.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33797>
2025-06-18 19:06:31 +00:00
Job Noorman
37f4786881 ir3: add helpers to handle 64b values
64b values occupy 2 registers but we receive them as a single component
value from NIR. Since there are many places that assume a 1:1
relationship between components and instructions, this can be error
prone as we have to remember to double the number of components whenever
a 64b value is involved.

This commit tries to improve on this situation by representing 64b
values as a collect of 2 registers, restoring the 1:1 mapping between
NIR components and ir3 instructions. This commit only adds some helpers
to create 64b values and access their individual components but doesn't
actually use them yet. This will happen in a follow-up commit.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33797>
2025-06-18 19:06:31 +00:00
Job Noorman
2f75e6cba9 ir3: flatten nested collects
When creating a collect with a source that is itself a collect, flatten
the latter's sources into the new collect. This is mainly useful for
collects used for 64b values, as we can treat them just like non-64b
values when collecting them.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33797>
2025-06-18 19:06:30 +00:00
Job Noorman
74aecf2207 ir3: add support for collects in ir3_get_src_shared
We want to start lowering certain NIR instructions to collects (e.g.,
instructions with a 64b def) which means that ir3_get_src_shared has to
support collects. Since we can't mov the result of a collect, implement
this by converting its sources and creating a new collect.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33797>
2025-06-18 19:06:30 +00:00
Job Noorman
36300ee51d ir3: move collect/split helpers to ir3.{c,h}
They have nothing to do with ir3_context and this way, we can use them
from ir3.h.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33797>
2025-06-18 19:06:30 +00:00
José Roberto de Souza
37f4182ac3 Revert "anv: Enable preemption due 3DPRIMITIVE in GFX 12"
Enabling preemption in 3DPRIMITIVE is causing glitches on Dota 2,
so reverting this until the issue with preemption is fixed.

This reverts commit 3cd972a2d3.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13289
Fixes: 12ddaa6b8b ("anv: Enable preemption due 3DPRIMITIVE in GFX 12")
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35586>
2025-06-18 18:52:19 +00:00
Georg Lehmann
e9c886c331 nir/opt_intrinsic: fix inclusive scan rewrite with multiple uses
Modifying the iterated list is a footgun, so just create a new instruction.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13364
Fixes: 5c70a55bf3 ("nir/opt_intrinsics: optimize (exclusive_scan(op, a) op a) to inclusive scan")

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35577>
2025-06-18 18:18:15 +00:00
Corentin Noël
ab5605aab3 ci: Update CrosVM and Virglrenderer
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Update to their latest version on time

Update Rust to 1.81 as it is the minimal required version for CrosVM

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35598>
2025-06-18 17:34:11 +00:00
Hoe Hao Cheng
412d97e667 zink/codegen: init properties struct fully for double-loaded extensions
Fixes: 4d1768aec5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35608>
2025-06-18 17:17:08 +00:00
Jesse Natalie
1fb0e76233 microsoft/compiler: Fix PSV0 for validator 1.8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35595>
2025-06-18 16:49:36 +00:00
Christopher Gautier
48e8d6d207 panfrost, panvk: The size of resource tables needs to be a multiple of 4.
The HW specifications require the size of shader resource tables to be a
multiple of 4, otherwise correct behaviour is not guaranteed.

Fixes: 713f5c3600 ("panvk: Prepare the cmd_desc_state logic for Valhall")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35553>
2025-06-18 16:09:03 +00:00
Christopher Gautier
db4c878e4f panfrost, panvk: Use arch version 9 to distinguish between Bifrost & Valhall
The change was performed automatically with a regular expression over
the code base.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35553>
2025-06-18 16:09:03 +00:00
Gurchetan Singh
3a3239dcf9 gfxstream: proper depedendences in non virtgpu-kumquat case
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
In case virtgpu_kumquat isn't built, provide a null_dep
rather than undefined meson dependencies.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35607>
2025-06-18 15:16:32 +00:00
Martin Krastev
fb97f3f836 svga/ci: enable vmware farm
Issue with farm infra licensing banished for one more year.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35602>
2025-06-18 14:52:25 +00:00
Karol Herbst
b4b6582220 rusticl: cl_khr_icd 2.0.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35241>
2025-06-18 13:30:40 +00:00
Karol Herbst
dd686e0d81 rusticl/icd: use default value for cl_icd_dispatch
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35241>
2025-06-18 13:30:40 +00:00
Karol Herbst
924c76b7e5 include: sync OpenCL headers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35241>
2025-06-18 13:30:40 +00:00
Christian Gmeiner
034ac06c64 etnaviv: nir: Use texldlpcf opcode for shadow texture look-ups with explicit LOD
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes the following test on GC7000:
 - dEQP-GLES3.functional.shaders.texture_functions.texture.sampler2darrayshadow_vertex
 - dEQP-GLES3.functional.shaders.texture_functions.texturelod.sampler2dshadow_vertex
 - dEQP-GLES3.functional.shaders.texture_functions.texturelod.sampler2dshadow_fragment
 - dEQP-GLES3.functional.shaders.texture_functions.textureprojlod.sampler2dshadow_vertex
 - dEQP-GLES3.functional.shaders.texture_functions.textureprojlod.sampler2dshadow_fragment

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35600>
2025-06-18 13:10:59 +00:00
Eric Engestrom
081aa09aeb meson: drop unnecessary -D legacy-x11=none
Array options are allowed to be empty, so there's no need to add an
extra value to convey that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35309>
2025-06-18 12:39:26 +00:00
Russell Greene
e1bcd0f4a5 radeonsi: vpe: fix noisy false error
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When running `ffmpeg -vaapi_device /dev/dri/renderD128 -f lavfi -i smptebars=duration=5:size=1280x720:rate=30 -vf format=rgba,hwupload,scale_vaapi=format=nv12,hwdownload  testout.mp4`,

the vpe is asked to transform into NV12, which cannot be done with a blit. `si_vpe_construct_blt` fails, but then it gracefully falls back into `vlVaPostProcCompositor` and finishes the task correctly, but not before logging the error:

SIVPE ERROR ../mesa-25.1.3/src/gallium/drivers/radeonsi/si_vpe.c:1095 si_vpe_construct_blt Failed in checking process operation and build settings(9)

for each frame that is processed. Since this is expected, my original thought was to demote this to a warning. But looking at all the reasons it could fail for, there already is a warning (or error) logged, so it seems to me the best thing to do is remove the error entirely

There may be a better approach here, and I'm all ears.

Fixes: e85a6b6a63 ("radeonsi/vpe: check reduction ratio")
Reviewed-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35449>
2025-06-18 10:48:07 +00:00
Karol Herbst
93f24f0bd0 rusticl: support cl_khr_extended_bit_ops
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
2025-06-18 10:13:44 +00:00
Karol Herbst
6a36056f59 zink: lower bitfield operations without maintenance9
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
2025-06-18 10:13:44 +00:00
Karol Herbst
8ba63c1d16 zink: check for VK_KHR_maintenance9
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
2025-06-18 10:13:44 +00:00
Karol Herbst
9c0d121366 v3d: lower bitfield_extract8|16
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
2025-06-18 10:13:44 +00:00
Karol Herbst
9d9a17ea2a r600: lower bitfield_extract8|16
Reviewed-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
2025-06-18 10:13:44 +00:00
Karol Herbst
0e24452535 panfrost: lower bitfield_extract8|16
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
2025-06-18 10:13:44 +00:00
Karol Herbst
b9e1e91a86 ir3: enable bitfield lowering for cl_khr_extended_bit_ops
Co-developed-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
2025-06-18 10:13:44 +00:00
Karol Herbst
dd652bb8f0 agx: enable bitfield lowering for cl_khr_extended_bit_ops
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
2025-06-18 10:13:44 +00:00
Karol Herbst
a16eb630fa llvmpipe: more bitfield_extract lowering
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
2025-06-18 10:13:44 +00:00
Karol Herbst
cf3b16f7af clc: support cl_khr_extended_bit_ops
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
2025-06-18 10:13:44 +00:00
Karol Herbst
1a5b5a883d vtn: mark BitInstructions cap as supported
It simply enables certain Shader only instructions for Kernels.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
2025-06-18 10:13:44 +00:00
Samuel Pitoiset
e5d047d160 ci: uprev VKCTS main to 9cc8e038994c32534b3d2c4ba88c1dc49ef53228
RADV is the only driver using VKCTS main. This bumps adds tests for
maintenance9, unified_image_layout and VP9.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35540>
2025-06-18 09:15:34 +00:00
Christian Gmeiner
07f5cbcd9b etnaviv: nir: Add assertion to prevent src2 conflicts in texture instructions
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Add an assert to catch cases where both nir_tex_src_comparator and
nir_tex_src_ddy attempt to use the same src2 slot in texture instructions.
This prevents silent overwrites that could cause incorrect shader
compilation.

The assertion helps catch potential issues in complex texture operations
like those found in dEQP textureGrad shadow tests, where multiple
texture sources compete for the same hardware slot.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35531>
2025-06-18 08:58:41 +00:00
Christian Gmeiner
3225d3e918 etnaviv: nir: Use texldgpcf opcode for shadow texture gradients
Passes all dEQP-GLES3.functional.shaders.texture_functions.texturegrad.*
tests on GC7000.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35531>
2025-06-18 08:58:41 +00:00
Christian Gmeiner
7149597860 etnaviv: Push nir_tex_instr down to etna_emit_tex(..)
There are too many parameters already.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35531>
2025-06-18 08:58:41 +00:00
Christian Gmeiner
cc4a6fa25c etnaviv: nir: Legalize txd comparator
The hardware expects textureGrad (txd) shadow comparator to be
specified as the w component of the coordinate, rather than as a
separate comparator source.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35531>
2025-06-18 08:58:41 +00:00
Christian Gmeiner
0f25d5e3f4 etnaviv: isa: Add texldgpcf instruction
Implement support for the texldgpcf instruction, which handles texture
gradient sampling with shadow comparison.

Blob generates such txf's for
dEQP-GLES3.functional.shaders.texture_functions.texturegrad.*shadow*

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35531>
2025-06-18 08:58:40 +00:00
Eric Engestrom
14fedcfb8d ci_run_n_monitor: fix padding in links
8f557b84f6 was done because `text` is sometimes just an int,
but the fix was only applies to the padding calculation.

Unfortunately, the padding direction is also different between strings
and integers, which means the behaviour is now incoherent.

Let's convert `text` to a string before we start doing anything so that
everything afterwards is coherent.

Fixes: 8f557b84f6 ("ci: crnm: fix hyperlink format")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35587>
2025-06-18 08:42:19 +00:00
Karol Herbst
21ed913198 rusticl/image: enable sRGB support
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35535>
2025-06-18 06:53:19 +00:00
Georg Lehmann
e0cdf4dfdd radv/nir/lower_cmat: use common matrix layout on gfx12
The GFX12 ISA doc describes other layouts for A/B, but they are identical
to the C layout with the exception of the order of the rows (columns for A).
And as long as these are swapped in the same way for both A and B, the muladd
result will be the same. So we use the C layout for all uses.

This will simplify conversions between uses, and allows A/B to use a single
memory access for load/store in wave32.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35570>
2025-06-18 06:33:06 +00:00
Valentine Burley
e82e1bca1d intel/ci: Drop deprecated fp16 environment variable
Fixes: cf3ec8d3b9 ("rusticl: enable proper fp16 support")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35574>
2025-06-18 06:13:25 +00:00
Valentine Burley
04d35cacbf intel/ci: Reduce parallelism of intel-adl-cl job
The intel-adl-cl job was previously running on two DUTs, but the
runtime reported by deqp-runner was only about 3 minutes.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35574>
2025-06-18 06:13:25 +00:00
Valentine Burley
68244ee819 anv/ci: Add a pre-merge vkd3d job on ADL
Introduce a new, pre-merge vkd3d-proton job on Alder Lake, and move the
VK_DRIVER variables to the .anv-test template.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35574>
2025-06-18 06:13:25 +00:00
Yiwei Zhang
5cb50c3cf5 hasvk: use narrow range to match up with mesa EGL
This matches up with the native gl drivers as well as the media stack.

- VK_SAMPLER_YCBCR_RANGE_ITU_NARROW <=> EGL_YUV_NARROW_RANGE_EXT

Cc: mesa-stable
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35597>
2025-06-17 22:51:40 -07:00
Yiwei Zhang
c169ad60c1 anv: use narrow range to match up with mesa EGL
This matches up with the native gl drivers as well as the media stack.

- VK_SAMPLER_YCBCR_RANGE_ITU_NARROW <=> EGL_YUV_NARROW_RANGE_EXT

Cc: mesa-stable
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35597>
2025-06-17 22:51:30 -07:00
Connor Abbott
60843bc806 tu: Re-emit viewports/scissors when has_fdm changes
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This shouldn't matter if FDM is actually enabled, because in that case
the pipeline must enable the bit and we dirty FDM state at the
beginning, but pipelines can enable FDM even if the renderpass they're
used in doesn't use FDM and in that case we still need to use the FDM
path to duplicate the viewports. Fix the case where a different pipeline
is bound that enables FDM without actually using FDM.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35581>
2025-06-17 23:04:00 +00:00
Connor Abbott
0017b9e8ed tu: Make sure to re-emit viewports if per_view_viewport changes
We may need to re-emit the viewports if a different shader is bound that
does or doesn't use gl_ViewportIndex.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35581>
2025-06-17 23:04:00 +00:00
Gurchetan Singh
f7a9991b89 mesa: add option to enable virtgpu_kumquat FFI for gfxstream
Will be used by Cuttlefish CI/CD, but also commonly used by
gfxstream developers.

meson setup gfxstream-build -Dvulkan-drivers="gfxstream" -Dgallium-drivers="" -Dvirtgpu_kumquat=true -Dopengl=false -Drust_std=2021

In distros, virtgpu_kumquat is not expected to be packaged since
it is a CI/CD tool.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:55 +00:00
Gurchetan Singh
f2b07903ab mesa: import virtgpu_kumquat_ffi
This adds a frontend to C-FFI to VirtGpuKumquat, to be used
with gfxstream.  This allows testing gfxstream, without a virtual
machine.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:55 +00:00
Gurchetan Singh
c00027b46f mesa: import virtgpu kumquat
This is Rust-based client side of the Kumquat protocol.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00