nir: Add a new subgroups lowering pass

Graphics / Mesa 3D Graphics Library / Mesa - Jason Ekstrand [intel.com] - 7 November 2017 18:37 EST

This commit pulls nir_lower_read_invocations_to_scalar along with most of the guts of nir_opt_intrinsics (which mostly does subgroup lowering) into a new nir_lower_subgroups pass. There are various other bits of subgroup lowering that we're going to want to do so it makes a bit more sense to keep it all together in one pass. We also move it in i965 to happen after nir_lower_system_values to ensure that because we want to handle the subgroup mask system value intrinsics here.

28da82f978 nir: Add a new subgroups lowering pass
src/compiler/Makefile.sources | 2 +-
src/compiler/nir/meson.build | 2 +-
src/compiler/nir/nir.h | 12 +-
.../nir/nir_lower_read_invocation_to_scalar.c | 112 -------------
src/compiler/nir/nir_lower_subgroups.c | 184 +++++++++++++++++++++
src/compiler/nir/nir_opt_intrinsics.c | 71 +-------
src/intel/compiler/brw_compiler.c | 3 -
src/intel/compiler/brw_nir.c | 8 +-
8 files changed, 208 insertions(+), 186 deletions(-)

Upstream: cgit.freedesktop.org


  • Share