nir: Add SSBO->global lowering pass
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 4 Nov 2019 22:27:18 +0000 (17:27 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 21 Feb 2020 13:06:22 +0000 (13:06 +0000)
commit7ab4e4dd963028a4620ffc00c38988da4abc1860
tree652afcd7011ecbc88863e69db0e6499263c88321
parentb929565ea8d4846b1943f35b6e86d685a616ed54
nir: Add SSBO->global lowering pass

To facilitate lowering SSBOs to globals, we need a load_ssbo_address
intrinsic. This intrinsic takes an SSBO index and loads the address in
global memory of the SSBO (likely implemented via a uniform in the
driver). In the future, we'll support bounds checking, but at the moment
this is not supported (this pass should only be used for trusted
contexts at the moment, i.e. contexts without robustness extensions).

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2753>
src/compiler/Makefile.sources
src/compiler/nir/meson.build
src/compiler/nir/nir.h
src/compiler/nir/nir_intrinsics.py
src/compiler/nir/nir_lower_ssbo.c [new file with mode: 0644]