[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 },
[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 },
[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 *
qir_has_side_effects(struct qinst *inst)
{
for (int i = 0; i < qir_get_op_nsrc(inst->op); i++) {
- if (inst->src[i].file == QFILE_VARY ||
- inst->src[i].file == QFILE_UNIF)
+ if (inst->src[i].file == QFILE_VARY)
return true;
}
}
static void
-qir_print_reg(struct qreg reg)
+qir_print_reg(struct vc4_compile *c, struct qreg reg)
{
const char *files[] = {
[QFILE_TEMP] = "t",
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]);
}
}
foreach(node, &c->instructions) {
struct qinst *inst = (struct qinst *)node;
- qir_dump_inst(inst);
+ qir_dump_inst(c, inst);
fprintf(stderr, "\n");
}
}