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;
};
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()) {
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;
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" : "",