iris: Use thread safe slab allocators in transfer_map handling

pipe->transfer_map can be called from u_threaded_context's thread
rather than the driver thread.  We need to use two different slab
allocators, one for each thread.  transfer_unmap, on the other hand,
is only ever called from the driver thread.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8964>
This commit is contained in:
Kenneth Graunke
2021-02-10 15:09:11 -08:00
parent 1b1c857248
commit c133d0930f
3 changed files with 16 additions and 1 deletions

View File

@@ -576,6 +576,9 @@ struct iris_context {
/** Slab allocator for iris_transfer_map objects. */
struct slab_child_pool transfer_pool;
/** Slab allocator for threaded_context's iris_transfer_map objects */
struct slab_child_pool transfer_pool_unsync;
struct blorp_context blorp;
struct iris_batch batches[IRIS_BATCH_COUNT];