[Mesa-dev] [PATCH] IR dump: fixed printing of structure constants.
Brian Paul
brianp at vmware.com
Fri Jun 3 11:49:27 PDT 2011
On 06/03/2011 12:23 PM, Paul Berry wrote:
> 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.
> ---
> 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 02f3d81..5b5409d 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(")");
>
Committed. Thanks.
-Brian
More information about the mesa-dev
mailing list