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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/panfrost/bifrost/bir.c b/src/panfrost/bifrost/bir.c
index 496a394acfa..5de9d30fe30 100644
--- a/src/panfrost/bifrost/bir.c
+++ b/src/panfrost/bifrost/bir.c
@@ -105,6 +105,16 @@ bi_get_component_count(bi_instruction *ins)
}
}
+unsigned
+bi_load32_components(bi_instruction *ins)
+{
+ unsigned mask = bi_from_bytemask(ins->writemask, 4);
+ unsigned count = util_bitcount(mask);
+ assert(mask == ((1 << count) - 1));
+ assert(count >= 1 && count <= 4);
+ return count;
+}
+
uint16_t
bi_bytemask_of_read_components(bi_instruction *ins, unsigned node)
{