diff options
author | Eric Anholt <[email protected]> | 2014-12-15 11:19:58 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-12-15 14:33:00 -0800 |
commit | 2142fd1f6f36ef9a384ef298fec02111dc826308 (patch) | |
tree | edb792a5d627d87da3a0638ca7657c4709f1003a /src/gallium/drivers/vc4/vc4_qpu_emit.c | |
parent | 214a169b3268bed63785d3e5953b24022f1beccb (diff) |
vc4: Add support for 8-bit unnormalized vertex attrs.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qpu_emit.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_qpu_emit.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qpu_emit.c b/src/gallium/drivers/vc4/vc4_qpu_emit.c index 8b3a0010d33..f8807276660 100644 --- a/src/gallium/drivers/vc4/vc4_qpu_emit.c +++ b/src/gallium/drivers/vc4/vc4_qpu_emit.c @@ -490,6 +490,27 @@ vc4_generate_code(struct vc4_context *vc4, struct vc4_compile *c) } break; + case QOP_UNPACK_8A_I: + case QOP_UNPACK_8B_I: + case QOP_UNPACK_8C_I: + case QOP_UNPACK_8D_I: + assert(src[0].mux == QPU_MUX_A); + + /* Since we're setting the pack bits, if the + * destination is in A it would get re-packed. + */ + queue(c, qpu_a_MOV((dst.mux == QPU_MUX_A ? + qpu_rb(31) : dst), src[0])); + *last_inst(c) |= QPU_SET_FIELD(QPU_UNPACK_8A + + (qinst->op - + QOP_UNPACK_8A_I), + QPU_UNPACK); + + if (dst.mux == QPU_MUX_A) { + queue(c, qpu_a_MOV(dst, qpu_rb(31))); + } + break; + default: assert(qinst->op < ARRAY_SIZE(translate)); assert(translate[qinst->op].op != 0); /* NOPs */ |