glsl_lexer: Handle interpolation qualifiers
authorIan Romanick <ian.d.romanick@intel.com>
Sat, 19 Jun 2010 01:36:51 +0000 (18:36 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Sat, 19 Jun 2010 02:02:45 +0000 (19:02 -0700)
glsl_lexer.lpp

index 34ca229..5cea534 100644 (file)
@@ -159,6 +159,31 @@ varying            return VARYING;
 centroid       return CENTROID;
 invariant      return INVARIANT;
 
+flat           {
+                  if (yyextra->language_version >= 130) {
+                     return FLAT;
+                  } else {
+                     yylval->identifier = strdup(yytext);
+                     return IDENTIFIER;
+                  }
+               }
+smooth         {
+                  if (yyextra->language_version >= 130) {
+                     return SMOOTH;
+                  } else {
+                     yylval->identifier = strdup(yytext);
+                     return IDENTIFIER;
+                  }
+               }
+noperspective  {
+                  if (yyextra->language_version >= 130) {
+                     return NOPERSPECTIVE;
+                  } else {
+                     yylval->identifier = strdup(yytext);
+                     return IDENTIFIER;
+                  }
+               }
+
 sampler1D      return SAMPLER1D;
 sampler2D      return SAMPLER2D;
 sampler3D      return SAMPLER3D;