From: Paul Berry Date: Fri, 3 Jun 2011 18:23:31 +0000 (-0700) Subject: glsl: fixed printing of structure constants. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6491e9593d5cbc5644eb02593a2f562447efdcbb;p=mesa.git 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 --- 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(")");