nir/lower_indirect_derefs: Add a threshold
authorJason Ekstrand <jason@jlekstrand.net>
Tue, 14 Jul 2020 18:55:19 +0000 (13:55 -0500)
committerMarge Bot <eric+marge@anholt.net>
Thu, 3 Sep 2020 14:26:49 +0000 (14:26 +0000)
commit38a83a30484c5d7dfcdce3c41d71373c09d42668
tree7c07f655e5e8968a4e9d84d76ca340eb8e99d2f8
parentc897cd02785bec45596d1c43b906bb4a2e9b06a6
nir/lower_indirect_derefs: Add a threshold

Instead of always lowering everything, we add a threshold such that if
the total indirected array size (AoA size) is above that threshold, it
won't lower.  It's assumed that the driver will sort things out somehow
by, for instance, lowering to scratch.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5909>
src/amd/llvm/ac_nir_to_llvm.c
src/compiler/nir/nir.h
src/compiler/nir/nir_lower_indirect_derefs.c
src/freedreno/vulkan/tu_shader.c
src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c
src/gallium/drivers/freedreno/a2xx/ir2_nir.c
src/intel/compiler/brw_nir.c