From: Kenneth Graunke Date: Tue, 20 Nov 2012 06:36:28 +0000 (-0800) Subject: glsl: Support unsigned integer constants in layout qualifiers. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9bc9895c4a608e475f241d2c16dc88e40ea702d7;p=mesa.git 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 --- 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($$));