pan/bi: Round constants to 32-bit

We can only access lo/hi at 32-bit intervals.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
This commit is contained in:
Alyssa Rosenzweig
2020-04-17 15:52:03 -04:00
parent d30df466b5
commit 4d0f941036

View File

@@ -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;
}