summaryrefslogtreecommitdiffstats
path: root/glsl_lexer.lpp
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2010-06-18 18:40:12 -0700
committerIan Romanick <[email protected]>2010-06-18 19:02:45 -0700
commit93dad36844a7e967aa9a9ec62587bac65b9eb5b4 (patch)
treef9dcf2a9a87c18aa449bd0175bb8b56c89636ed8 /glsl_lexer.lpp
parent8655b7e78a40f7f64b744727071b946c0da75217 (diff)
glsl_lexer: centroid and invariant are not reserved words in GLSL 1.10
Diffstat (limited to 'glsl_lexer.lpp')
-rw-r--r--glsl_lexer.lpp18
1 files changed, 16 insertions, 2 deletions
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) {