From 8caddd2ca1a967104556ea692cd33f6c9173773c Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 29 Nov 2024 11:41:38 -0500 Subject: [PATCH] asahi: fix agx_batch_add_bo when we have exactly POT BOs. fixes crash in portal 2. oh lord. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/asahi/agx_state.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/asahi/agx_state.h b/src/gallium/drivers/asahi/agx_state.h index 912a235c461..1a70ab79261 100644 --- a/src/gallium/drivers/asahi/agx_state.h +++ b/src/gallium/drivers/asahi/agx_state.h @@ -1051,7 +1051,7 @@ static inline void agx_batch_add_bo_internal(struct agx_batch *batch, struct agx_bo *bo) { /* Double the size of the BO list if we run out, this is amortized O(1) */ - if (unlikely(bo->handle > batch->bo_list.bit_count)) { + if (unlikely(bo->handle >= batch->bo_list.bit_count)) { const unsigned bits_per_word = sizeof(BITSET_WORD) * 8; unsigned bit_count =