summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_lexer.ll
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-04-18 13:35:56 -0700
committerEric Anholt <[email protected]>2012-07-09 11:13:33 -0700
commit2d03f48a65a666ecdcfaffa3d39ad1b77f2b25b6 (patch)
treea35c16d15d788dcbd3926e1f59c09ae3c0e822d3 /src/glsl/glsl_lexer.ll
parent912a429bc529a017a426f06631b31da1c0eaa3ae (diff)
glsl: Add parsing for GLSL uniform blocks.
This doesn't do anything with the uniform block declarations yet, so usage of those uniforms finds them to be undeclared. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/glsl_lexer.ll')
-rw-r--r--src/glsl/glsl_lexer.ll5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll
index 2028d7f4768..24cda0c45ea 100644
--- a/src/glsl/glsl_lexer.ll
+++ b/src/glsl/glsl_lexer.ll
@@ -312,6 +312,7 @@ layout {
|| yyextra->AMD_conservative_depth_enable
|| yyextra->ARB_conservative_depth_enable
|| yyextra->ARB_explicit_attrib_location_enable
+ || yyextra->ARB_uniform_buffer_object_enable
|| yyextra->ARB_fragment_coord_conventions_enable) {
return LAYOUT_TOK;
} else {
@@ -392,7 +393,7 @@ enum KEYWORD(110 || ES, 999, ENUM);
typedef KEYWORD(110 || ES, 999, TYPEDEF);
template KEYWORD(110 || ES, 999, TEMPLATE);
this KEYWORD(110 || ES, 999, THIS);
-packed KEYWORD(110 || ES, 999, PACKED_TOK);
+packed KEYWORD(110 || ES, 140 || yyextra->ARB_uniform_buffer_object_enable, PACKED_TOK);
goto KEYWORD(110 || ES, 999, GOTO);
switch KEYWORD(110 || ES, 130, SWITCH);
default KEYWORD(110 || ES, 130, DEFAULT);
@@ -468,7 +469,7 @@ image2DArrayShadow KEYWORD(130, 999, IMAGE2DARRAYSHADOW);
imageBuffer KEYWORD(130, 999, IMAGEBUFFER);
iimageBuffer KEYWORD(130, 999, IIMAGEBUFFER);
uimageBuffer KEYWORD(130, 999, UIMAGEBUFFER);
-row_major KEYWORD(130, 999, ROW_MAJOR);
+row_major KEYWORD(130, 140 || yyextra->ARB_uniform_buffer_object_enable, ROW_MAJOR);
/* Additional reserved words in GLSL 1.40 */
isampler2DRect KEYWORD(140, 140, ISAMPLER2DRECT);