From: Ian Romanick Date: Fri, 9 Oct 2015 22:26:20 +0000 (-0700) Subject: glsl: Never allow the sequence operator anywhere in an array size X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eeb444bc995c25224ce661c49dd5df6266e370d1;p=mesa.git glsl: Never allow the sequence operator anywhere in an array size Fixes: spec/glsl-1.20/compiler/structure-and-array-operations/array-size-sequence-in-parenthesis.vert spec/glsl-es-1.00/compiler/array-sized-by-sequence-in-parenthesis.vert spec/glsl-es-3.00/compiler/array-sized-by-sequence-in-parenthesis.vert Signed-off-by: Ian Romanick Reviewed-by: Matt Turner --- diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 23ded46f26c..c04db3505c1 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -2069,7 +2069,7 @@ process_array_size(exec_node *node, } ir_constant *const size = ir->constant_expression_value(); - if (size == NULL) { + if (size == NULL || array_size->has_sequence_subexpression()) { _mesa_glsl_error(& loc, state, "array size must be a " "constant valued expression"); return 0;