summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_qir.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2015-08-18 21:43:42 -0700
committerEric Anholt <[email protected]>2015-08-20 23:42:59 -0700
commit572a48366d9dfac6a7f9ee8f4d29832c496125e2 (patch)
treef53b42e7dde9e9a878da36ef97b122d08d637f23 /src/gallium/drivers/vc4/vc4_qir.c
parentfd74da11c48dcd9098d4f64508aae65775c68b75 (diff)
vc4: Add a QIR helper for whether the op is a MUL type.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qir.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_qir.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir.c b/src/gallium/drivers/vc4/vc4_qir.c
index a7b4bd63706..f27b2d2d949 100644
--- a/src/gallium/drivers/vc4/vc4_qir.c
+++ b/src/gallium/drivers/vc4/vc4_qir.c
@@ -170,6 +170,18 @@ qir_is_multi_instruction(struct qinst *inst)
}
bool
+qir_is_mul(struct qinst *inst)
+{
+ switch (inst->op) {
+ case QOP_FMUL:
+ case QOP_MUL24:
+ return true;
+ default:
+ return false;
+ }
+}
+
+bool
qir_is_tex(struct qinst *inst)
{
return inst->op >= QOP_TEX_S && inst->op <= QOP_TEX_DIRECT;