nir: Replace the scoped_memory barrier by a scoped_barrier
authorBoris Brezillon <boris.brezillon@collabora.com>
Tue, 5 May 2020 07:13:20 +0000 (09:13 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 3 Jun 2020 07:39:52 +0000 (07:39 +0000)
commit345b5847b42bc1889d8665ebd129913550da4352
treed2f3e4a7b13ec1d3493fa7c5fb49e11969f52f81
parent94438a64bf7e5cd37c56e954156d59e404d76f55
nir: Replace the scoped_memory barrier by a scoped_barrier

SPIRV OpControlBarrier can have both a memory and a control barrier
which some hardware can handle with a single instruction. Let's
turn the scoped_memory_barrier into a scoped barrier which can embed
both barrier types. Note that control-only or memory-only barriers can
be supported through this new intrinsic by passing NIR_SCOPE_NONE to the
unused barrier type.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Suggested-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4900>
14 files changed:
src/compiler/nir/nir.h
src/compiler/nir/nir_builder.h
src/compiler/nir/nir_intrinsics.py
src/compiler/nir/nir_opt_access.c
src/compiler/nir/nir_opt_barriers.c
src/compiler/nir/nir_opt_combine_stores.c
src/compiler/nir/nir_opt_copy_prop_vars.c
src/compiler/nir/nir_opt_dead_write_vars.c
src/compiler/nir/nir_opt_load_store_vectorize.c
src/compiler/nir/nir_print.c
src/compiler/spirv/spirv_to_nir.c
src/intel/compiler/brw_compiler.c
src/intel/compiler/brw_fs_nir.cpp
src/intel/compiler/brw_vec4_nir.cpp