deconsted->accept(&v);
}
+static void
+glsl_print_type(FILE *f, const glsl_type *t)
+{
+ if (t->is_array()) {
+ fprintf(f, "(array ");
+ glsl_print_type(f, t->fields.array);
+ fprintf(f, " %u)", t->length);
+ } else if (t->is_struct() && !is_gl_identifier(t->name)) {
+ fprintf(f, "%s@%p", t->name, (void *) t);
+ } else {
+ fprintf(f, "%s", t->name);
+ }
+}
+
extern "C" {
void
_mesa_print_ir(FILE *f, exec_list *instructions,
}
}
-static inline bool
-is_gl_identifier(const char *s)
-{
- return s && s[0] == 'g' && s[1] == 'l' && s[2] == '_';
-}
-
-void
-glsl_print_type(FILE *f, const glsl_type *t)
-{
- if (t->is_array()) {
- fprintf(f, "(array ");
- glsl_print_type(f, t->fields.array);
- fprintf(f, " %u)", t->length);
- } else if (t->is_struct() && !is_gl_identifier(t->name)) {
- fprintf(f, "%s@%p", t->name, (void *) t);
- } else {
- fprintf(f, "%s", t->name);
- }
-}
-
}
extern void
_mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *state);
-void
-glsl_print_type(FILE *f, const struct glsl_type *t);
-
void encode_type_to_blob(struct blob *blob, const struct glsl_type *type);
const struct glsl_type *decode_type_from_blob(struct blob_reader *blob);