summaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_array_splitting.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/opt_array_splitting.cpp')
-rw-r--r--src/glsl/opt_array_splitting.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glsl/opt_array_splitting.cpp b/src/glsl/opt_array_splitting.cpp
index 9e73f3c44bb..89ce76bed2b 100644
--- a/src/glsl/opt_array_splitting.cpp
+++ b/src/glsl/opt_array_splitting.cpp
@@ -188,6 +188,10 @@ ir_array_reference_visitor::visit_enter(ir_dereference_array *ir)
if (entry && !ir->array_index->as_constant())
entry->split = false;
+ /* If the index is also array dereference, visit index. */
+ if (ir->array_index->as_dereference_array())
+ visit_enter(ir->array_index->as_dereference_array());
+
return visit_continue_with_parent;
}