summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2011-06-03 11:23:31 -0700
committerBrian Paul <[email protected]>2011-06-03 12:48:49 -0600
commit6491e9593d5cbc5644eb02593a2f562447efdcbb (patch)
tree5c16dbfc5263e22b0dfea359f7e90d9f5a3b06a1 /src
parent26b566e19cbfa189a6a158718f21859c0b7ed090 (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.cpp2
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(")");