summaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_structure_splitting.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/opt_structure_splitting.cpp')
-rw-r--r--src/glsl/opt_structure_splitting.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/opt_structure_splitting.cpp b/src/glsl/opt_structure_splitting.cpp
index 014407c0be2..2c1f6bb227a 100644
--- a/src/glsl/opt_structure_splitting.cpp
+++ b/src/glsl/opt_structure_splitting.cpp
@@ -151,6 +151,12 @@ ir_structure_reference_visitor::visit_enter(ir_dereference_record *ir)
ir_visitor_status
ir_structure_reference_visitor::visit_enter(ir_assignment *ir)
{
+ /* If there are no structure references yet, no need to bother with
+ * processing the expression tree.
+ */
+ if (this->variable_list.is_empty())
+ return visit_continue_with_parent;
+
if (ir->lhs->as_dereference_variable() &&
ir->rhs->as_dereference_variable() &&
!ir->condition) {