mesa/src/asahi
Alyssa Rosenzweig 401b400de3 nir,asahi,hk: add barrier argument to MESA_DISPATCH_PRECOMP
In the current API, precomp implicitly assumes full barriers both before & after
every dispatch. That's not good for performance. However, dropping the barriers
and requiring user to explicitly call barrier functions before/after would have
bad ergonomics.

So, we add a new parameter to the standard MESA_DISPATCH_PRECOMP signature
representing the barriers required around the dispatch. As usual, the actual
type & semantic is left to drivers to define what makes sense for their
hardware. We just reserve the place for it. (I think most drivers will want
bitflags here, but I don't think the actual flags are worth. If a driver wanted
to use a struct here, that would work too.)

Since the asahi stack doesn't do anything clever with barriers yet, we
mechnically add an AGX_BARRIER_ALL barrier to all precomp users in-tree. We can
optimize that later, this just gets the flag-day change in with no functional
change.

For JM panfrost, this will provide a convenient place to stash both their "job
barrier" bit and their "suppress prefetch" bit (which is really a sort of
barrier / cache flush, if you think about it).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32980>
2025-01-14 16:39:57 +00:00
..
clc nir,agx: Allow nir_precomp_print_blob to print a static array 2025-01-08 11:37:27 +00:00
compiler nir/opt_load_store_vectorize: make hole_size signed to indicate overlapping loads 2025-01-01 00:03:55 +00:00
drm-shim asahi: Update to UAPI 10011 2024-08-12 18:35:47 -04:00
genxml compiler: use libcl.h for CL 2024-12-12 21:16:12 +00:00
layout ail: pull in DRM modifier helper 2024-10-05 18:30:10 +00:00
lib nir,asahi,hk: add barrier argument to MESA_DISPATCH_PRECOMP 2025-01-14 16:39:57 +00:00
libagx libagx: add agx_barrier enum 2025-01-14 16:39:56 +00:00
vulkan nir,asahi,hk: add barrier argument to MESA_DISPATCH_PRECOMP 2025-01-14 16:39:57 +00:00
.clang-format clang-format: Disable formatting by default 2023-08-13 16:48:49 +02:00
.editorconfig asahi: Add .editorconfig for CL files 2024-01-10 08:44:37 -04:00
meson.build libagx: move out of lib/ 2024-11-24 13:06:08 +00:00