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;