pan/bi: Assert that vectors are sufficiently small
There is a limit to how vector widths (eg due to RA), larger vectors should be broken up in NIR so we shouldn't ever see such vectors. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17220>
This commit is contained in:

committed by
Marge Bot

parent
a68bed798c
commit
2ded490913
@@ -655,6 +655,9 @@ bi_make_vec_to(bi_builder *b, bi_index dst,
|
||||
unsigned shift = (bitsize == 32) ? 0 : (bitsize == 16) ? 1 : 2;
|
||||
unsigned chan_per_word = 1 << shift;
|
||||
|
||||
assert(DIV_ROUND_UP(count * bitsize, 32) <= BI_MAX_SRCS &&
|
||||
"unnecessarily large vector should have been lowered");
|
||||
|
||||
bi_index srcs[BI_MAX_VEC];
|
||||
|
||||
for (unsigned i = 0; i < count; i += chan_per_word) {
|
||||
|
Reference in New Issue
Block a user