freedreno/ir3: handle relative addr in ir3_dump
authorRob Clark <robclark@freedesktop.org>
Fri, 2 Jan 2015 14:26:38 +0000 (09:26 -0500)
committerRob Clark <robclark@freedesktop.org>
Thu, 8 Jan 2015 00:37:28 +0000 (19:37 -0500)
Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/ir3/ir3_dump.c

index 136b57f068f288c4c01b8d4cc7fabc0a9ce4cecd..60be64c0e5a7deef93dfad5000166b6f19464f88 100644 (file)
@@ -128,13 +128,20 @@ static void dump_reg_name(struct ir3_dump_ctx *ctx,
                                fprintf(ctx->f, "]");
                        }
                }
+       } else if (reg->flags & IR3_REG_RELATIV) {
+               if (reg->flags & IR3_REG_HALF)
+                       fprintf(ctx->f, "h");
+               if (reg->flags & IR3_REG_CONST)
+                       fprintf(ctx->f, "c<a0.x + %u>", reg->num);
+               else
+                       fprintf(ctx->f, "\x1b[0;31mr<a0.x + %u>\x1b[0m", reg->num);
        } else {
                if (reg->flags & IR3_REG_HALF)
                        fprintf(ctx->f, "h");
                if (reg->flags & IR3_REG_CONST)
                        fprintf(ctx->f, "c%u.%c", reg_num(reg), "xyzw"[reg_comp(reg)]);
                else
-                       fprintf(ctx->f, "r%u.%c", reg_num(reg), "xyzw"[reg_comp(reg)]);
+                       fprintf(ctx->f, "\x1b[0;31mr%u.%c\x1b[0m", reg_num(reg), "xyzw"[reg_comp(reg)]);
        }
 }