this->all_invariant = false;
this->user_structures = NULL;
this->num_user_structures = 0;
+ this->num_subroutines = 0;
+ this->subroutines = NULL;
+ this->num_subroutine_types = 0;
+ this->subroutine_types = NULL;
/* supported_versions should be large enough to support the known desktop
* GLSL versions plus 3 GLES versions (ES 1.00, ES 3.00, and ES 3.10))
void
_mesa_ast_type_qualifier_print(const struct ast_type_qualifier *q)
{
+ if (q->flags.q.subroutine)
+ printf("subroutine ");
+
+ if (q->flags.q.subroutine_def) {
+ printf("subroutine (");
+ q->subroutine_list->print();
+ printf(")");
+ }
+
if (q->flags.q.constant)
printf("const ");
is_declaration = true;
}
+void ast_subroutine_list::print(void) const
+{
+ foreach_list_typed (ast_node, ast, link, & this->declarations) {
+ if (&ast->link != this->declarations.get_head())
+ printf(", ");
+ ast->print();
+ }
+}
+
static void
set_shader_inout_layout(struct gl_shader *shader,
struct _mesa_glsl_parse_state *state)