}
bool
-ast_fully_specified_type::has_qualifiers() const
+ast_fully_specified_type::has_qualifiers(_mesa_glsl_parse_state *state) const
{
/* 'subroutine' isnt a real qualifier. */
ast_type_qualifier subroutine_only;
subroutine_only.flags.i = 0;
subroutine_only.flags.q.subroutine = 1;
subroutine_only.flags.q.subroutine_def = 1;
+ if (state->has_explicit_uniform_location()) {
+ subroutine_only.flags.q.explicit_index = 1;
+ }
return (this->qualifier.flags.i & ~subroutine_only.flags.i) != 0;
}
bool
ast_type_qualifier::merge_qualifier(YYLTYPE *loc,
_mesa_glsl_parse_state *state,
- ast_type_qualifier q)
+ const ast_type_qualifier &q)
{
ast_type_qualifier ubo_mat_mask;
ubo_mat_mask.flags.i = 0;
}
}
+ if (q.flags.q.subroutine_def) {
+ if (this->flags.q.subroutine_def) {
+ _mesa_glsl_error(loc, state,
+ "conflicting subroutine qualifiers used");
+ } else {
+ this->subroutine_list = q.subroutine_list;
+ }
+ }
+
if (q.flags.q.invocations) {
if (this->invocations) {
this->invocations->merge_qualifier(q.invocations);
bool
ast_type_qualifier::merge_out_qualifier(YYLTYPE *loc,
_mesa_glsl_parse_state *state,
- ast_type_qualifier q,
+ const ast_type_qualifier &q,
ast_node* &node)
{
void *mem_ctx = state;
bool
ast_type_qualifier::merge_in_qualifier(YYLTYPE *loc,
_mesa_glsl_parse_state *state,
- ast_type_qualifier q,
+ const ast_type_qualifier &q,
ast_node* &node)
{
void *mem_ctx = state;