mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
compiler/glsl: allow sequence op as a const expr in gles 1.0
Allow the sequence operator to be a constant expression in GLSL ES versions prior to GLSL ES 3.0 Fixes the following piglit test: /all/spec/glsl-es-1.0/compiler/array-sized-by-sequence-in-parenthesis.vert This is similar to the logic from process_initializer() which performs the same check for constant variable initialization with sequence operators. v2: Fixed regression pointed out by Eduardo Lima Mitev Signed-off-by: Lars Hamre <chemecse@gmail.com> Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
This commit is contained in:
parent
c4931ae174
commit
43c6f3f82f
1 changed files with 3 additions and 1 deletions
|
|
@ -2125,7 +2125,9 @@ process_array_size(exec_node *node,
|
|||
}
|
||||
|
||||
ir_constant *const size = ir->constant_expression_value();
|
||||
if (size == NULL || array_size->has_sequence_subexpression()) {
|
||||
if (size == NULL ||
|
||||
(state->is_version(120, 300) &&
|
||||
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