From 6ff2129d5842898eb87d2a457ee018fe66471f06 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 16 Jul 2014 09:08:48 -0700 Subject: vc4: Add support for the lit opcode. v2: Fix how it was using the X channel for the real work of the opcode, instead of Y. Fixes glean's LIT test. v3: Rebase on the helpers. --- src/gallium/drivers/vc4/vc4_qir.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/gallium/drivers/vc4/vc4_qir.h') diff --git a/src/gallium/drivers/vc4/vc4_qir.h b/src/gallium/drivers/vc4/vc4_qir.h index 5332478039a..ff222e4aeff 100644 --- a/src/gallium/drivers/vc4/vc4_qir.h +++ b/src/gallium/drivers/vc4/vc4_qir.h @@ -198,4 +198,12 @@ qir_VPM_WRITE(struct qcompile *c, struct qreg a) qir_emit(c, qir_inst(QOP_VPM_WRITE, c->undef, a, c->undef)); } +static inline struct qreg +qir_CMP(struct qcompile *c, struct qreg cmp, struct qreg a, struct qreg b) +{ + struct qreg t = qir_get_temp(c); + qir_emit(c, qir_inst4(QOP_CMP, t, cmp, a, b, c->undef)); + return t; +} + #endif /* VC4_QIR_H */ -- cgit v1.2.3