aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/bifrost/bir.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/panfrost/bifrost/bir.c')
-rw-r--r--src/panfrost/bifrost/bir.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/panfrost/bifrost/bir.c b/src/panfrost/bifrost/bir.c
index 0f1efcb3388..5fe0ae48409 100644
--- a/src/panfrost/bifrost/bir.c
+++ b/src/panfrost/bifrost/bir.c
@@ -60,3 +60,17 @@ bi_is_src_swizzled(bi_instruction *ins, unsigned s)
return classy && small && first;
}
+
+bool
+bi_has_arg(bi_instruction *ins, unsigned arg)
+{
+ if (!ins)
+ return false;
+
+ bi_foreach_src(ins, s) {
+ if (ins->src[s] == arg)
+ return true;
+ }
+
+ return false;
+}