Mesa (main): iris: Free the local cache bucket in bufmgr_destroy
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Dec 14 07:54:54 UTC 2021
Module: Mesa
Branch: main
Commit: f93892c5d3300127faabb5ba8cbf986d11cc38a4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f93892c5d3300127faabb5ba8cbf986d11cc38a4
Author: Nanley Chery <nanley.g.chery at intel.com>
Date: Tue Dec 7 16:25:20 2021 -0500
iris: Free the local cache bucket in bufmgr_destroy
Fixes: 55be94dcab4 ("iris/bufmgr: Add new set of buckets for local memory.")
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14012>
---
src/gallium/drivers/iris/iris_bufmgr.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c
index 05049838ded..9feb45227ee 100644
--- a/src/gallium/drivers/iris/iris_bufmgr.c
+++ b/src/gallium/drivers/iris/iris_bufmgr.c
@@ -1660,6 +1660,16 @@ iris_bufmgr_destroy(struct iris_bufmgr *bufmgr)
}
}
+ for (int i = 0; i < bufmgr->num_local_buckets; i++) {
+ struct bo_cache_bucket *bucket = &bufmgr->local_cache_bucket[i];
+
+ list_for_each_entry_safe(struct iris_bo, bo, &bucket->head, head) {
+ list_del(&bo->head);
+
+ bo_free(bo);
+ }
+ }
+
/* Close any buffer objects on the dead list. */
list_for_each_entry_safe(struct iris_bo, bo, &bufmgr->zombie_list, head) {
list_del(&bo->head);
More information about the mesa-commit
mailing list