summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_qpu_disasm.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2014-07-15 12:29:32 -0700
committerEric Anholt <eric@anholt.net>2014-08-11 14:40:45 -0700
commit66c6c401279aa4152a24681f64d0e101aa004593 (patch)
tree8707e885b36cc7a3b522637823eb5dbf83bdd3a2 /src/gallium/drivers/vc4/vc4_qpu_disasm.c
parentd5a6e3dd9b094a427c7842817227db25fbece134 (diff)
downloadexternal_mesa3d-66c6c401279aa4152a24681f64d0e101aa004593.zip
external_mesa3d-66c6c401279aa4152a24681f64d0e101aa004593.tar.gz
external_mesa3d-66c6c401279aa4152a24681f64d0e101aa004593.tar.bz2
vc4: Add support for texturing (under simulation)
Only rgba8888 works, and only a single texture unit, and it's only under simulation because I haven't built the kernel interface yet. v2: Rebase on helpers. v3: Fold in the don't-break-the-arm-build fix.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qpu_disasm.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_qpu_disasm.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qpu_disasm.c b/src/gallium/drivers/vc4/vc4_qpu_disasm.c
index 4ec6d96..5257105 100644
--- a/src/gallium/drivers/vc4/vc4_qpu_disasm.c
+++ b/src/gallium/drivers/vc4/vc4_qpu_disasm.c
@@ -93,6 +93,17 @@ 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",
+};
+
static const char *special_read_a[] = {
"uni",
NULL,
@@ -263,6 +274,7 @@ print_alu_src(uint64_t inst, uint32_t mux)
uint32_t raddr = (is_a ?
QPU_GET_FIELD(inst, QPU_RADDR_A) :
QPU_GET_FIELD(inst, QPU_RADDR_B));
+ uint32_t unpack = QPU_GET_FIELD(inst, QPU_UNPACK);
if (mux <= QPU_MUX_R5)
fprintf(stderr, "r%d", mux);
@@ -287,6 +299,11 @@ print_alu_src(uint64_t inst, uint32_t mux)
else
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));
+ }
}
static void