Commit graph

194938 commits

Author SHA1 Message Date
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
Marek Olšák
e1cfac91eb radeonsi: remove SI_CP_DMA_CLEAR_METHOD, call si_cp_dma_clear_buffer directly
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
47f6e05c6a radeonsi: replace SI_OP_CS_RENDER_COND_ENABLE with bool render_condition_enable
and the parameter is moved to the end in some cases, or second from the end.

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
fc489d1855 radeonsi: enable conditional rendering for si_compute_shorten_ubyte_buffer
If the draw is conditional, the lowering should also be conditional.

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
df6b5e3c05 radeonsi: remove unused flags and user_flags params from clear/copy functions
Remove the params from these:
- si_copy_buffer
- si_cp_dma_prepare
- si_cp_dma_clear_buffer
- si_cp_dma_realign_engine
- si_cp_dma_copy_buffer

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
2f4a9e65a7 radeonsi: change the flags parameter of si_compute_blit to bool fail_if_slow
That's the only flag we pass to it.

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
7432d2f19c radeonsi: remove SI_OP_SYNC_BEFORE* flags
We always pass SI_OP_SYNC_BEFORE to barriers, which makes it redundant.
If we don't want to sync "before", we just won't call
si_barrier_before_internal_op.

This makes the flags parameter unused in si_barrier_before_internal_op.
It might be used for something else in the future. All places now pass 0
to it.

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
0923bd1c5f radeonsi: remove unused SI_OP_IS_NESTED
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
c2d8cba0b4 radeonsi: always wait for idle before get_query_result_resource
The shader busy-waits until the query results are written, but that only
synchronizes for src. The destination buffer might also be used by previous
shaders, so we should wait until all shaders are idle. This might fix some
issues.

The missing si_mark_atom_dirty fix should have no effect, but all flags
changes should call it to be consistent.

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
e8b474c921 radeonsi: always pass flags=0 into si_barrier_after_internal_op/simple_buffer_op
because the parameter is unused. It might be used differently in the future.

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
eb6c098cd1 radeonsi: remove SI_OP_SYNC_AFTER
All places that call si_barrier_after_internal_op also set SI_OP_SYNC_AFTER,
so we can do the sync unconditionally.

If we want to skip the "after" sync in the future, we just won't call
si_barrier_after_internal_op.

CP DMA is the only one that will sync even without
si_barrier_after_internal_op, but CP DMA ops are usually small and almost
never used on GFX10+.

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
d225fb3025 radeonsi: remove SI_OP_SKIP_CACHE_INV_BEFORE
The only remaining use had no effect because it doesn't call
si_barrier_before_internal_op at all and instead implements its own
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