nir/lower_vars_to_ssa: Actually look for indirects when determining aliasing
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 10 Apr 2015 03:45:45 +0000 (20:45 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 23 Apr 2015 01:10:39 +0000 (18:10 -0700)
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/glsl/nir/nir_lower_vars_to_ssa.c

index 2ca74d71bc252cab59d2e4fb7f02a5942e02edb7..8b7261c937e177be538fe869b8f4c2f2fbb8df27 100644 (file)
@@ -317,6 +317,10 @@ deref_may_be_aliased_node(struct deref_node *node, nir_deref *deref,
          if (arr->deref_array_type == nir_deref_array_type_indirect)
             return true;
 
+         /* If there is an indirect at this level, we're aliased. */
+         if (node->indirect)
+            return true;
+
          assert(arr->deref_array_type == nir_deref_array_type_direct);
 
          if (node->children[arr->base_offset] &&