summaryrefslogtreecommitdiff
path: root/src/compiler/nir/nir_lower_global_vars_to_local.c
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2018-05-16 10:02:55 -0400
committerJason Ekstrand <jason.ekstrand@intel.com>2018-06-22 20:15:54 -0700
commitd80c342d898275cbd6266c37e70dc422590d7d8c (patch)
tree8bf506dc50e2c0567c27b8199b70dd6d555d17c4 /src/compiler/nir/nir_lower_global_vars_to_local.c
parent74212c2414ce04c1331f6c79d74bcc75ea5d4726 (diff)
nir: add deref lowering sanity checking
This will be removed at the end of the transition, but add some tracking plus asserts to help ensure that lowering passes are called at the correct point (pre or post deref instruction lowering) as passes are converted and the point where lower_deref_instrs() is called is moved. Signed-off-by: Rob Clark <robdclark@gmail.com> Acked-by: Rob Clark <robdclark@gmail.com> Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Acked-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/compiler/nir/nir_lower_global_vars_to_local.c')
-rw-r--r--src/compiler/nir/nir_lower_global_vars_to_local.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_lower_global_vars_to_local.c b/src/compiler/nir/nir_lower_global_vars_to_local.c
index c8fdfde8cb1..9b3bc4cdd23 100644
--- a/src/compiler/nir/nir_lower_global_vars_to_local.c
+++ b/src/compiler/nir/nir_lower_global_vars_to_local.c
@@ -76,6 +76,9 @@ nir_lower_global_vars_to_local(nir_shader *shader)
_mesa_hash_table_create(NULL, _mesa_hash_pointer,
_mesa_key_pointer_equal);
+ nir_assert_lowered_derefs(shader, nir_lower_load_store_derefs | nir_lower_interp_derefs |
+ nir_lower_atomic_counter_derefs | nir_lower_atomic_derefs | nir_lower_image_derefs);
+
nir_foreach_function(function, shader) {
if (function->impl) {
nir_foreach_block(block, function->impl)