crocus: 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:
Pierre-Eric Pelloux-Prayer 2022-03-08 11:56:46 +01:00
parent b83bbd6f7f
commit 5b14a0e390
1 changed files with 2 additions and 3 deletions

View File

@ -1645,16 +1645,15 @@ crocus_transfer_map(struct pipe_context *ctx,
struct crocus_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);
struct pipe_transfer *xfer = &map->base.b;
if (!map)
return NULL;
memset(map, 0, sizeof(*map));
map->dbg = &ice->dbg;
map->has_swizzling = screen->devinfo.has_bit6_swizzle;