From: Ian Romanick Date: Sat, 19 Jun 2010 01:40:12 +0000 (-0700) Subject: glsl_lexer: centroid and invariant are not reserved words in GLSL 1.10 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=93dad36844a7e967aa9a9ec62587bac65b9eb5b4;p=mesa.git glsl_lexer: centroid and invariant are not reserved words in GLSL 1.10 --- diff --git a/glsl_lexer.lpp b/glsl_lexer.lpp index 5cea534bafd..cd150f81ca1 100644 --- a/glsl_lexer.lpp +++ b/glsl_lexer.lpp @@ -156,8 +156,22 @@ out return OUT; inout return INOUT; uniform return UNIFORM; varying return VARYING; -centroid return CENTROID; -invariant return INVARIANT; +centroid { + if (yyextra->language_version >= 120) { + return CENTROID; + } else { + yylval->identifier = strdup(yytext); + return IDENTIFIER; + } + } +invariant { + if (yyextra->language_version >= 120) { + return INVARIANT; + } else { + yylval->identifier = strdup(yytext); + return IDENTIFIER; + } + } flat { if (yyextra->language_version >= 130) {