Commit Graph

194949 Commits

Author SHA1 Message Date
Aleksi Sapon
a42c2293ab wsi: Metal support
Lavapipe can render to a Metal surface now.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31208>
2024-09-18 17:54:02 +00:00
Lars-Ivar Hesselberg Simonsen
d63da63f3f panvk: Fix use of cs_sync64_wait in cmd_wait_event
The sync objects used by events are of type panvk_cs_sync32, making this
mismatch hit an assert in cs_to_reg_tuple.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11886
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31221>
2024-09-18 17:08:48 +00:00
Boris Brezillon
8f053e10de panvk/csf: Unconditionally clean L2 and LS caches when closing a CS
We need a clean because descriptor/CS memory can be returned to the
command pool where they get recycled. If we don't clean dirty cache
lines, those cache lines might get evicted asynchronously and their
content pushed back to main memory after the CPU has written new stuff
there.

Reported-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: 5544d39f44 ("panvk: Add a CSF backend for panvk_queue/cmd_buffer")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31225>
2024-09-18 16:34:54 +00:00
José Roberto de Souza
dec5a624e9 anv: Check if vkCreateQueryPool() is being created in a supported queue
Turns out not even VK CTS was calling
vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR()
to check if queue supports query.
So here adding a explicity check in our implementation of
vkCreateQueryPool().

https://github.com/KhronosGroup/VK-GL-CTS/pull/482

Cc: 24.2 <mesa-stable>
Reviewed-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/30652>
2024-09-18 15:29:16 +00:00
José Roberto de Souza
141e7eaca7 anv: Make sure all previous vm binds are done before execute perf query pool
The query pool batch buffer or other bos could not be bound when
exec starts.

Cc: 24.2 <mesa-stable>
Reviewed-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/30652>
2024-09-18 15:29:16 +00:00
José Roberto de Souza
0a19d92ca5 anv: Add warning about mismatch between query queues
Cc: 24.2 <mesa-stable>
Reviewed-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/30652>
2024-09-18 15:29:16 +00:00
José Roberto de Souza
c5d79d533a anv: Fix context id or exec queue used to open perf stream
It was always using device->context_id what is not valid in i915 when
has_vm_control is true or when running with Xe KMD.

But anv_AcquireProfilingLockKHR() don't have the queue information so
at least for now we will only support queries in a single queue.

And for consistency doing the same in
anv_QueueSetPerformanceConfigurationINTEL() although here we have the
queue parameter but queries are only supported in render engine
so it would only expose other queues if user set some parameters.

Cc: 24.2 <mesa-stable>
Reviewed-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/30652>
2024-09-18 15:29:16 +00:00
Boris Brezillon
c97f79ac0c pan/va: Optimize SSBO lowering on Valhall
For reads, we use the LD_PKA (AKA LD_BUFFER) so we can directly
pass the buffer index. For writes, we still convert the SSBO index
into a global address before doing a global load/store/atomic
operation, but we do that with an LEA_PKA instruction that takes
care of bounds checking.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31164>
2024-09-18 13:45:57 +00:00
Boris Brezillon
3be204afbb panfrost: Pass the architecture to panfrost_nir_lower_sysvals()
pan_nir_lower_sysvals.c is not a per-gen file. Pass the architecture
to panfrost_nir_lower_sysvals() to replace the existing #if PAN_ARCH <= 9
section.

Fixes: 9d981a4c5b ("panfrost: properly lower DrawID sysval on v9")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31164>
2024-09-18 13:45:57 +00:00
Boris Brezillon
eeb3512498 nir/lower_ssbo: Extend the load_ssbo_address intrinsic to pass an offset
On Mali(Valhall), the bounds checking can be done when in hardware, but
for this to work properly, we need to pass the offset to the
nir_load_ssbo_address() intrinsic.

