ir_print_visitor: Print out constant arrays.
This commit is contained in:
@@ -270,10 +270,13 @@ void ir_print_visitor::visit(ir_constant *ir)
|
|||||||
print_type(ir->type);
|
print_type(ir->type);
|
||||||
printf(" (");
|
printf(" (");
|
||||||
|
|
||||||
|
if (ir->type->is_array()) {
|
||||||
|
for (unsigned i = 0; i < ir->type->length; i++)
|
||||||
|
ir->get_array_element(i)->accept(this);
|
||||||
|
} else {
|
||||||
for (unsigned i = 0; i < ir->type->components(); i++) {
|
for (unsigned i = 0; i < ir->type->components(); i++) {
|
||||||
if (i != 0)
|
if (i != 0)
|
||||||
printf(" ");
|
printf(" ");
|
||||||
|
|
||||||
switch (base_type->base_type) {
|
switch (base_type->base_type) {
|
||||||
case GLSL_TYPE_UINT: printf("%u", ir->value.u[i]); break;
|
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_INT: printf("%d", ir->value.i[i]); break;
|
||||||
@@ -282,6 +285,7 @@ void ir_print_visitor::visit(ir_constant *ir)
|
|||||||
default: assert(0);
|
default: assert(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
printf(")) ");
|
printf(")) ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user