diff options
author | Ian Romanick <[email protected]> | 2015-10-09 15:26:20 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2015-10-12 10:15:14 -0700 |
commit | eeb444bc995c25224ce661c49dd5df6266e370d1 (patch) | |
tree | f49fcc2a4ce7700ea90f93cc980dbd58314b44ea /src/glsl | |
parent | 92635a84a7f464b827baa406578420dd6109e1a4 (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]>
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/ast_to_hir.cpp | 2 |
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; |