asahi: fix agx_batch_add_bo

when we have exactly POT BOs. fixes crash in portal 2. oh lord.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
This commit is contained in:
Alyssa Rosenzweig 2024-11-29 11:41:38 -05:00 committed by Marge Bot
parent f34cd9e966
commit 8caddd2ca1

View file

@ -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 =