Commit graph

222245 commits

Author SHA1 Message Date
kanglin tu
75677b60d4 Merge branch 'main' into 'main'
panvk/csf: skip draws without position output in draw entry points

See merge request mesa/mesa!41349
2026-05-08 00:11:27 +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
Christoph Pillmayer
109af1b077 pan/kmod: Fix uninitialized timestamp info
The kernel looks at drm_panthor_timestamp_info::flags, so it can't be
uninitialized.

Fixes: 302127fe ("pan/kmod: Add timestamp uapi support")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41418>
2026-05-07 13:37:25 +00:00
Faith Ekstrand
4714395eb8 pan/bi: Drop lower_index_to_offset from preprocess
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41320>
2026-05-07 13:11:08 +00:00
Faith Ekstrand
dd2d30656d panfrost: Handle pre-Valhall images and texel buffers in lower_res_indices
There's no point in having these as separate passes that live in the
compiler.  We already have lower_res_indices(), which is panfrost's
equivalent to panvk's descriptor lowering.  We can just do it there.

Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41320>
2026-05-07 13:11:08 +00:00
Faith Ekstrand
d0bdd18212 panfrost: Prefix valhall bits of lower_res_indices
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41320>
2026-05-07 13:11:08 +00:00
Faith Ekstrand
4412f3bad7 panfrost: Take texture/sampler_index into account in lower_res_indices
We currently rely on nir_lower_tex_options::lower_index_to_offset but
there's really no reason for this.  Our pan_nir_res_handle() helper can
already take both an immediate and a dynamic index.

Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41320>
2026-05-07 13:11:08 +00:00
Faith Ekstrand
0a69efb22b panvk: Add MAX_VS_ATTRIBS to image indices in panvk_nir_lower_descriptors
It's only a couple lines of code since we're already doing this for
UBOs.  It doesn't need to be a separate pass.

Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41320>
2026-05-07 13:11:08 +00:00
Faith Ekstrand
c73d4e14f9 pan/nir/tex: Support full index+offset
Previously, we only supported one of the index or the offset source and
relied on lower_index_to_offset to ensure we only had one or the other.
However, now that we're doing things in NIR, it's trivial to support the
full index+offset form.

Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41320>
2026-05-07 13:11:08 +00:00
m1234n
08fcd762dd panvk/csf: skip draws without position output in draw entry points
Replace the vs->spd check with VARYING_BIT_POS — the position SPD
is legitimately unallocated for no_position pipelines. Move the VS
assertion into a shared skip_draw() helper used by both draw entry
points.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41349>
2026-05-07 12:46:42 +00:00
Pierre-Eric Pelloux-Prayer
61acf0e781 radeonsi: add tests subfolder and move AMD_TEST code inside
And move the exit(0) code to the si_tests function.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:21 +02:00
Pierre-Eric Pelloux-Prayer
61ae8f60d1 radeonsi/gfx: move static inline helpers to si_gfx.h
Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:19 +02:00
Pierre-Eric Pelloux-Prayer
b833aeb9de radeonsi/gfx: remove unnecessary u_stub usage
Everything inside the gfx folder isn't built when HAVE_GFX_COMPUTE
isn't present so we don't need to stub these methods.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:17 +02:00
Pierre-Eric Pelloux-Prayer
4c080ae32e radeonsi: move function prototypes from si_pipe.h to si_gfx.h
Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:15 +02:00
Pierre-Eric Pelloux-Prayer
714d3eb0b4 radeonsi: move more code to gfx subfolder
Anything related to shaders, compute, mesh, nir should be inside
this folder.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:09 +02:00
Pierre-Eric Pelloux-Prayer
79b09571bb radeonsi: move all multimedia files to mm
Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:08 +02:00
Pierre-Eric Pelloux-Prayer
e4def8a61c radeonsi: add si_context.c
And move out most si_context code to the new file.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:06 +02:00
Pierre-Eric Pelloux-Prayer
b2db3e1ddc radeonsi: add si_gfx_context.c and move code from si_pipe.c
Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:04 +02:00
Pierre-Eric Pelloux-Prayer
a335f4be7a radeonsi/gfx: move code from si_get to si_gfx_screen
These functions can be moved to the gfx subfolder and made static.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:02 +02:00
Pierre-Eric Pelloux-Prayer
d1c57f742e radeonsi/gfx: add si_gfx_screen.c
And move code specific to gfx/compute from radeonsi_screen_create_impl there.

ac_init_llvm_once has to stay in si_pipe.c because it has to be called very
early to avoid conflicts with u_queue initialisation.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:17:59 +02:00
Pierre-Eric Pelloux-Prayer
5f56a0e057 radeonsi: add si_resource_copy_buffer
Same as si_resource_copy_resource except it only supports buffers.

Also make sure that si_compute_clear_copy_buffer doesn't do
anything when has_gfx_compute is false.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:17:56 +02:00
Pierre-Eric Pelloux-Prayer
838ce62f3a radeonsi: extract si_init_gfx_caps from si_init_screen_caps
Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:17:54 +02:00