zink: clean up semaphore arrays on batch state destroy

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29152>
(cherry picked from commit 604573cf0a)
This commit is contained in:
Mike Blumenkrantz 2024-05-09 11:28:17 -04:00 committed by Eric Engestrom
parent 946a776387
commit b937e65919
2 changed files with 6 additions and 1 deletions

View file

@ -2244,7 +2244,7 @@
"description": "zink: clean up semaphore arrays on batch state destroy",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -309,6 +309,11 @@ zink_batch_state_destroy(struct zink_screen *screen, struct zink_batch_state *bs
util_dynarray_fini(&bs->bindless_releases[0]);
util_dynarray_fini(&bs->bindless_releases[1]);
util_dynarray_fini(&bs->acquires);
util_dynarray_fini(&bs->signal_semaphores);
util_dynarray_fini(&bs->wait_semaphores);
util_dynarray_fini(&bs->wait_semaphore_stages);
util_dynarray_fini(&bs->fd_wait_semaphores);
util_dynarray_fini(&bs->fd_wait_semaphore_stages);
util_dynarray_fini(&bs->acquire_flags);
unsigned num_mfences = util_dynarray_num_elements(&bs->fence.mfences, void *);
struct zink_tc_fence **mfence = bs->fence.mfences.data;