Add an offset source to the intrinsic, and adjust the lowering pass
to conditionally lower the offset addition.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31164>
2024-09-18 13:45:57 +00:00
Boris Brezillon
adadb097a3 nir/lower_ssbo: Add an option to conditionally lower loads
On Mali(Valhall), we have a way to load SSBO data without going through
an SSBO index -> global address translation, so let's provide a way
to tell nir_lower_ssbo() when it shouldn't lower loads.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31164>
2024-09-18 13:45:57 +00:00
Boris Brezillon
bd3ed09bb7 panfrost: Emit an SSBO table on v9+
If we want to be able to replace the SW-based <SSBO,offset> -> global
address logic by something that uses LEA_PKA to do the bounds check,
we need to emit the SSBO table and lower SSBO indices like we do
for other resources.

This should stay unused until we toggle the native SSBO switch.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31164>
2024-09-18 13:45:57 +00:00
Mary Guillemard
431c1d77d6 pan/va: Define the LEA_BUFFER instruction
Will be used for SSBO loads/stores on Valhall.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31164>
2024-09-18 13:45:57 +00:00
Boris Brezillon
339a136ce7 panvk: Fix valhall_pack_buf_idx() for SSBO store/atomic operations
We're not patching indices of store/atomic operations, which trips out
nir_lower_ssbo().

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31164
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31164>
2024-09-18 13:45:57 +00:00
Mike Blumenkrantz
bb47308264 docs: OVR_multiview features
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31128>
2024-09-18 13:07:41 +00:00
Mike Blumenkrantz
dbf9b9ee6b zink: support OVR_multiview2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31128>
2024-09-18 13:07:41 +00:00
Mike Blumenkrantz
3b99f9bc0e mesa: support OVR_multiview2
this reuses the same pipe cap to indicate that
both extensions are supported

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31128>
2024-09-18 13:07:41 +00:00
Mike Blumenkrantz
1491ce46e4 zink: support GL_OVR_multiview
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31128>
2024-09-18 13:07:41 +00:00
Mike Blumenkrantz
5c5763f6a8 gallium: add PIPE_CAP_MULTIVIEW
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31128>
2024-09-18 13:07:41 +00:00
Marek Olšák
328c29d600 mesa,glsl,gallium: add GL_OVR_multiview
Co-authored-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31128>
2024-09-18 13:07:41 +00:00
Samuel Pitoiset
a5a2f82149 radv/ci: stop skipping few tests that hang only with LLVM
LLVM testing in CI is useless and these tests shouldn't be skipped
for ACO.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31217>
2024-09-18 10:11:26 +00:00
Juan A. Suarez Romero
bbe23f2bc1 v3d/ci: add new flake for rpi5
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31220>
2024-09-18 09:44:12 +00:00
Lars-Ivar Hesselberg Simonsen
589a7ac5a2 panvk: Fix paths that assume a fragment shader
A few places in PanVK assumes the fragment shader pointer is nonzero,
which is not true for some VulkanCTS tests (*nocolor*), causing
segfaults when dereferencing the pointer.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11881
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31203>
2024-09-18 08:37:55 +00:00
Samuel Pitoiset
71e9572e72 radv: update the stencil layout for DRLR feedback loops
HTILE decompresses both aspects.

Fixes: 3af0f0129c ("radv: fix DRLR with subpass input attachments and feedback loops")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31200>
2024-09-18 08:05:32 +00:00
Samuel Pitoiset
231688ad57 radv: add missing cache flushes for DRLR feedback loops
We should make sure the attachment is readable after the transition.

Fixes: 3af0f0129c ("radv: fix DRLR with subpass input attachments and feedback loops")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31200>
2024-09-18 08:05:32 +00:00
Samuel Pitoiset
ad3e6bb06a radv: fix lowering VS inputs when offset >= stride on GFX6-7
This was supposed to be >=.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31209>
2024-09-18 07:21:28 +00:00
Samuel Pitoiset
15b1790a1e radv,aco: fix legacy vertex attributes when offset >= stride on GFX6-7
The indexing needs to be adjusted and the best solution seems to
use soffset instead of const_offset, it's simpler and generate less
prologs than passing the vertex binding strides to the prolog.

