aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/bifrost/bir.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-05-01 18:36:51 -0400
committerAlyssa Rosenzweig <[email protected]>2020-05-04 11:08:16 -0400
commit7a9b9859e72fefb0d994be81e7edb42eeaece969 (patch)
tree7007186841f1a0df1274f8bdd964210c7531278d /src/panfrost/bifrost/bir.c
parent8ab5c97895daa86d0ac777b60f31737e491a22f3 (diff)
pan/bi: Handle discard/branch in get_component_count
No dest requires special handling. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4883>
Diffstat (limited to 'src/panfrost/bifrost/bir.c')
-rw-r--r--src/panfrost/bifrost/bir.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/panfrost/bifrost/bir.c b/src/panfrost/bifrost/bir.c
index 923815b1524..5cdbda89bb8 100644
--- a/src/panfrost/bifrost/bir.c
+++ b/src/panfrost/bifrost/bir.c
@@ -96,6 +96,11 @@ bi_from_bytemask(uint16_t bytemask, unsigned bytes)
unsigned
bi_get_component_count(bi_instruction *ins, signed src)
{
+ /* Discards and branches are oddball since they're not BI_VECTOR but no
+ * destination. So special case.. */
+ if (ins->type == BI_DISCARD || ins->type == BI_BRANCH)
+ return 1;
+
if (bi_class_props[ins->type] & BI_VECTOR) {
assert(ins->vector_channels);
return (src <= 0) ? ins->vector_channels : 1;