aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-04-17 15:52:03 -0400
committerAlyssa Rosenzweig <[email protected]>2020-04-17 16:25:36 -0400
commit4d0f94103618a7f351774a2fb3208c8aefe1f315 (patch)
tree6ba428eb344feb2682fbdf0d5c4c82ca7ebd6f20 /src/panfrost
parentd30df466b57771ab5b28dadf6e113f46222e1b92 (diff)
pan/bi: Round constants to 32-bit
We can only access lo/hi at 32-bit intervals. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Diffstat (limited to 'src/panfrost')
-rw-r--r--src/panfrost/bifrost/bifrost_compile.c2
1 files changed, 1 insertions, 1 deletions
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;
}