diff options
author | Paul Berry <[email protected]> | 2011-06-03 11:23:31 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-06-03 12:48:49 -0600 |
commit | 6491e9593d5cbc5644eb02593a2f562447efdcbb (patch) | |
tree | 5c16dbfc5263e22b0dfea359f7e90d9f5a3b06a1 /src | |
parent | 26b566e19cbfa189a6a158718f21859c0b7ed090 (diff) |
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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/glsl/ir_print_visitor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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(")"); |