glsl: make use of glsl_type::is_record()
[mesa.git] / src / compiler / glsl / ir_print_visitor.cpp
index 0a39459c9256e883fd426198485d0c303c54009f..6c1c86a58287c31cc53559bc4f53c14c4c98dc77 100644 (file)
@@ -149,8 +149,7 @@ print_type(FILE *f, const glsl_type *t)
       fprintf(f, "(array ");
       print_type(f, t->fields.array);
       fprintf(f, " %u)", t->length);
-   } else if ((t->base_type == GLSL_TYPE_STRUCT)
-              && !is_gl_identifier(t->name)) {
+   } else if (t->is_record() && !is_gl_identifier(t->name)) {
       fprintf(f, "%s@%p", t->name, (void *) t);
    } else {
       fprintf(f, "%s", t->name);