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: 95d62ee7cf
("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>
This commit is contained in:
parent
37adeda1ff
commit
9c8dfe4a65
|
@ -740,7 +740,7 @@ bi_alu_src_index(nir_alu_src src, unsigned comps)
|
|||
assert(idx.swizzle == BI_SWIZZLE_H01);
|
||||
|
||||
/* Bigger vectors should have been lowered */
|
||||
assert(comps <= (1 << bitsize));
|
||||
assert(comps <= (1 << subword_shift));
|
||||
|
||||
if (bitsize == 16) {
|
||||
unsigned c0 = src.swizzle[0] & 1;
|
||||
|
|
Loading…
Reference in New Issue