intel/nir: Stop using nir_lower_vars_to_scratch
authorJason Ekstrand <jason@jlekstrand.net>
Tue, 14 Jul 2020 21:01:18 +0000 (16:01 -0500)
committerMarge Bot <eric+marge@anholt.net>
Thu, 3 Sep 2020 14:26:49 +0000 (14:26 +0000)
commita7a0315d7fdaa0e3e698de2af043776e5da467ff
treefb67a34f4e5c5e593177e3c7814fab3c76ef1188
parent38a83a30484c5d7dfcdce3c41d71373c09d42668
intel/nir: Stop using nir_lower_vars_to_scratch

Instead, we do a limited indirect deref lowering and then use
nir_lower_vars_to_explicit_types and nir_lower_explicit_io to lower it
as if it were SSBO or global memory access.  Among other things, this
should enable pointer arithmetic on local variables.  Fun!

The only shader-db change from this change on ICL was a few tiny cycle
count changes in 7 Aztec Ruins compute shaders.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5909>
src/intel/compiler/brw_nir.c