Mesa (master): vc4: Dump the VPM read index in QIR disasm.
Eric Anholt
anholt at kemper.freedesktop.org
Sun Feb 1 20:58:08 UTC 2015
Module: Mesa
Branch: master
Commit: 12ebd7e20e0d9448128854f9435f7d02889ae3e9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=12ebd7e20e0d9448128854f9435f7d02889ae3e9
Author: Eric Anholt <eric at anholt.net>
Date: Fri Jan 30 11:23:26 2015 -0800
vc4: Dump the VPM read index in QIR disasm.
Since the VPM reads have to be in order, it's useful to see their indices
in the dump.
---
src/gallium/drivers/vc4/vc4_qir.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/vc4/vc4_qir.c b/src/gallium/drivers/vc4/vc4_qir.c
index ed20b56..feb585d 100644
--- a/src/gallium/drivers/vc4/vc4_qir.c
+++ b/src/gallium/drivers/vc4/vc4_qir.c
@@ -245,7 +245,7 @@ qir_reads_r4(struct qinst *inst)
}
static void
-qir_print_reg(struct vc4_compile *c, struct qreg reg)
+qir_print_reg(struct vc4_compile *c, struct qreg reg, bool write)
{
static const char *files[] = {
[QFILE_TEMP] = "t",
@@ -261,7 +261,12 @@ qir_print_reg(struct vc4_compile *c, struct qreg reg)
else
fprintf(stderr, "%f", uif(reg.index));
} else if (reg.file == QFILE_VPM) {
- fprintf(stderr, "vpm");
+ if (write) {
+ fprintf(stderr, "vpm");
+ } else {
+ fprintf(stderr, "vpm%d.%d",
+ reg.index / 4, reg.index % 4);
+ }
} else {
fprintf(stderr, "%s%d", files[reg.file], reg.index);
}
@@ -279,10 +284,10 @@ qir_dump_inst(struct vc4_compile *c, struct qinst *inst)
{
fprintf(stderr, "%s ", qir_get_op_name(inst->op));
- qir_print_reg(c, inst->dst);
+ qir_print_reg(c, inst->dst, true);
for (int i = 0; i < qir_get_op_nsrc(inst->op); i++) {
fprintf(stderr, ", ");
- qir_print_reg(c, inst->src[i]);
+ qir_print_reg(c, inst->src[i], false);
}
}
More information about the mesa-commit
mailing list