From 4d0f94103618a7f351774a2fb3208c8aefe1f315 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 17 Apr 2020 15:52:03 -0400 Subject: [PATCH] pan/bi: Round constants to 32-bit We can only access lo/hi at 32-bit intervals. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bifrost_compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index 9671a485c2a..339035f40d2 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -497,7 +497,7 @@ bi_copy_src(bi_instruction *alu, nir_alu_instr *instr, unsigned i, unsigned to, alu->constant.u64 |= cons << *constant_shift; alu->src[to] = BIR_INDEX_CONSTANT | (*constant_shift); --(*constants_left); - (*constant_shift) += dest_bits; + (*constant_shift) += MAX2(dest_bits, 32); /* lo/hi */ return; } -- 2.30.2