aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2020-05-01 10:57:15 -0700
committerMarge Bot <[email protected]>2020-05-01 19:00:02 +0000
commitfb95ac68552d84d5d4f587edfb38cdc1889ede87 (patch)
treec92c520c8a52e72aef3522c7e20086e3b6032b8e
parentc94379c770e86f66f17d5747e1925bd65bed65c0 (diff)
iris: Destroy transfer slab after batches
Batches are going to have an uploader in the next commit, so destroying batches will destroy uploaders, which will unmap transfers, which will return things to the slab allocator. So we need to reorder destroying the slab allocator to the end to avoid crashing. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3802>
-rw-r--r--src/gallium/drivers/iris/iris_context.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/iris/iris_context.c b/src/gallium/drivers/iris/iris_context.c
index 4d161ac3f41..fcc71f739bb 100644
--- a/src/gallium/drivers/iris/iris_context.c
+++ b/src/gallium/drivers/iris/iris_context.c
@@ -202,12 +202,12 @@ iris_destroy_context(struct pipe_context *ctx)
u_upload_destroy(ice->state.dynamic_uploader);
u_upload_destroy(ice->query_buffer_uploader);
- slab_destroy_child(&ice->transfer_pool);
-
iris_batch_free(&ice->batches[IRIS_BATCH_RENDER]);
iris_batch_free(&ice->batches[IRIS_BATCH_COMPUTE]);
iris_destroy_binder(&ice->state.binder);
+ slab_destroy_child(&ice->transfer_pool);
+
ralloc_free(ice);
}