Commit graph

222264 commits

Author SHA1 Message Date
Erik Faye-Lund
e714e2f88d panfrost: enable ARB_texture_query_lod on v9+
We've been reporting in features.txt that we support this extension
unconditionally, but we didn't. Now that we have the bits wired up due
to Vulkan, we can actually enable it on Bifrost and later.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34339>
2026-05-08 09:45:39 +00:00
Erik Faye-Lund
8ef057b964 pan/bi: correct computation of lod.x
Enabling clamping in the opcode here doesn't do quite what we need. This
makes the HW clamp to the max LOD specified in the sampler, but we need
to clamp to the maximum available LOD instead, which is the minimum
of the max-lod of the sampler and the max level in the texture itself.

We also need to take the mipmap mode into account when computing the
level of detail. This is not something the TEX_GRADIENT instruction
does, so we need to do this manually.

Now that we no longer modify the flags in the loop, we can get rid of
the loop alltogether, and only issue a single TEX_GRADIENT instruction.
While we're at it, clean up some naming to better match the phrasing
from the spec.

This only applies to Valhall for now.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/14867
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34339>
2026-05-08 09:45:38 +00:00
Erik Faye-Lund
042e3eb937 pan/va: do not allow force_delta_enable on v9
This bit is reserved and should be zero on V9, so we should report an
illegal instruction if we ever encounter it while packing.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34339>
2026-05-08 09:45:37 +00:00
Iago Toral Quiroga
85e32ec249 pan/bi: TEX_GRADIENT may need helper invocations
If we use the texture coordinates mode for TEX_GRADIENT we need valid
texture coordinates on disabled lanes to compute correct lods across all
pixels on a triangle, otherwise pixels along triangle edges will read
garbage when computing coordinate deltas and produce bogus results.

We previously tried to solve this by setting the force_delta_enable bit,
but that doesn't always work... and worse, this bit isn't supported on
V9, which means we sometimes end up generating illegal instructions.

Fixes Piglit:
shaders/zero-tex-coord texturequerylod

Fixes: 4e58029dc0 ("pan/va: fix base-level for nir_texop_lod")
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34339>
2026-05-08 09:45:37 +00:00
Georg Lehmann
0dd50a426e nir: fix fp_math_ctrl in fisnan
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Otherwise, nir_opt_algebraic will replace it with false.

Fixes: 63d199a01e ("nir: remove special fp_math_ctrl rules")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41420>
2026-05-08 08:20:16 +00:00
David Rosca
50a56b64d1 pipe/video: Remove unused PIPE_VIDEO_CAP_STACKED_FRAMES
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40644>
2026-05-08 07:57:55 +00:00
David Rosca
0c66811bb8 pipe/video: Remove unused PIPE_VIDEO_CAP_MAX_LEVEL
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40644>
2026-05-08 07:57:54 +00:00
David Rosca
78c9580808 pipe/video: Remove unused PIPE_VIDEO_CAP_NPOT_TEXTURES
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40644>
2026-05-08 07:57:53 +00:00
David Rosca
7437ee8550 pipe/video: Remove unused PIPE_VIDEO_CAP_PREFERRED_FORMAT
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40644>
2026-05-08 07:57:53 +00:00
David Rosca
b91ad4a4e5 vl: Don't check npot textures support when creating buffers
This is the only place where PIPE_VIDEO_CAP_NPOT_TEXTURES is used,
but all video drivers supports npot textures.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40644>
2026-05-08 07:57:53 +00:00
David Rosca
16a2aeeb93 vl: Use NV12 as deint format instead of preferred format
This is the last place where PIPE_VIDEO_CAP_PREFERRED_FORMAT is being
used, and all drivers return NV12 here anyway.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40644>
2026-05-08 07:57:53 +00:00
Peyton Lee
2282220fec radeonsi: gate format and rotate/flip support by VPE version
Determine support for image formats and rotate/flip capabilities based on the detected VPE version.

Signed-off-by: Peyton Lee <peytolee@amd.com>
2026-05-08 14:56:45 +08:00
Peyton Lee
b4dde2ee02 amd: validate and expose VPE 2.0.0
Define VPE 2.0.0 version identifiers in amd_family.h.
In ac_gpu_info.c, assign vpe_version only when the detected version is supported.
This ensures userspace only sees a valid VPE version.

Signed-off-by: Peyton Lee <peytolee@amd.com>
2026-05-08 14:56:45 +08:00
Peyton Lee
597fe16e87 frontends/va: add ABGR format mappings
Add format mappings between VA FourCC and pipe_format for ABGR.

