diff options
author | Christoph Bumiller <[email protected]> | 2010-12-19 21:46:33 +0100 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2010-12-19 21:46:33 +0100 |
commit | 0f68236a2487dbeb0396b996debcda595b0b54a1 (patch) | |
tree | 938ae3b779349b6dba6f5a891550604f9a9ca895 /src/glsl/ir_print_visitor.cpp | |
parent | d047168d81cfeb39a98f3ae16416872facc6237c (diff) | |
parent | 237880463d5168cad8df0bae6018b5fd76617777 (diff) |
Merge remote branch 'origin/master' into nvc0-new
Diffstat (limited to 'src/glsl/ir_print_visitor.cpp')
-rw-r--r-- | src/glsl/ir_print_visitor.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp index 5c19db13260..0aa0b0a5d32 100644 --- a/src/glsl/ir_print_visitor.cpp +++ b/src/glsl/ir_print_visitor.cpp @@ -153,17 +153,10 @@ void ir_print_visitor::visit(ir_function_signature *ir) void ir_print_visitor::visit(ir_function *ir) { - if (!ir->has_user_signature()) - return; - printf("(function %s\n", ir->name); indentation++; foreach_iter(exec_list_iterator, iter, *ir) { ir_function_signature *const sig = (ir_function_signature *) iter.get(); - - if (sig->is_builtin) - continue; - indent(); sig->accept(this); printf("\n"); @@ -182,11 +175,10 @@ void ir_print_visitor::visit(ir_expression *ir) printf(" %s ", ir->operator_string()); - if (ir->operands[0]) - ir->operands[0]->accept(this); + for (unsigned i = 0; i < ir->get_num_operands(); i++) { + ir->operands[i]->accept(this); + } - if (ir->operands[1]) - ir->operands[1]->accept(this); printf(") "); } @@ -326,6 +318,15 @@ void ir_print_visitor::visit(ir_constant *ir) if (ir->type->is_array()) { for (unsigned i = 0; i < ir->type->length; i++) ir->get_array_element(i)->accept(this); + } else if (ir->type->is_record()) { + ir_constant *value = (ir_constant *) ir->components.get_head(); + for (unsigned i = 0; i < ir->type->length; i++) { + printf("(%s ", ir->type->fields.structure->name); + value->accept(this); + printf(")"); + + value = (ir_constant *) value->next; + } } else { for (unsigned i = 0; i < ir->type->components(); i++) { if (i != 0) |