summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/compiler/glsl/ast.h4
-rw-r--r--src/compiler/glsl/ast_to_hir.cpp7
-rw-r--r--src/compiler/glsl/ast_type.cpp8
3 files changed, 9 insertions, 10 deletions
diff --git a/src/compiler/glsl/ast.h b/src/compiler/glsl/ast.h
index aa8c4228511..157895d0fbd 100644
--- a/src/compiler/glsl/ast.h
+++ b/src/compiler/glsl/ast.h
@@ -755,8 +755,8 @@ struct ast_type_qualifier {
bool validate_flags(YYLTYPE *loc,
_mesa_glsl_parse_state *state,
- const char *message,
- const ast_type_qualifier &allowed_flags);
+ const ast_type_qualifier &allowed_flags,
+ const char *message, const char *name);
ast_subroutine_list *subroutine_list;
};
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index 0b549790339..683c1440178 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -4517,10 +4517,9 @@ ast_declarator_list::hir(exec_list *instructions,
allowed_atomic_qual_mask.flags.q.explicit_offset = 1;
allowed_atomic_qual_mask.flags.q.uniform = 1;
- type->qualifier.validate_flags(&loc, state,
- "invalid layout qualifier for "
- "atomic_uint",
- allowed_atomic_qual_mask);
+ type->qualifier.validate_flags(&loc, state, allowed_atomic_qual_mask,
+ "invalid layout qualifier for",
+ "atomic_uint");
}
if (this->declarations.is_empty()) {
diff --git a/src/compiler/glsl/ast_type.cpp b/src/compiler/glsl/ast_type.cpp
index 1f8fb9ccc62..ef573e70598 100644
--- a/src/compiler/glsl/ast_type.cpp
+++ b/src/compiler/glsl/ast_type.cpp
@@ -600,8 +600,8 @@ ast_type_qualifier::merge_in_qualifier(YYLTYPE *loc,
bool
ast_type_qualifier::validate_flags(YYLTYPE *loc,
_mesa_glsl_parse_state *state,
- const char *message,
- const ast_type_qualifier &allowed_flags)
+ const ast_type_qualifier &allowed_flags,
+ const char *message, const char *name)
{
ast_type_qualifier bad;
bad.flags.i = this->flags.i & ~allowed_flags.flags.i;
@@ -609,11 +609,11 @@ ast_type_qualifier::validate_flags(YYLTYPE *loc,
return true;
_mesa_glsl_error(loc, state,
- "%s:"
+ "%s '%s':"
"%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s"
"%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s"
"%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
- message,
+ message, name,
bad.flags.q.invariant ? " invariant" : "",
bad.flags.q.precise ? " precise" : "",
bad.flags.q.constant ? " constant" : "",