Signed-off-by: Peyton Lee <peytolee@amd.com>
2026-05-08 14:56:24 +08:00
Valentine Burley
9dc8bb4403 ci/lava: Reduce LAVA job timeout to 20 minutes for Marge
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
GitLab jobs use a default 1-hour timeout, which can allow jobs to run
longer than intended. We can override the LAVA timeout for Marge to have
a still conservative, but safer timeout.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41414>
2026-05-08 05:55:24 +00:00
Faith Ekstrand
ccdcbde6dd nak,compiler: Move FromVariants to common code
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/41410>
2026-05-08 00:29:09 +00:00
Faith Ekstrand
933de407f6 nak: Don't use the proc macro to implement auto-boxing of ops
We can do this with a generic trait implementation as long as we have
something on it to keep it from recursing on Box<T>.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41410>
2026-05-08 00:29:09 +00:00
Faith Ekstrand
14fcd9b2f8 nak,compiler: Move AttrList into NAK
AttrList never really made sense as part of AsSlice.  The trait returns
slices so it makes sense that it would return slice of attributes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41410>
2026-05-08 00:29:08 +00:00
Faith Ekstrand
b0ccba02f7 nak: Implement Srcs/DstsAsSlice directly on ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41410>
2026-05-08 00:29:08 +00:00
Faith Ekstrand
57d7544896 nak: Implement Srcs/DstsAsType directly for Op
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41410>
2026-05-08 00:29:08 +00:00
Faith Ekstrand
7d0c50f20a nak: Move Srcs/DstsAsSlice implementations
This allows us to remove the dependence on AsSlice.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41410>
2026-05-08 00:29:08 +00:00
Paulo Zanoni
ff5b909511 anv/sparse: bring back our (limited) support for depth/stencil
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The ambiguity of the Vulkan spec was clarified, and we don't need to
support sparse depth/stencil with exactly the same number of samples
as non-sparse.

