aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl')
-rw-r--r--mesalib/src/glsl/glsl_parser_extras.cpp2
-rw-r--r--mesalib/src/glsl/ir_print_visitor.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/mesalib/src/glsl/glsl_parser_extras.cpp b/mesalib/src/glsl/glsl_parser_extras.cpp
index fce2faa75..d9aa300bb 100644
--- a/mesalib/src/glsl/glsl_parser_extras.cpp
+++ b/mesalib/src/glsl/glsl_parser_extras.cpp
@@ -436,7 +436,7 @@ ast_expression::print(void) const
printf("? ");
subexpressions[1]->print();
printf(": ");
- subexpressions[1]->print();
+ subexpressions[2]->print();
break;
case ast_array_index:
diff --git a/mesalib/src/glsl/ir_print_visitor.cpp b/mesalib/src/glsl/ir_print_visitor.cpp
index 02f3d8149..5b5409daa 100644
--- a/mesalib/src/glsl/ir_print_visitor.cpp
+++ b/mesalib/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(")");