compiler/glsl: allow sequence op as a const expr in gles 1.0
authorLars Hamre <chemecse@gmail.com>
Wed, 23 Mar 2016 14:14:23 +0000 (10:14 -0400)
committerEduardo Lima Mitev <elima@igalia.com>
Wed, 23 Mar 2016 17:13:26 +0000 (18:13 +0100)
commit43c6f3f82f62f28dc97d195750ba25c88051b64e
treea48074db0c25e2c6336d5151b3cc8063b22fda1b
parentc4931ae17452cabbc7830cd9d5a356b835fd4c48
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>
src/compiler/glsl/ast_to_hir.cpp