nir: Add intrinsics for lowering UBOs/VBOs on AGX
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Fri, 25 Nov 2022 01:40:42 +0000 (20:40 -0500)
committerMarge Bot <emma+marge@anholt.net>
Fri, 2 Dec 2022 06:25:20 +0000 (06:25 +0000)
commit0af08acca5f647ac939bd68181f25d8afe5aa1ac
tree64a38a291a69a2b646fbf53666acfddcee5ed16b
parenta855bdbf4796909e53b4ec9cc9a8ba3a847c9b2e
nir: Add intrinsics for lowering UBOs/VBOs on AGX

We'll use formatted loads and some system values to lower UBOs and VBOs to
global memory in NIR, using the AGX-specific format support and addressing
arithmetic to optimize the emitted code.

Add the intrinsics and teach nir_opt_preamble how to move them so we don't
regress UBO pushing.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19996>
src/compiler/nir/nir_intrinsics.py
src/compiler/nir/nir_opt_preamble.c