[Mesa-dev] [PATCH] glsl: Add comment explaining "row_major" parsing.

Matt Turner mattst88 at gmail.com
Thu Jul 11 11:29:27 PDT 2013


---
 src/glsl/glsl_parser.yy | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index f0b6357..c079cdd 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -1189,6 +1189,12 @@ layout_qualifier_id:
 	         $$.flags.q.shared = 1;
 	      } else if (strcmp($1, "column_major") == 0) {
 	         $$.flags.q.column_major = 1;
+	      /* "row_major" is a reserved word in GLSL 1.30+. Its token is parsed
+	       * below in the interface_block_layout_qualifier rule.
+	       *
+	       * It is not a reserved word in GLSL ES 3.00, so it's handled here as
+	       * an identifier.
+	       */
 	      } else if (strcmp($1, "row_major") == 0) {
 	         $$.flags.q.row_major = 1;
 	      }
-- 
1.8.1.5



More information about the mesa-dev mailing list