If you want to pass CTS, you'll need VK-GL-CTS commit 03976477f521
("Don't require more than VK_SAMPLE_COUNT_1_BIT for non-color sparse
resident images").

This is essentially a revert of d5da6980d3 ("anv/sparse: don't
support depth/stencil with sparse") and 7b337e214d ("anv: remove
dead code").

Thanks to Iván Briano for working with Khronos to get clarification on
the spec and for implementing the VK-GL-CTS fix.

Reviewed-by: Iván Briano <ivan.briano@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37423>
2026-05-07 23:47:52 +00:00
Paulo Zanoni
7eab94d542 intel/nir: fix sparse shadow comparison for BRW
While Jay overwrites sparse_tex->op with the newer opcodes that only
return red and the sparse stuff, BRW keeps using the original opcode
of the cloned instruction, so it can't change def->num_components.

This was not previously detectable since we did not have sparse
enabled for depth/stencil on Anv for a while. A patch to re-enable
that was proposed a while ago (MR !37423), never merged, but then a
recent attempt to try to merge it (by me) detected this regression.
Let's fix the regression first, then we can finally re-enable sparse
depth/stencil support in Anv, hopefully.

Fixes: 7468261d3d ("intel/nir: Make intel_nir_lower_sparse work for either brw or jay")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37423>
2026-05-07 23:47:51 +00:00
Faith Ekstrand
4084f6900e util/half: Add double_to_float16_ru/rd helpers
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41295>
2026-05-07 23:05:50 +00:00
Faith Ekstrand
7e26f9e2a9 util/half: Add a simpler double_to_float16()
If we're a bit clever with the bits, we can make one fixup helper that
works for all rounding modes.  See the giant comment for details.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41295>
2026-05-07 23:05:50 +00:00
Faith Ekstrand
f23d183b7d util/half: Add double_to_half tests
These currently fail because our double to half rounding is wrong.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41295>
2026-05-07 23:05:50 +00:00
Faith Ekstrand
e00a841a9f util/half: Add float_to_half rounding tests
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41295>
2026-05-07 23:05:50 +00:00
Faith Ekstrand
de17328e00 util/half: Re-organize the tests a bit
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41295>
2026-05-07 23:05:49 +00:00
Faith Ekstrand
0c8f85e684 util/half: Rename the tests
This makes the tests names a bit more consistent and takes advantage of
the namespacing that gtest already gives us.  (There's no reason to put
the whole prefix in the test name again.)

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41295>
2026-05-07 23:05:49 +00:00
Faith Ekstrand
0e063c5deb util/half: Stop whacking CPU flags to test float_to_half_slow()
Smashing bits is super sketchy.  However, all the bits do is force the
test down the _slow path so let's explicitly test that instead.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41295>
2026-05-07 23:05:49 +00:00
Faith Ekstrand
9bf392b67b util/half: Use explicit RTNE rounding for the C++ float16_t
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41295>
2026-05-07 23:05:49 +00:00
Marek Olšák
c6ddfe1a3b amd: add a tool that prints tiling layouts for all shim devices
This prints the swizzle pattern for all non-XOR tiling modes.
It can be used to determine which GPUs have the same tiling.

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/41405>
2026-05-07 21:41:01 +00:00
Mike Blumenkrantz
45706d39ea ci: stop skipping HIC tests on lavapipe
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/41424>
2026-05-07 19:05:52 +00:00
Valentine Burley
1ed6539a07 ci/deqp: Backport host_image_copy fix
Should help with flakiness.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41424>
2026-05-07 19:05:52 +00:00
Paulo Zanoni
439c1123b0 docs/envvars: update the ANV_DEBUG documentation
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Synchronize it with the values it actually accepts right now.

v2: Other values were added by other patches after I wrote this one.

Acked-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41277>
2026-05-07 18:59:29 +00:00
Paulo Zanoni
0e81aac260 docs/envvars: document ANV_SYS_MEM_LIMIT
This option was added by fdbdfaed01 ("anv: add ANV_SYS_MEM_LIMIT for
debugging system memory restrictions").

Acked-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41277>
2026-05-07 18:59:29 +00:00
Paulo Zanoni
cf7ada8475 docs/envvars: remove ANV_SPARSE and ANV_SPARSE_USE_TRTT
These options were replaced by ANV_DEBUG=no-sparse and
ANV_DEBUG=sparse-trtt in April of 2025, by 789f13359a ("anv:
consolidate environment variables"). The ANV_DEBUG versions are
already documented.

Acked-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41277>
2026-05-07 18:59:28 +00:00
Samuel Pitoiset
4dc4012c4c radv: fix an assertion with RADV_DEBUG=fullsync on GFX11+
This can only happen with RADV_DEBUG=fullsync which literally flushes
all caches, but INV_ICACHE is invalid with RELEASE_MEM apparently.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41396>
2026-05-07 17:47:25 +00:00
Samuel Pitoiset
470897f946 radv: allow DGC+multiview by default
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It's now allowed in Vulkan.

Fixes: e47d584fed ("radv: re-introduce DGC+multiview support and enable it for vkd3d-proton only")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41395>
2026-05-07 17:08:22 +00:00
Skyth
ce4e54f7a0 spirv2dxil: Replace UAV_FENCE_THREAD_GROUP usage with UAV_FENCE_GLOBAL.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41425>
2026-05-07 16:51:25 +00:00
Tapani Pälli
c540405ca3 anv: use INTEL_NEEDS_WA_14025112257 define for workaround
Signed-off-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/41281>
2026-05-07 16:20:29 +00:00
Tapani Pälli
c6f503bed6 iris: use INTEL_NEEDS_WA_14025112257 define for workaround
Signed-off-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/41281>
2026-05-07 16:20:29 +00:00
Tapani Pälli
c381b4fdd4 intel/dev: update mesa_defs.json from workaround database
This removes 18042479026 as we don't utilize BRW_AOP_MOV in compiler
and adds missing xe2 entries for 14025112257.

Signed-off-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/41281>
2026-05-07 16:20:29 +00:00
Lionel Landwerlin
62b890046f anv: remove old entrypoints
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40387>
2026-05-07 15:49:20 +00:00
Lionel Landwerlin
f123030dcd anv: implement VK_KHR_device_address_commands
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40387>
2026-05-07 15:49:20 +00:00
Lionel Landwerlin
7adece7ce0 anv: fixup null address check
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40387>
2026-05-07 15:49:19 +00:00
Lionel Landwerlin
3ffca66b3c vulkan/runtime: fix invalid address flags value for CmdCopyBufferToImage2
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: a8e49be9d9 ("vulkan/runtime: add implementation of older entrypoints using KHR_DAC")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40387>
2026-05-07 15:49:19 +00:00
Icenowy Zheng
5d2cc50247 pvr: add dri options used by common WSI code
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The common Mesa Vulkan WSI code checks some DRI options.

Add them to the option list of the PVR driver.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41197>
2026-05-07 15:33:01 +00:00
Icenowy Zheng
41ed38615b pvr: prohibit clang-format from touching the dri options list
The DRI options list is formatted specically and clang-format cannot
handle it properly.

Disable clang-format for this snippet.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41197>
2026-05-07 15:33:01 +00:00
hmtheboy154
88f5e5986b pvr: add support for driconf for the Vulkan driver
Bringing force_vk_vendor as the first option, force_vk_devicename
will be added later

Signed-off-by: hmtheboy154 <buingoc67@gmail.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
[Icenowy: rebased on top of main]

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41197>
2026-05-07 15:33:01 +00:00