From 1810d726ebe7926a2f3b1b81cf9c64276a32d354 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Wed, 22 Aug 2018 11:28:34 +1000 Subject: [PATCH] hack: work around invalid layout qualifiers on function params --- src/compiler/glsl/glsl_parser.yy | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/compiler/glsl/glsl_parser.yy b/src/compiler/glsl/glsl_parser.yy index cb7376995d2..ed6436075ac 100644 --- a/src/compiler/glsl/glsl_parser.yy +++ b/src/compiler/glsl/glsl_parser.yy @@ -897,6 +897,17 @@ parameter_declarator: $$->identifier = $2; state->symbols->add_variable(new(state) ir_variable(NULL, $2, ir_var_auto)); } + | layout_qualifier type_specifier any_identifier + { + void *ctx = state->linalloc; + $$ = new(ctx) ast_parameter_declarator(); + $$->set_location_range(@2, @3); + $$->type = new(ctx) ast_fully_specified_type(); + $$->type->set_location(@2); + $$->type->specifier = $2; + $$->identifier = $3; + state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto)); + } | type_specifier any_identifier array_specifier { void *ctx = state->linalloc; -- 2.17.1