[Mesa-dev] [PATCH] glsl: Support unsigned integer constants in layout qualifiers.
Matt Turner
mattst88 at gmail.com
Tue Nov 20 11:21:40 PST 2012
On Mon, Nov 19, 2012 at 10:37 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> Fixes es3conform's explicit_attrib_location_integer_constants.
> ---
> 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 89175f5..f123368 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,10 @@ layout_qualifier_id_list:
> }
> ;
>
> +integer_constant:
> + INTCONSTANT { $$ = $1; }
> + | UINTCONSTANT { $$ = $1; }
> +
> layout_qualifier_id:
> any_identifier
> {
> @@ -1155,7 +1160,7 @@ layout_qualifier_id:
> YYERROR;
> }
> }
> - | any_identifier '=' INTCONSTANT
> + | any_identifier '=' integer_constant
> {
> memset(& $$, 0, sizeof($$));
>
> --
> 1.8.0
Reviewed-and-Tested-by: Matt Turner <mattst88 at gmail.com>
More information about the mesa-dev
mailing list