mesa/src/compiler
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 meson: Add mesa-clc and install-mesa-clc options 2024-12-23 15:09:40 +00:00
glsl glsl: enable OVR_multiview if OVR_multiview2 is enabled 2025-01-10 19:10:48 +00:00
isaspec build: pass licensing information in SPDX form 2024-06-29 12:42:49 -07:00
libcl libcl: Add VkQueryType and VkQueryResultFlagBits definitions 2025-01-08 11:37:27 +00:00
nir nir,asahi,hk: add barrier argument to MESA_DISPATCH_PRECOMP 2025-01-14 16:39:57 +00:00
rust compiler/rust/bitset: Test next_unset() 2025-01-02 20:52:48 +00:00
spirv gl/spirv: update subgroup_size if GroupNonUniform is used 2025-01-07 19:32:43 +00:00
builtin_types.py compiler/types: Add multisample vimage/vtexture types 2024-08-27 15:06:16 +00:00
builtin_types_c.py util,vulkan,mesa,compiler: Generate source files with utf8 encoding from mako template 2023-12-07 12:41:07 +00:00
builtin_types_h.py util,vulkan,mesa,compiler: Generate source files with utf8 encoding from mako template 2023-12-07 12:41:07 +00:00
glsl_types.c glsl: fix glsl_get_word_size_align_bytes 2025-01-06 22:09:49 +00:00
glsl_types.h glsl: remove unused code 2025-01-06 19:09:18 +00:00
meson.build nak: Move bitset to compiler crate 2024-08-07 21:08:18 +00:00
shader_enums.c nir: add load_front_face_fsign 2024-12-30 22:31:34 +00:00
shader_enums.h mesa: remove unused PROGRAM_SYSTEM_VALUE 2025-01-06 19:09:17 +00:00
shader_info.h nir: add option to use compact view indices 2024-12-09 20:31:49 +00:00