Mesa (9.1): glsl: Classify "layout" like other identifiers.

Carl Worth cworth at kemper.freedesktop.org
Wed Jul 31 05:45:20 UTC 2013


Module: Mesa
Branch: 9.1
Commit: 9688066bcaee041ea148e7dd60fba36012e00539
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9688066bcaee041ea148e7dd60fba36012e00539

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Fri Jul 26 12:31:06 2013 -0700

glsl: Classify "layout" like other identifiers.

When "layout" isn't being lexed as LAYOUT_TOK, we should treat it like
an ordinary identifier.  This means we need to classify it to determine
whether we should return IDENTIFIER, TYPE_IDENTIFIER, or NEW_IDENTIFIER.

Fixes the WebGL conformance test "shader-with-non-reserved-words."

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64087
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Cc: mesa-stable at lists.freedesktop.org
(cherry picked from commit c178ec0d7e8cc7007cb34e4f56f14261a057c200)

---

 src/glsl/glsl_lexer.ll |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll
index ddc9f80..f6aee4a 100644
--- a/src/glsl/glsl_lexer.ll
+++ b/src/glsl/glsl_lexer.ll
@@ -361,7 +361,7 @@ layout		{
 		      return LAYOUT_TOK;
 		   } else {
 		      yylval->identifier = strdup(yytext);
-		      return IDENTIFIER;
+		      return classify_identifier(yyextra, yytext);
 		   }
 		}
 




More information about the mesa-commit mailing list