summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_qir.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-07-16 09:08:48 -0700
committerEric Anholt <[email protected]>2014-08-08 18:59:47 -0700
commit6ff2129d5842898eb87d2a457ee018fe66471f06 (patch)
tree0fedcae3e82d9623aa5c9ddf12ac0158e7d62fdd /src/gallium/drivers/vc4/vc4_qir.h
parent63e49da0a58d6579162f12b4c8e68696eeb6c833 (diff)
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.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qir.h')
-rw-r--r--src/gallium/drivers/vc4/vc4_qir.h8
1 files changed, 8 insertions, 0 deletions
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 */