summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_qir.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2015-10-26 13:45:06 -0700
committerEric Anholt <eric@anholt.net>2015-10-26 16:48:34 -0700
commit01ca4f207efac555ff5f729dce1687a68ba65400 (patch)
treee00fa2467114a98ef07516a28875d2fd947f3c6e /src/gallium/drivers/vc4/vc4_qir.c
parent72fa2ae20b979ced1b4dde16f81b28d02a2e3b7b (diff)
downloadexternal_mesa3d-01ca4f207efac555ff5f729dce1687a68ba65400.zip
external_mesa3d-01ca4f207efac555ff5f729dce1687a68ba65400.tar.gz
external_mesa3d-01ca4f207efac555ff5f729dce1687a68ba65400.tar.bz2
vc4: Rewrite the pack instructions as a MOV with a dst pack flag
Another step in reducing the special-casing of instructions.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qir.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_qir.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir.c b/src/gallium/drivers/vc4/vc4_qir.c
index bba4f6d..7894b08 100644
--- a/src/gallium/drivers/vc4/vc4_qir.c
+++ b/src/gallium/drivers/vc4/vc4_qir.c
@@ -37,6 +37,7 @@ struct qir_op_info {
static const struct qir_op_info qir_op_info[] = {
[QOP_MOV] = { "mov", 1, 1 },
[QOP_FMOV] = { "fmov", 1, 1 },
+ [QOP_MMOV] = { "mmov", 1, 1 },
[QOP_FADD] = { "fadd", 1, 2 },
[QOP_FSUB] = { "fsub", 1, 2 },
[QOP_FMUL] = { "fmul", 1, 2 },
@@ -77,11 +78,6 @@ static const struct qir_op_info qir_op_info[] = {
[QOP_RSQ] = { "rsq", 1, 1, false, true },
[QOP_EXP2] = { "exp2", 1, 2, false, true },
[QOP_LOG2] = { "log2", 1, 2, false, true },
- [QOP_PACK_8888_F] = { "pack_8888_f", 1, 1 },
- [QOP_PACK_8A_F] = { "pack_8a_f", 1, 1 },
- [QOP_PACK_8B_F] = { "pack_8b_f", 1, 1 },
- [QOP_PACK_8C_F] = { "pack_8c_f", 1, 1 },
- [QOP_PACK_8D_F] = { "pack_8d_f", 1, 1 },
[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 },
@@ -165,6 +161,7 @@ bool
qir_is_mul(struct qinst *inst)
{
switch (inst->op) {
+ case QOP_MMOV:
case QOP_FMUL:
case QOP_MUL24:
case QOP_V8MULD:
@@ -201,7 +198,8 @@ bool
qir_is_raw_mov(struct qinst *inst)
{
return ((inst->op == QOP_MOV ||
- inst->op == QOP_FMOV) &&
+ inst->op == QOP_FMOV ||
+ inst->op == QOP_MMOV) &&
!inst->dst.pack &&
!inst->src[0].pack);
}