/** \name Qualifiers for GL_ARB_shader_subroutine */
/** \{ */
unsigned subroutine:1; /**< Is this marked 'subroutine' */
- unsigned subroutine_def:1; /**< Is this marked 'subroutine' with a list of types */
/** \} */
/** \name Qualifiers for GL_KHR_blend_equation_advanced */
}
}
} else if (qual->flags.q.explicit_index) {
- if (!qual->flags.q.subroutine_def)
+ if (!qual->subroutine_list)
_mesa_glsl_error(loc, state,
"explicit index requires explicit location");
} else if (qual->flags.q.explicit_component) {
* "Subroutine declarations cannot be prototyped. It is an error to prepend
* subroutine(...) to a function declaration."
*/
- if (this->return_type->qualifier.flags.q.subroutine_def && !is_definition) {
+ if (this->return_type->qualifier.subroutine_list && !is_definition) {
YYLTYPE loc = this->get_location();
_mesa_glsl_error(&loc, state,
"function declaration `%s' cannot have subroutine prepended",
sig->replace_parameters(&hir_parameters);
signature = sig;
- if (this->return_type->qualifier.flags.q.subroutine_def) {
+ if (this->return_type->qualifier.subroutine_list) {
int idx;
if (this->return_type->qualifier.flags.q.explicit_index) {
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;
}
}
}
- if (q.flags.q.subroutine_def) {
- if (this->flags.q.subroutine_def) {
+ if (q.subroutine_list) {
+ if (this->subroutine_list) {
_mesa_glsl_error(loc, state,
"conflicting subroutine qualifiers used");
} else {
bad.flags.q.point_mode ? " point_mode" : "",
bad.flags.q.vertices ? " vertices" : "",
bad.flags.q.subroutine ? " subroutine" : "",
- bad.flags.q.subroutine_def ? " subroutine_def" : "",
bad.flags.q.blend_support ? " blend_support" : "",
bad.flags.q.inner_coverage ? " inner_coverage" : "",
bad.flags.q.post_depth_coverage ? " post_depth_coverage" : "");
| SUBROUTINE '(' subroutine_type_list ')'
{
memset(& $$, 0, sizeof($$));
- $$.flags.q.subroutine_def = 1;
+ $$.flags.q.subroutine = 1;
$$.subroutine_list = $3;
}
;
if (q->flags.q.subroutine)
printf("subroutine ");
- if (q->flags.q.subroutine_def) {
+ if (q->subroutine_list) {
printf("subroutine (");
q->subroutine_list->print();
printf(")");