Mesa (gles3): glsl: Support unsigned integer constants in layout qualifiers .
Kenneth Graunke
kwg at kemper.freedesktop.org
Tue Nov 20 19:21:13 UTC 2012
Module: Mesa
Branch: gles3
Commit: 173308f70e22b11deb099092a121b96f09ec3ffb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=173308f70e22b11deb099092a121b96f09ec3ffb
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Mon Nov 19 22:36:28 2012 -0800
glsl: Support unsigned integer constants in layout qualifiers.
Fixes es3conform's explicit_attrib_location_integer_constants.
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
---
src/glsl/glsl_parser.yy | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index 89175f5..d849466 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -241,6 +241,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:
@@ -1084,6 +1085,11 @@ layout_qualifier_id_list:
}
;
+integer_constant:
+ INTCONSTANT { $$ = $1; }
+ | UINTCONSTANT { $$ = $1; }
+ ;
+
layout_qualifier_id:
any_identifier
{
@@ -1155,7 +1161,7 @@ layout_qualifier_id:
YYERROR;
}
}
- | any_identifier '=' INTCONSTANT
+ | any_identifier '=' integer_constant
{
memset(& $$, 0, sizeof($$));
More information about the mesa-commit
mailing list