diff options
author | Paul Berry <[email protected]> | 2011-09-10 07:48:46 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2011-09-14 10:58:56 -0700 |
commit | 00792e3586746c833ffc9bb65712e38038916e06 (patch) | |
tree | ee049da95a89bbb40da576a678f8dee83fe34783 /src/glsl/s_expression.h | |
parent | 373234ce17555376c5cb57a2cdce3038df3f51cd (diff) |
glsl: Remove field array_lvalue from ir_variable.
The array_lvalue field was attempting to enforce the restriction that
whole arrays can't be used on the left-hand side of an assignment in
GLSL 1.10 or GLSL ES, and can't be used as out or inout parameters in
GLSL 1.10.
However, it was buggy (it didn't work properly for built-in arrays),
and it was clumsy (it unnecessarily kept track on a
variable-by-variable basis, and it didn't cover the GLSL ES case).
This patch removes the array_lvalue field completely in favor of
explicit checks in ast_parameter_declarator::hir() (this check is
added) and in do_assignment (this check was already present).
This causes a benign behavioral change: when the user attempts to pass
an array as an out or inout parameter of a function in GLSL 1.10, the
error is now flagged at the time the function definition is
encountered, rather than at the time of invocation. Previously we
allowed such functions to be defined, and only flagged the error if
they were invoked.
Fixes Piglit tests
spec/glsl-1.10/compiler/qualifiers/fn-{out,inout}-array-prohibited*
and
spec/glsl-1.20/compiler/assignment-operators/assign-builtin-array-allowed.vert.
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/s_expression.h')
0 files changed, 0 insertions, 0 deletions