#include "util/u_string.h"
#include "util/half_float.h"
-static void print_type(FILE *f, const glsl_type *t);
-
void
ir_instruction::print(void) const
{
for (unsigned j = 0; j < s->length; j++) {
fprintf(f, "\t((");
- print_type(f, s->fields.structure[j].type);
+ ir_print_type(f, s->fields.structure[j].type);
fprintf(f, ")(%s))\n", s->fields.structure[j].name);
}
return name;
}
-static void
-print_type(FILE *f, const glsl_type *t)
+extern "C" void
+ir_print_type(FILE *f, const glsl_type *t)
{
if (t->is_array()) {
fprintf(f, "(array ");
- print_type(f, t->fields.array);
+ ir_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);
stream,
interp[ir->data.interpolation]);
- print_type(f, ir->type);
+ ir_print_type(f, ir->type);
fprintf(f, " %s)", unique_name(ir));
}
fprintf(f, "(signature ");
indentation++;
- print_type(f, ir->return_type);
+ ir_print_type(f, ir->return_type);
fprintf(f, "\n");
indent();
{
fprintf(f, "(expression ");
- print_type(f, ir->type);
+ ir_print_type(f, ir->type);
fprintf(f, " %s ", ir_expression_operation_strings[ir->operation]);
return;
}
- print_type(f, ir->type);
+ ir_print_type(f, ir->type);
fprintf(f, " ");
ir->sampler->accept(this);
void ir_print_visitor::visit(ir_constant *ir)
{
fprintf(f, "(constant ");
- print_type(f, ir->type);
+ ir_print_type(f, ir->type);
fprintf(f, " (");
if (ir->type->is_array()) {