pan/bi: Fix out-of-bounds write in va_lower_split_64bit

...with dual source blending. Fixes shaders/dolphin/smg.1.shader_test

There are more IR sources than Valhall machine sources here.

Fixes: b48933d641 ("pan/va: Include BLEND for va_swap_12")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17794>
This commit is contained in:
Alyssa Rosenzweig
2022-08-31 16:54:02 -04:00
committed by Marge Bot
parent b66282d443
commit b5a6375f54

View File

@@ -67,7 +67,7 @@ va_lower_split_64bit(bi_context *ctx)
{
bi_foreach_instr_global(ctx, I) {
bi_foreach_src(I, s) {
if (bi_is_null(I->src[s]))
if (bi_is_null(I->src[s]) || s >= 4)
continue;
struct va_src_info info = va_src_info(I->op, s);