From fe5c522edd2e809adc46d44d73a49574fc686929 Mon Sep 17 00:00:00 2001 From: Andres Gomez Date: Mon, 14 Nov 2016 12:23:32 +0200 Subject: glsl: split default out layout qualifier merge Currently, the default out layout qualifier merge performs specific validation and merge. We want to split out the validation from the merge so they can be done independently. Additionally, for simplification, the direction of the validation and merge is changed so the ast_type_qualifier calling the method is the one validated and merged against the default out qualifier. Reviewed-by: Timothy Arceri Signed-off-by: Andres Gomez --- src/compiler/glsl/ast.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/compiler/glsl/ast.h') diff --git a/src/compiler/glsl/ast.h b/src/compiler/glsl/ast.h index e7c3aff6b82..14936f1cebe 100644 --- a/src/compiler/glsl/ast.h +++ b/src/compiler/glsl/ast.h @@ -755,10 +755,18 @@ struct ast_type_qualifier { const ast_type_qualifier &q, bool is_single_layout_merge); - bool merge_out_qualifier(YYLTYPE *loc, - _mesa_glsl_parse_state *state, - const ast_type_qualifier &q, - ast_node* &node, bool create_node); + /** + * Validate current qualifier against the global out one. + */ + bool validate_out_qualifier(YYLTYPE *loc, + _mesa_glsl_parse_state *state); + + /** + * Merge current qualifier into the global out one. + */ + bool merge_into_out_qualifier(YYLTYPE *loc, + _mesa_glsl_parse_state *state, + ast_node* &node, bool create_node); bool merge_in_qualifier(YYLTYPE *loc, _mesa_glsl_parse_state *state, -- cgit v1.2.3