From 7e0b868cf31003ada12063398fb91485ed8043dd Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 21 Aug 2015 00:04:36 -0700 Subject: vc4: Reuse QPU dumping for packing bits in QIR. --- src/gallium/drivers/vc4/vc4_qir.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) (limited to 'src/gallium/drivers/vc4/vc4_qir.c') diff --git a/src/gallium/drivers/vc4/vc4_qir.c b/src/gallium/drivers/vc4/vc4_qir.c index 4e0dc385d80..e5efb7cba7e 100644 --- a/src/gallium/drivers/vc4/vc4_qir.c +++ b/src/gallium/drivers/vc4/vc4_qir.c @@ -287,26 +287,11 @@ qir_dump_inst(struct vc4_compile *c, struct qinst *inst) qir_print_reg(c, inst->dst, true); if (inst->dst.pack) { - if (qir_is_mul(inst)) { - switch (inst->dst.pack) { - case QPU_PACK_MUL_8888: - fprintf(stderr, ".8888"); - break; - case QPU_PACK_MUL_8A: - fprintf(stderr, ".8a"); - break; - case QPU_PACK_MUL_8B: - fprintf(stderr, ".8b"); - break; - case QPU_PACK_MUL_8C: - fprintf(stderr, ".8c"); - break; - case QPU_PACK_MUL_8D: - fprintf(stderr, ".8d"); - break; - } - } else { - unreachable("packs only set up for MULs so far.\n"); + if (inst->dst.pack) { + if (qir_is_mul(inst)) + vc4_qpu_disasm_pack_mul(stderr, inst->dst.pack); + else + vc4_qpu_disasm_pack_a(stderr, inst->dst.pack); } } for (int i = 0; i < qir_get_op_nsrc(inst->op); i++) { -- cgit v1.2.3