nir/lower_indirect_derefs: Use the direct array deref for recursion
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 31 May 2016 22:02:10 +0000 (15:02 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sat, 4 Jun 2016 02:29:28 +0000 (19:29 -0700)
This fixes about 100 of the new Vulkan CTS tests.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
src/compiler/nir/nir_lower_indirect_derefs.c

index 694a6e0f3d734ffce45cebaa156cc106872ff466..1bf4bf66795cebb78faeac3b10efc426f8f49250 100644 (file)
@@ -50,7 +50,7 @@ emit_indirect_load_store(nir_builder *b, nir_intrinsic_instr *orig_instr,
       direct.indirect = NIR_SRC_INIT;
 
       arr_parent->child = &direct.deref;
-      emit_load_store(b, orig_instr, deref, &arr->deref, dest, src);
+      emit_load_store(b, orig_instr, deref, &direct.deref, dest, src);
       arr_parent->child = &arr->deref;
    } else {
       int mid = start + (end - start) / 2;