summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2015-10-09 15:26:20 -0700
committerIan Romanick <[email protected]>2015-10-12 10:15:14 -0700
commiteeb444bc995c25224ce661c49dd5df6266e370d1 (patch)
treef49fcc2a4ce7700ea90f93cc980dbd58314b44ea
parent92635a84a7f464b827baa406578420dd6109e1a4 (diff)
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 <[email protected]> Reviewed-by: Matt Turner <[email protected]>
-rw-r--r--src/glsl/ast_to_hir.cpp2
1 files changed, 1 insertions, 1 deletions
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;