projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vc4: Add support for the FACE semantic.
[mesa.git]
/
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 69152e79dda15a1fb2c4a6d05bde3c2dfe4b4d87..432fb1bf55569e280d1dd4f06f7b624db1102ad4 100644
(file)
--- 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_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_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_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_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_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 *
};
static const char *
@@
-176,7
+182,7
@@
qir_reads_r4(struct qinst *inst)
}
static void
}
static void
-qir_print_reg(struct qreg reg)
+qir_print_reg(struct
vc4_compile *c, struct
qreg reg)
{
const char *files[] = {
[QFILE_TEMP] = "t",
{
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);
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
}
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));
{
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, ", ");
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;
foreach(node, &c->instructions) {
struct qinst *inst = (struct qinst *)node;
- qir_dump_inst(inst);
+ qir_dump_inst(
c,
inst);
fprintf(stderr, "\n");
}
}
fprintf(stderr, "\n");
}
}