From 66100895ff0132b21108f4650401748e8532e51a Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 5 Feb 2021 18:17:06 -0500 Subject: [PATCH] pan/bi: Derive M0 from pcrel_idx while packing Assumes the usual M1=4 mode. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Boris Brezillon Part-of: --- src/panfrost/bifrost/bi_pack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panfrost/bifrost/bi_pack.c b/src/panfrost/bifrost/bi_pack.c index d37e2aeb826..df3f09030fb 100644 --- a/src/panfrost/bifrost/bi_pack.c +++ b/src/panfrost/bifrost/bi_pack.c @@ -821,7 +821,7 @@ bi_pack_clause(bi_context *ctx, bi_clause *clause, uint64_t header = bi_pack_header(clause, next_1, next_2, tdd); uint64_t ec0 = (clause->constants[0] >> 4); - unsigned m0 = 0; /* TODO: set me so we don't break branches */ + unsigned m0 = (clause->pcrel_idx == 0) ? 4 : 0; unsigned counts[8] = { 1, 2, 3, 3, 4, 5, 5, 6