aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2015-10-24 17:33:30 -0700
committerEric Anholt <[email protected]>2015-10-26 16:48:34 -0700
commit0ccacfa0170f19e08228e7404e77a9da8f5f633c (patch)
treee0035b4b1c340e0d2f0722f20748e44fff5eddbe /src
parent8034e7d6f1be3c9c1a9626b64830617ccf000ecc (diff)
vc4: If a QIR source has an unpack set, print it.
Not used yet, but will be.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/vc4/vc4_qir.c1
-rw-r--r--src/gallium/drivers/vc4/vc4_qpu.h3
-rw-r--r--src/gallium/drivers/vc4/vc4_qpu_disasm.c12
3 files changed, 13 insertions, 3 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir.c b/src/gallium/drivers/vc4/vc4_qir.c
index 3d3989fa95d..d9f51bb4a3f 100644
--- a/src/gallium/drivers/vc4/vc4_qir.c
+++ b/src/gallium/drivers/vc4/vc4_qir.c
@@ -313,6 +313,7 @@ qir_dump_inst(struct vc4_compile *c, struct qinst *inst)
for (int i = 0; i < qir_get_op_nsrc(inst->op); i++) {
fprintf(stderr, ", ");
qir_print_reg(c, inst->src[i], false);
+ vc4_qpu_disasm_unpack(stderr, inst->src[i].pack);
}
}
diff --git a/src/gallium/drivers/vc4/vc4_qpu.h b/src/gallium/drivers/vc4/vc4_qpu.h
index 0719d2828b5..866ca5c1300 100644
--- a/src/gallium/drivers/vc4/vc4_qpu.h
+++ b/src/gallium/drivers/vc4/vc4_qpu.h
@@ -213,6 +213,9 @@ void
vc4_qpu_disasm_pack_a(FILE *out, uint32_t pack);
void
+vc4_qpu_disasm_unpack(FILE *out, uint32_t pack);
+
+void
vc4_qpu_validate(uint64_t *insts, uint32_t num_inst);
#endif /* VC4_QPU_H */
diff --git a/src/gallium/drivers/vc4/vc4_qpu_disasm.c b/src/gallium/drivers/vc4/vc4_qpu_disasm.c
index a854db219ff..c46fd1a0e3f 100644
--- a/src/gallium/drivers/vc4/vc4_qpu_disasm.c
+++ b/src/gallium/drivers/vc4/vc4_qpu_disasm.c
@@ -257,6 +257,13 @@ vc4_qpu_disasm_pack_a(FILE *out, uint32_t pack)
fprintf(out, "%s", DESC(qpu_pack_a, pack));
}
+void
+vc4_qpu_disasm_unpack(FILE *out, uint32_t unpack)
+{
+ if (unpack != QPU_UNPACK_NOP)
+ fprintf(out, ".%s", DESC(qpu_unpack, unpack));
+}
+
static void
print_alu_dst(uint64_t inst, bool is_mul)
{
@@ -315,10 +322,9 @@ print_alu_src(uint64_t inst, uint32_t mux)
fprintf(stderr, "%s", DESC(special_read_b, raddr - 32));
}
- if (unpack != QPU_UNPACK_NOP &&
- ((mux == QPU_MUX_A && !(inst & QPU_PM)) ||
+ if (((mux == QPU_MUX_A && !(inst & QPU_PM)) ||
(mux == QPU_MUX_R4 && (inst & QPU_PM)))) {
- fprintf(stderr, ".%s", DESC(qpu_unpack, unpack));
+ vc4_qpu_disasm_unpack(stderr, unpack);
}
}