radv: Support nir_intrinsic_load_global_constant.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sat, 24 Jul 2021 10:12:11 +0000 (12:12 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 21 Sep 2021 01:53:39 +0000 (01:53 +0000)
commit8ca54b4d383bf6675bbc16986c5880c1b2fa3072
treeaf01dc84d85e9f99001352a3fd33a72bf36d32aa
parent0d8bd8518d9995af905e27f407a44fb475ffbbda
radv: Support nir_intrinsic_load_global_constant.

SPIR-V parsing can result in some direct constant usage for shader
records. Lower this early to a global based intrinsic so that it
doesn't interfere with the later 32-bit offset based constants
for scratch usage.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592>
src/amd/compiler/aco_instruction_selection.cpp
src/amd/compiler/aco_instruction_selection_setup.cpp
src/amd/llvm/ac_nir_to_llvm.c
src/amd/vulkan/radv_shader.c