aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-07-30 16:33:26 +1000
committerTimothy Arceri <[email protected]>2016-07-31 09:24:45 +1000
commitd3dc1b8b5ef61f0e7a11f7d70224e7cd42b37374 (patch)
treebc18daae918fd15b0a59e1c52f4213e83a15bc25 /src/compiler/glsl
parent2262fe40816c883a614aa66f6646bfde1ca29cdc (diff)
glsl: add name param to validate_flags()
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/glsl')
-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" : "",