diff options
author | Eric Anholt <[email protected]> | 2016-03-15 14:15:51 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2016-05-06 10:25:55 -0700 |
commit | d36b28402f54282aa602d61c89af008100b50799 (patch) | |
tree | 914b36fde9f4d58b8e5703e4b7a126280b31a5c5 /src/gallium/drivers/vc4/vc4_qir.c | |
parent | 419fee92eef229314e28879a7b8a6a8dc3b4b549 (diff) |
vc4: Reuse QPU disasm's cond flags in QIR.
In the process, this made me flatten out the "%s%s%s%s" fprintf arguments.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qir.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_qir.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir.c b/src/gallium/drivers/vc4/vc4_qir.c index 3ba98ca9141..faf5280103e 100644 --- a/src/gallium/drivers/vc4/vc4_qir.c +++ b/src/gallium/drivers/vc4/vc4_qir.c @@ -283,20 +283,11 @@ qir_print_reg(struct vc4_compile *c, struct qreg reg, bool write) void qir_dump_inst(struct vc4_compile *c, struct qinst *inst) { - static const char *conditions[] = { - [QPU_COND_ALWAYS] = "", - [QPU_COND_NEVER] = ".never", - [QPU_COND_ZS] = ".zs", - [QPU_COND_ZC] = ".zc", - [QPU_COND_NS] = ".ns", - [QPU_COND_NC] = ".nc", - [QPU_COND_CS] = ".cs", - [QPU_COND_CC] = ".cc", - }; - fprintf(stderr, "%s%s%s ", - qir_get_op_name(inst->op), - conditions[inst->cond], - inst->sf ? ".sf" : ""); + fprintf(stderr, "%s", qir_get_op_name(inst->op)); + vc4_qpu_disasm_cond(stderr, inst->cond); + if (inst->sf) + fprintf(stderr, ".sf"); + fprintf(stderr, " "); qir_print_reg(c, inst->dst, true); if (inst->dst.pack) { |