nir: Add load_typed_buffer_amd intrinsic.
authorTimur Kristóf <timur.kristof@gmail.com>
Thu, 2 Feb 2023 09:47:58 +0000 (10:47 +0100)
committerMarge Bot <emma+marge@anholt.net>
Wed, 15 Mar 2023 14:54:27 +0000 (14:54 +0000)
commit022e55557b8dee8cc23809551d76c95384c35352
tree612cf183f93af1a7a4b5b1c32583a1524a2fec7a
parent7d63d8882a932a525187ea6a32c77da243e6cbc1
nir: Add load_typed_buffer_amd intrinsic.

This new intrinsic maps to the MTBUF instruction format on AMD GPUs
and represents a typed buffer load in NIR.

Also add an unsigned upper bound for the new intrinsic.
Code for that ported from aco_instruction_selection_setup.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16805>
src/compiler/nir/nir_divergence_analysis.c
src/compiler/nir/nir_intrinsics.py
src/compiler/nir/nir_range_analysis.c