Module: Mesa Branch: master Commit: 1d87d6f9ca543631b2bc30ac8d82b6a23159fb55 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1d87d6f9ca543631b2bc30ac8d82b6a23159fb55
Author: Timothy Arceri <[email protected]> Date: Fri Nov 13 15:16:20 2015 +1100 glsl: remove duplicate validation for index layout qualifier The minimum value for index is validated in apply_explicit_location() and we want to remove validation from the parser so we can add compile time constant support. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Emil Velikov <[email protected]> --- 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 d2d5058..a96b180 100644 --- a/src/glsl/glsl_parser.yy +++ b/src/glsl/glsl_parser.yy @@ -1476,13 +1476,7 @@ layout_qualifier_id: } $$.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() || _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