Fixes dEQP-VK.pipeline.*.vertex_input.legacy_vertex_attributes.*stride_1*.

Fixes: 38cbc3c605 ("radv: advertise VK_EXT_legacy_vertex_attributes")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31209>
2024-09-18 07:21:28 +00:00
Christian Gmeiner
b11296bd3e broadcom/simulator: Add support for asahi based systems
Dumb buffers do not work with the asahi kernel driver. So use asahi ioctl to create
proper buffers.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31169>
2024-09-18 06:48:17 +00:00
K900
514df444eb gbm: split the DRI backend into a separate library and unify backend handling
This does a few things:
1. Applications linked against a non-matching GBM can load the right version of the backend
   from the environment, avoiding GBM/Mesa version mismatches in many cases
2. Distros that want to split off libgbm into a separate package from the actual drivers
   get to not ship 40MB of libgallium_dri
3. The loader logic becomes way less complex

See also: https://github.com/NixOS/nixpkgs/pull/338109 for original rationale.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31074>
2024-09-17 22:17:10 +00:00
Dylan Baker
67bcdbf4a1 hasvk: remove useless uint >= 0 check
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31214>
2024-09-17 21:16:36 +00:00
Dylan Baker
27dd9fd677 anv: remove useless uint >= 0 check
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31214>
2024-09-17 21:16:36 +00:00
Marek Olšák
31a6a96370 radeonsi: merge the CB/DB conditional blocks in gfx10_emit_barrier
They use the same condition.

This also skips CS_PARTIAL_FLUSH when CB/DB is flushed because that also
waits for compute shaders.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
0e1b7aa8cb radeonsi: deduplicate how GLM flush flags are set for gfx10-11
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
3794496994 radeonsi: skip CB_META/DB_META events when they are redundant on gfx10-11
If we use CACHE_FLUSH_AND_INV_TS_EVENT, then DB_META and CB_META events
are redundant.

So determine the event first, and then determine whether to flush
DB/CB_META.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
2642d93ddd radeonsi: remove an obsolete comment about SMEM stores
We don't use SMEM store instructions (only supported by gfx10).

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
0adea53a6a radeonsi: consolidate code around unsetting barrier_flags in emit_barrier
Some of this code was duplicated and prepare_cb_db_flushes was called
in the wrong place in gfx6_emit_barrier where it didn't do anything.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
ce72376641 radeonsi: rename SI_CONTEXT_* flags to SI_BARRIER_* flags
some of the definition names are changed completely

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
6f25ace87e radeonsi: add si_fb_barrier_before_rendering
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
0be3900b8d radeonsi: move DB synchronization into si_fb_barrier_after_rendering
Now these workarounds are applied everywhere.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
75d98f1db4 radeonsi: move CB synchronization into si_fb_barrier_after_rendering
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
dad0e0131b radeonsi: restructure fb_barrier code in si_launch_grid
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
895226e3ab radeonsi: move initial framebuffer barrier code into si_barrier.c
The new function si_fb_barrier_after_rendering will flag cache flushes and
waits in future commits. This is the beginning of unifying all framebuffer
barrier code.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
834aa812ea radeonsi: rename si_context::flags -> barrier_flags
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
ba53b57731 radeonsi: rewrite si_memory_barrier to generate fewer barrier flags
This is more optimal.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
03aec81290 radeonsi: check sctx->flags inside si_emit_barrier_direct
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
7cc2fee378 radeonsi: rename TC_L2_dirty -> L2_cache_dirty
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
0f063ed1e7 radeonsi: update remaining comments related to the L2 cache, use "L2", not "TC"
"GL2" is also OK. "TC-compatible" is also OK.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
311fafccef radeonsi: move most barrier code into a new file si_barrier.c
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
dac99e75af radeonsi: rename "cache_flush" -> "barrier"
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
214b4a119d radeonsi: remove unused buffer_subdata fallback from si_clear_buffer
It's never used.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00