From 6491e9593d5cbc5644eb02593a2f562447efdcbb Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Fri, 3 Jun 2011 11:23:31 -0700 Subject: [PATCH] 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 --- src/glsl/ir_print_visitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp index 02f3d814926..5b5409daa22 100644 --- a/src/glsl/ir_print_visitor.cpp +++ b/src/glsl/ir_print_visitor.cpp @@ -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(")"); -- 2.30.2