summaryrefslogtreecommitdiff
path: root/src/glsl
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2012-11-19 22:36:28 -0800
committerKenneth Graunke <kenneth@whitecape.org>2012-11-26 21:02:45 -0800
commit9bc9895c4a608e475f241d2c16dc88e40ea702d7 (patch)
treea14826d6bd7859a0bef248dce052af265746b414 /src/glsl
parent9136723214136a95a3c915d580943c888cd99503 (diff)
glsl: Support unsigned integer constants in layout qualifiers.
Fixes es3conform's explicit_attrib_location_integer_constants. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-and-tested-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/glsl_parser.yy7
1 files changed, 6 insertions, 1 deletions
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 <node> conditionopt
%type <node> for_init_statement
%type <for_rest_statement> for_rest_statement
+%type <n> 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($$));