Print full type for ir_constant instead of base and component count.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 7 Apr 2010 21:40:44 +0000 (14:40 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 28 Apr 2010 22:34:52 +0000 (15:34 -0700)
vec4 and mat2x2 have the same base type and number of components;
printing the full type allows us to distinguish the two.

ir_print_visitor.cpp

index 8f917e48b228cab023e7fccf16b00f55623bc8e9..99dbacca11231a08176960cbeb71a027baf53ebb 100644 (file)
@@ -238,10 +238,9 @@ void ir_print_visitor::visit(ir_constant *ir)
    const glsl_type *const base_type = ir->type->get_base_type();
 
    printf("(constant (");
-   print_type(base_type);
-   printf(") ");
+   print_type(ir->type);
+   printf(") (");
 
-   printf("(%d) (", ir->type->components());
    for (unsigned i = 0; i < ir->type->components(); i++) {
       if (i != 0)
         printf(", ");