From 9bc9895c4a608e475f241d2c16dc88e40ea702d7 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 19 Nov 2012 22:36:28 -0800 Subject: [PATCH] glsl: Support unsigned integer constants in layout qualifiers. Fixes es3conform's explicit_attrib_location_integer_constants. Reviewed-by: Eric Anholt Reviewed-and-tested-by: Matt Turner --- src/glsl/glsl_parser.yy | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy index a0665067d74..407dbbeebcc 100644 --- a/src/glsl/glsl_parser.yy +++ b/src/glsl/glsl_parser.yy @@ -238,6 +238,7 @@ static void yyerror(YYLTYPE *loc, _mesa_glsl_parse_state *st, const char *msg) %type conditionopt %type for_init_statement %type for_rest_statement +%type integer_constant %% translation_unit: @@ -1122,6 +1123,10 @@ layout_qualifier_id_list: } ; +integer_constant: + INTCONSTANT { $$ = $1; } + | UINTCONSTANT { $$ = $1; } + layout_qualifier_id: any_identifier { @@ -1191,7 +1196,7 @@ layout_qualifier_id: YYERROR; } } - | any_identifier '=' INTCONSTANT + | any_identifier '=' integer_constant { memset(& $$, 0, sizeof($$)); -- 2.30.2