diff options
author | Eric Anholt <[email protected]> | 2016-08-25 12:31:49 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2016-08-25 17:24:11 -0700 |
commit | 8ce65261789f085e657e6a487db93d38ee6bea63 (patch) | |
tree | 960a22a83a2a764907e8c89a7f725b75b7827c97 /src/gallium/drivers/vc4/vc4_qpu.c | |
parent | 074f1f3c0c2cd15213a62eb7f589423ece6391c8 (diff) |
vc4: Add support for MUL output rotation.
Extracted from a patch by jonasarrow on github.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qpu.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_qpu.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qpu.c b/src/gallium/drivers/vc4/vc4_qpu.c index d022d107eb3..67850a8114a 100644 --- a/src/gallium/drivers/vc4/vc4_qpu.c +++ b/src/gallium/drivers/vc4/vc4_qpu.c @@ -234,6 +234,19 @@ qpu_m_alu2(enum qpu_op_mul op, return inst; } +uint64_t +qpu_m_rot(struct qpu_reg dst, struct qpu_reg src0, int rot) +{ + uint64_t inst = 0; + inst = qpu_m_alu2(QPU_M_V8MIN, dst, src0, src0); + + inst = QPU_UPDATE_FIELD(inst, QPU_SIG_SMALL_IMM, QPU_SIG); + inst = QPU_UPDATE_FIELD(inst, QPU_SMALL_IMM_MUL_ROT + rot, + QPU_SMALL_IMM); + + return inst; +} + static bool merge_fields(uint64_t *merge, uint64_t a, uint64_t b, |