radeonsi: treat nir_intrinsic_load_constant as a VMEM operation
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Wed, 27 Oct 2021 12:44:54 +0000 (14:44 +0200)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Thu, 4 Nov 2021 08:38:20 +0000 (09:38 +0100)
commitdc56301f78494bea67f0c57d5aa77fef42bfe455
treea7ee3de1329ad0e40b4a5609acd6285aeb716157
parentaf8fa2644e1ed225d1ebf6ee532062f7c36e6c7d
radeonsi: treat nir_intrinsic_load_constant as a VMEM operation

This is used by variable indexing of constant arrays, to build
code like this:

   s_add_u32 s6, s6, const_data@rel32@lo+4
   s_addc_u32 s7, s7, const_data@rel32@hi+12
   [...]
   global_load_dword v4, v4, s[6:7

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5118
Fixes: 8288882965b ("radeonsi: set MEM_ORDERED optimally")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13550>
src/gallium/drivers/radeonsi/si_shader_nir.c