diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index e25cba3fa64..be12f97c3be 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -830,8 +830,10 @@ do_assignment(exec_list *instructions, struct _mesa_glsl_parse_state *state, rhs->type->array_size()); d->type = var->type; } - mark_whole_array_access(rhs); - mark_whole_array_access(lhs); + if (lhs->type->is_array()) { + mark_whole_array_access(rhs); + mark_whole_array_access(lhs); + } } /* Most callers of do_assignment (assign, add_assign, pre_inc/dec,