mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 10:00:14 +01:00
asahi: skip set if tested
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
This commit is contained in:
parent
7eac18b1bc
commit
46c70b72ca
1 changed files with 4 additions and 3 deletions
|
|
@ -981,12 +981,13 @@ agx_batch_add_bo(struct agx_batch *batch, struct agx_bo *bo)
|
|||
batch->bo_list.word_count = word_count;
|
||||
}
|
||||
|
||||
if (BITSET_TEST(batch->bo_list.set, bo->handle))
|
||||
return;
|
||||
|
||||
/* The batch holds a single reference to each BO in the batch, released when
|
||||
* the batch finishes execution.
|
||||
*/
|
||||
if (!BITSET_TEST(batch->bo_list.set, bo->handle))
|
||||
agx_bo_reference(bo);
|
||||
|
||||
agx_bo_reference(bo);
|
||||
BITSET_SET(batch->bo_list.set, bo->handle);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue