Mesa (main): pan/bi: Adapt branching for 1-bit bools

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu May 6 23:43:27 UTC 2021


Module: Mesa
Branch: main
Commit: 7793c9ab024e9a97e36bd7b126ca8ca7d3e195c9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7793c9ab024e9a97e36bd7b126ca8ca7d3e195c9

Author: Alyssa Rosenzweig <alyssa at rosenzweig.io>
Date:   Wed May  5 12:51:30 2021 -0400

pan/bi: Adapt branching for 1-bit bools

Signed-off-by: Alyssa Rosenzweig <alyssa at rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9239>

---

 src/panfrost/bifrost/bifrost_compile.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index dffc75aedd9..10800c3c23f 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -2670,8 +2670,9 @@ emit_if(bi_context *ctx, nir_if *nif)
 
         /* Speculatively emit the branch, but we can't fill it in until later */
         bi_builder _b = bi_init_builder(ctx, bi_after_block(ctx->current_block));
-        bi_instr *then_branch = bi_branchz_i32(&_b,
-                        bi_src_index(&nif->condition), bi_zero(), BI_CMPF_EQ);
+        bi_instr *then_branch = bi_branchz_i16(&_b,
+                        bi_half(bi_src_index(&nif->condition), false),
+                        bi_zero(), BI_CMPF_EQ);
 
         /* Emit the two subblocks. */
         bi_block *then_block = emit_cf_list(ctx, &nif->then_list);



More information about the mesa-commit mailing list