From: Alyssa Rosenzweig Date: Tue, 14 Apr 2020 22:36:28 +0000 (-0400) Subject: pan/bi: Fix packing with low-nibble-set on hi constant X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=60f252708fc7d0ad9b844c55b659e9fd3d6b5607;p=mesa.git pan/bi: Fix packing with low-nibble-set on hi constant Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/bifrost/bi_pack.c b/src/panfrost/bifrost/bi_pack.c index f53effc7275..edeb050aae1 100644 --- a/src/panfrost/bifrost/bi_pack.c +++ b/src/panfrost/bifrost/bi_pack.c @@ -115,13 +115,15 @@ bi_lookup_constant(bi_clause *clause, uint64_t cons, bool *hi, bool b64) /* Only check top 60-bits since that's what's actually embedded * in the clause, the bottom 4-bits are bundle-inline */ - unsigned candidates[2] = { + uint64_t candidates[2] = { clause->constants[i] >> 4, clause->constants[i] >> 36 }; + /* For <64-bit mode, we treat lo/hi separately */ + if (!b64) - candidates[0] &= 0xFFFFFFFF; + candidates[0] &= (0xFFFFFFFF >> 4); if (candidates[0] == want) return i;