pan/bi: Don't inline 64-bit constants
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 17 Feb 2021 19:13:30 +0000 (14:13 -0500)
committerMarge Bot <eric+marge@anholt.net>
Thu, 18 Feb 2021 21:48:22 +0000 (21:48 +0000)
Will drop the upper bits incorrectly.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>

src/panfrost/bifrost/compiler.h

index b21acc8..95eb2a6 100644 (file)
@@ -582,7 +582,7 @@ bi_temp_reg(bi_context *ctx)
 static inline bi_index
 bi_src_index(nir_src *src)
 {
-        if (nir_src_is_const(*src))
+        if (nir_src_is_const(*src) && nir_src_bit_size(*src) <= 32)
                 return bi_imm_u32(nir_src_as_uint(*src));
         else if (src->is_ssa)
                 return bi_get_index(src->ssa->index, false, 0);