mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 17:10:11 +01:00
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 <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
92635a84a7
commit
eeb444bc99
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue