mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 18:00:10 +01:00
iris: replace opencoded slab_zalloc
Acked-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
This commit is contained in:
parent
4e29299e2b
commit
38aad273aa
1 changed files with 2 additions and 3 deletions
|
|
@ -2255,16 +2255,15 @@ iris_transfer_map(struct pipe_context *ctx,
|
|||
struct iris_transfer *map;
|
||||
|
||||
if (usage & TC_TRANSFER_MAP_THREADED_UNSYNC)
|
||||
map = slab_alloc(&ice->transfer_pool_unsync);
|
||||
map = slab_zalloc(&ice->transfer_pool_unsync);
|
||||
else
|
||||
map = slab_alloc(&ice->transfer_pool);
|
||||
map = slab_zalloc(&ice->transfer_pool);
|
||||
|
||||
if (!map)
|
||||
return NULL;
|
||||
|
||||
struct pipe_transfer *xfer = &map->base.b;
|
||||
|
||||
memset(map, 0, sizeof(*map));
|
||||
map->dbg = &ice->dbg;
|
||||
|
||||
pipe_resource_reference(&xfer->resource, resource);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue