Module: Mesa Branch: main Commit: 5b14a0e390d48a8e6b785d0f6c6439d11e7d1045 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5b14a0e390d48a8e6b785d0f6c6439d11e7d1045
Author: Pierre-Eric Pelloux-Prayer <[email protected]> Date: Tue Mar 8 11:56:46 2022 +0100 crocus: replace opencoded slab_zalloc Acked-by: Emma Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277> --- 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;
