X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglsl%2Fir_print_visitor.cpp;h=8aa26e5d018f4239e8e44154bf92e41c80679b41;hb=0d108116bd80b757fb01a84a9f1946ef870b57b8;hp=b713bd03ba0d10afdebf0bc55cf0b39cf8bd8313;hpb=bbbb8345ab9df2d634dc2a34d257ee2cbf930292;p=mesa.git diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp index b713bd03ba0..8aa26e5d018 100644 --- a/src/glsl/ir_print_visitor.cpp +++ b/src/glsl/ir_print_visitor.cpp @@ -135,6 +135,10 @@ print_type(const glsl_type *t) } } +void ir_print_visitor::visit(ir_rvalue *ir) +{ + printf("error"); +} void ir_print_visitor::visit(ir_variable *ir) { @@ -368,8 +372,6 @@ void ir_print_visitor::visit(ir_assignment *ir) void ir_print_visitor::visit(ir_constant *ir) { - const glsl_type *const base_type = ir->type->get_base_type(); - printf("(constant "); print_type(ir->type); printf(" ("); @@ -390,7 +392,7 @@ void ir_print_visitor::visit(ir_constant *ir) for (unsigned i = 0; i < ir->type->components(); i++) { if (i != 0) printf(" "); - switch (base_type->base_type) { + switch (ir->type->base_type) { case GLSL_TYPE_UINT: printf("%u", ir->value.u[i]); break; case GLSL_TYPE_INT: printf("%d", ir->value.i[i]); break; case GLSL_TYPE_FLOAT: printf("%f", ir->value.f[i]); break; @@ -406,7 +408,10 @@ void ir_print_visitor::visit(ir_constant *ir) void ir_print_visitor::visit(ir_call *ir) { - printf("(call %s (", ir->callee_name()); + printf("(call %s ", ir->callee_name()); + if (ir->return_deref) + ir->return_deref->accept(this); + printf(" ("); foreach_iter(exec_list_iterator, iter, *ir) { ir_instruction *const inst = (ir_instruction *) iter.get();