From 5b14a0e390d48a8e6b785d0f6c6439d11e7d1045 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Tue, 8 Mar 2022 11:56:46 +0100 Subject: [PATCH] crocus: replace opencoded slab_zalloc Acked-by: Emma Anholt Part-of: --- src/gallium/drivers/crocus/crocus_resource.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/crocus/crocus_resource.c b/src/gallium/drivers/crocus/crocus_resource.c index e503392ee56..15e77b2602a 100644 --- a/src/gallium/drivers/crocus/crocus_resource.c +++ b/src/gallium/drivers/crocus/crocus_resource.c @@ -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;