nir/lower_io: Support global addresses for UBOs in nir_lower_explicit_io
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 15 Jan 2021 06:35:19 +0000 (00:35 -0600)
committerMarge Bot <eric+marge@anholt.net>
Wed, 17 Mar 2021 17:49:59 +0000 (17:49 +0000)
commitc8748771bb68951a2921e76ceab61b68fca9417d
tree23302b86bcbc67b7a36775bd3881faaae78bc687
parentbd65e4d19923be87e94a5a4eca6cc5285a3c3d40
nir/lower_io: Support global addresses for UBOs in nir_lower_explicit_io

For nir_address_format_64bit_global_32bit_offset and
nir_address_format_64bit_bounded_global, we use a new intrinsics which
take the base address and offset as separate parameters.  For bounds-
checked access, the bound is also included in the intrinsic.  This gives
the drive more control over the bounds checking so that UBOs don't
suddenly become massively more expensive.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635>
src/compiler/nir/nir_intrinsics.py
src/compiler/nir/nir_lower_io.c