From e5b3faf5aa20c948d463b81c61b9f47775ccffad Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 21 Jul 2022 15:01:16 -0400 Subject: [PATCH] pan/bi: Assert destinations are non-NULL All uses of null destinations have been replaced with more appropriate constructs. We can now assume this throughout. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bi_validate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/panfrost/bifrost/bi_validate.c b/src/panfrost/bifrost/bi_validate.c index 8e7c077ada7..b0c1cb02b4f 100644 --- a/src/panfrost/bifrost/bi_validate.c +++ b/src/panfrost/bifrost/bi_validate.c @@ -171,8 +171,8 @@ bi_validate_src_dest_count(bi_context *ctx) } } - for (unsigned d = I->nr_dests; d < ARRAY_SIZE(I->dest); ++d) { - if (!bi_is_null(I->dest[d])) { + for (unsigned d = 0; d < ARRAY_SIZE(I->dest); ++d) { + if ((d < I->nr_dests) == bi_is_null(I->dest[d])) { succ = false; fprintf(stderr, "unexpected dest %u, expected %u sources\n",