glsl/build: Build libglcpp and libglslcore in builtin_compiler
[mesa.git] / src / glsl / ir_print_visitor.cpp
index b713bd03ba0d10afdebf0bc55cf0b39cf8bd8313..8aa26e5d018f4239e8e44154bf92e41c80679b41 100644 (file)
@@ -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();