From: Timothy Arceri <timothy.arc...@collabora.com> The minimum value for index is validated in the ast code and we want to remove validation from the parser so we can add compile time constant support. --- src/glsl/glsl_parser.yy | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy index 5eb54c4..b902411 100644 --- a/src/glsl/glsl_parser.yy +++ b/src/glsl/glsl_parser.yy @@ -1471,13 +1471,7 @@ layout_qualifier_id: if (match_layout_qualifier("index", $1, state) == 0) { $$.flags.q.explicit_index = 1; - - if ($3 >= 0) { - $$.index = $3; - } else { - _mesa_glsl_error(& @3, state, "invalid index %d specified", $3); - YYERROR; - } + $$.index = $3; } if ((state->has_420pack() || -- 2.4.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev