glsl: fixed printing of structure constants.

ir_print_visitor::visit(ir_constant *) was failing to index properly
into ir->type->fields.structure, so the first field name was being
reprinted for every field in the structure.

Signed-off-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Paul Berry 2011-06-03 11:23:31 -07:00 committed by Brian Paul
parent 26b566e19c
commit 6491e9593d
1 changed files with 1 additions and 1 deletions

View File

@ -370,7 +370,7 @@ void ir_print_visitor::visit(ir_constant *ir)
} 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);
printf("(%s ", ir->type->fields.structure[i].name);
value->accept(this);
printf(")");