summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_qpu_disasm.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-08-22 14:16:19 -0700
committerEric Anholt <[email protected]>2014-09-23 13:40:10 -0700
commitb7edf30191cae945b4836d683762d0ebed6efbfe (patch)
treea34f70efde9b3678e88bb8ef4aa0f070e350de28 /src/gallium/drivers/vc4/vc4_qpu_disasm.c
parent71e5ba9c011939c962018af7f3ca78b600c95148 (diff)
vc4: Add disasm for A-file unpack operations.
The A-file unpack is just like R4 unpack, except that if you don't do a floating-point operation it won't do float conversion (so int16 gets scaled up to int32).
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qpu_disasm.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_qpu_disasm.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qpu_disasm.c b/src/gallium/drivers/vc4/vc4_qpu_disasm.c
index 525710585ae..403a18e6531 100644
--- a/src/gallium/drivers/vc4/vc4_qpu_disasm.c
+++ b/src/gallium/drivers/vc4/vc4_qpu_disasm.c
@@ -93,15 +93,18 @@ static const char *qpu_pack_mul[] = {
[QPU_PACK_MUL_8D] = "8d",
};
-static const char *qpu_unpack_r4[] = {
- [QPU_UNPACK_R4_NOP] = "",
- [QPU_UNPACK_R4_F16A_TO_F32] = "f16a",
- [QPU_UNPACK_R4_F16B_TO_F32] = "f16b",
- [QPU_UNPACK_R4_8D_REP] = "8d_rep",
- [QPU_UNPACK_R4_8A] = "8a",
- [QPU_UNPACK_R4_8B] = "8b",
- [QPU_UNPACK_R4_8C] = "8c",
- [QPU_UNPACK_R4_8D] = "8d",
+/* The QPU unpack for A and R4 files can be described the same, it's just that
+ * the R4 variants are convert-to-float only, with no int support.
+ */
+static const char *qpu_unpack[] = {
+ [QPU_UNPACK_NOP] = "",
+ [QPU_UNPACK_F16A_TO_F32] = "f16a",
+ [QPU_UNPACK_F16B_TO_F32] = "f16b",
+ [QPU_UNPACK_8D_REP] = "8d_rep",
+ [QPU_UNPACK_8A] = "8a",
+ [QPU_UNPACK_8B] = "8b",
+ [QPU_UNPACK_8C] = "8c",
+ [QPU_UNPACK_8D] = "8d",
};
static const char *special_read_a[] = {
@@ -300,9 +303,10 @@ print_alu_src(uint64_t inst, uint32_t mux)
fprintf(stderr, "%s", DESC(special_read_b, raddr - 32));
}
- if (mux == QPU_MUX_R4 && (inst & QPU_PM) &&
- unpack != QPU_UNPACK_R4_NOP) {
- fprintf(stderr, ".%s", DESC(qpu_unpack_r4, unpack));
+ if (unpack != QPU_UNPACK_NOP &&
+ ((mux == QPU_MUX_A && !(inst & QPU_PM)) ||
+ (mux == QPU_MUX_R4) && (inst & QPU_PM))) {
+ fprintf(stderr, ".%s", DESC(qpu_unpack, unpack));
}
}