X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fvc4%2Fvc4_qir.c;h=432fb1bf55569e280d1dd4f06f7b624db1102ad4;hb=d7a0502a5440359d1cecd42e58bdb85c2d857824;hp=69152e79dda15a1fb2c4a6d05bde3c2dfe4b4d87;hpb=44b8eb743d644d2839fad12911fd6330414d22e3;p=mesa.git diff --git a/src/gallium/drivers/vc4/vc4_qir.c b/src/gallium/drivers/vc4/vc4_qir.c index 69152e79dda..432fb1bf555 100644 --- a/src/gallium/drivers/vc4/vc4_qir.c +++ b/src/gallium/drivers/vc4/vc4_qir.c @@ -77,6 +77,7 @@ static const struct qir_op_info qir_op_info[] = { [QOP_VPM_WRITE] = { "vpm_write", 0, 1, true }, [QOP_VPM_READ] = { "vpm_read", 0, 1, true }, [QOP_TLB_DISCARD_SETUP] = { "discard", 0, 1, true }, + [QOP_TLB_STENCIL_SETUP] = { "tlb_stencil_setup", 0, 1, true }, [QOP_TLB_Z_WRITE] = { "tlb_z", 0, 1, true }, [QOP_TLB_COLOR_WRITE] = { "tlb_color", 0, 1, true }, [QOP_TLB_COLOR_READ] = { "tlb_color_read", 1, 0, true }, @@ -85,7 +86,8 @@ static const struct qir_op_info qir_op_info[] = { [QOP_FRAG_X] = { "frag_x", 1, 0 }, [QOP_FRAG_Y] = { "frag_y", 1, 0 }, [QOP_FRAG_Z] = { "frag_z", 1, 0 }, - [QOP_FRAG_RCP_W] = { "frag_rcp_w", 1, 0 }, + [QOP_FRAG_W] = { "frag_w", 1, 0 }, + [QOP_FRAG_REV_FLAG] = { "frag_rev_flag", 1, 0 }, [QOP_TEX_S] = { "tex_s", 0, 2 }, [QOP_TEX_T] = { "tex_t", 0, 2 }, @@ -96,6 +98,10 @@ static const struct qir_op_info qir_op_info[] = { [QOP_R4_UNPACK_B] = { "r4_unpack_b", 1, 1 }, [QOP_R4_UNPACK_C] = { "r4_unpack_c", 1, 1 }, [QOP_R4_UNPACK_D] = { "r4_unpack_d", 1, 1 }, + [QOP_UNPACK_8A] = { "unpack_8a", 1, 1 }, + [QOP_UNPACK_8B] = { "unpack_8b", 1, 1 }, + [QOP_UNPACK_8C] = { "unpack_8c", 1, 1 }, + [QOP_UNPACK_8D] = { "unpack_8d", 1, 1 }, }; static const char * @@ -176,7 +182,7 @@ qir_reads_r4(struct qinst *inst) } static void -qir_print_reg(struct qreg reg) +qir_print_reg(struct vc4_compile *c, struct qreg reg) { const char *files[] = { [QFILE_TEMP] = "t", @@ -188,17 +194,24 @@ qir_print_reg(struct qreg reg) fprintf(stderr, "null"); else fprintf(stderr, "%s%d", files[reg.file], reg.index); + + if (reg.file == QFILE_UNIF && + c->uniform_contents[reg.index] == QUNIFORM_CONSTANT) { + fprintf(stderr, " (0x%08x / %f)", + c->uniform_data[reg.index], + uif(c->uniform_data[reg.index])); + } } void -qir_dump_inst(struct qinst *inst) +qir_dump_inst(struct vc4_compile *c, struct qinst *inst) { fprintf(stderr, "%s ", qir_get_op_name(inst->op)); - qir_print_reg(inst->dst); + qir_print_reg(c, inst->dst); for (int i = 0; i < qir_get_op_nsrc(inst->op); i++) { fprintf(stderr, ", "); - qir_print_reg(inst->src[i]); + qir_print_reg(c, inst->src[i]); } } @@ -209,7 +222,7 @@ qir_dump(struct vc4_compile *c) foreach(node, &c->instructions) { struct qinst *inst = (struct qinst *)node; - qir_dump_inst(inst); + qir_dump_inst(c, inst); fprintf(stderr, "\n"); } }