mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-28 07:30:22 +01:00
zink: fix sparse bo deallocation
this loop was not correctly iterating the dynarray cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31124>
This commit is contained in:
parent
d72f7cbc5a
commit
bb16203a8d
1 changed files with 2 additions and 2 deletions
|
|
@ -131,10 +131,10 @@ zink_reset_batch_state(struct zink_context *ctx, struct zink_batch_state *bs)
|
|||
|
||||
zink_batch_descriptor_reset(screen, bs);
|
||||
|
||||
util_dynarray_foreach(&bs->freed_sparse_backing_bos, struct zink_bo, bo) {
|
||||
while (util_dynarray_contains(&bs->freed_sparse_backing_bos, struct zink_bo*)) {
|
||||
struct zink_bo *bo = util_dynarray_pop(&bs->freed_sparse_backing_bos, struct zink_bo*);
|
||||
zink_bo_unref(screen, bo);
|
||||
}
|
||||
util_dynarray_clear(&bs->freed_sparse_backing_bos);
|
||||
|
||||
/* programs are refcounted and batch-tracked */
|
||||
set_foreach_remove(&bs->programs, entry) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue