summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
authorTimothy Arceri <t_arceri@yahoo.com.au>2014-01-23 23:19:54 +1100
committerTimothy Arceri <t_arceri@yahoo.com.au>2014-01-23 23:37:36 +1100
commit3dc932d45048843d83b0f0207043d713f7bceb3c (patch)
tree580882b66b8c2832b64332c91a7ff7867e2d8dd5 /src/glsl
parentbfb48750f08223fdf1c2d7bf4db1bba5a1088a7c (diff)
downloadexternal_mesa3d-3dc932d45048843d83b0f0207043d713f7bceb3c.zip
external_mesa3d-3dc932d45048843d83b0f0207043d713f7bceb3c.tar.gz
external_mesa3d-3dc932d45048843d83b0f0207043d713f7bceb3c.tar.bz2
glsl: only call mark_max_array if we are assigning an
array This change does not help fix or prevent any bugs it just seems reasonable to do Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au> Reviewed-by: Paul Berry <stereotype441@gmail.com>
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/ast_to_hir.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index e25cba3..be12f97 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,