aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-05-28 12:39:14 -0400
committerMarge Bot <[email protected]>2020-05-29 20:34:55 +0000
commitd619ff009b57e6949e88b9a607cc8f089d6d7ad2 (patch)
treec99f5daa6bba324606145e1f4e6e25a984654505
parent1cdd55a81ea14df39608ef38bd6acb77369f9de1 (diff)
pan/bi: Fix branch condition typesize
Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5260>
-rw-r--r--src/panfrost/bifrost/bifrost_compile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index 1e41b53e435..c06fd591638 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -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;
}