panfrost: Fix size assertion in bi_alu_src_index
authorIcecream95 <ixn@disroot.org>
Wed, 13 Jan 2021 01:13:47 +0000 (14:13 +1300)
committerMarge Bot <eric+marge@anholt.net>
Wed, 13 Jan 2021 03:53:45 +0000 (03:53 +0000)
commit9c8dfe4a65e4ba758e642aa928b993ad4ee2b634
treef2ddff76938d50ce58733ac6b6f6839af4e67318
parent37adeda1ffe6bac79df6961a7dab68d6842f7dfe
panfrost: Fix size assertion in bi_alu_src_index

Shifting by the bitsize was not only wrong, the shift is undefined
behavior when bitsize is 32, causing the assertion to fire on AArch32.

Fixes: 95d62ee7cfa ("pan/bi: Add bi_alu_src_index helper")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8460>
src/panfrost/bifrost/bifrost_compile.c