pan/bi: Fix branch condition typesize
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 28 May 2020 16:39:14 +0000 (12:39 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 29 May 2020 20:34:55 +0000 (20:34 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5260>

src/panfrost/bifrost/bifrost_compile.c

index 1e41b53e435e67aea8f7f5352bfd9982edd45ec0..c06fd5916388fc13f00edab1a54af4ed17948634 100644 (file)
@@ -1048,7 +1048,8 @@ bi_set_branch_cond(bi_instruction *branch, nir_src *cond, bool invert)
         /* TODO: Try to unwrap instead of always bailing */
         branch->src[0] = pan_src_index(cond);
         branch->src[1] = BIR_INDEX_ZERO;
-        branch->src_types[0] = branch->src_types[1] = nir_type_uint16;
+        branch->src_types[0] = branch->src_types[1] = nir_type_uint |
+                nir_src_bit_size(*cond);
         branch->cond = invert ? BI_COND_EQ : BI_COND_NE;
 }