pan/compiler: Add bound assert on emit_split_i32

This could've saved me a lot of time debugging stack corruption.

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40677>
This commit is contained in:
Lorenzo Rossi 2026-03-27 13:01:21 +01:00 committed by Marge Bot
parent 691cfe40fa
commit 5be2b03b88

View file

@ -200,6 +200,7 @@ bi_cache_collect(bi_builder *b, bi_index dst, bi_index *s, unsigned n)
static void
bi_emit_split_i32(bi_builder *b, bi_index dests[4], bi_index vec, unsigned n)
{
assert(n <= 4);
/* Setup the destinations */
for (unsigned i = 0; i < n; ++i) {
dests[i] = bi_temp(b->shader);