From b83bbd6f7f3962306319eacfe35f93cbb816849a Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Tue, 8 Mar 2022 11:56:31 +0100 Subject: [PATCH] d3d12: replace opencoded slab_zalloc Acked-by: Emma Anholt Reviewed-by: Erik Faye-Lund Part-of: --- src/gallium/drivers/d3d12/d3d12_resource.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/drivers/d3d12/d3d12_resource.cpp b/src/gallium/drivers/d3d12/d3d12_resource.cpp index ad1af0ad170..9d7669ca165 100644 --- a/src/gallium/drivers/d3d12/d3d12_resource.cpp +++ b/src/gallium/drivers/d3d12/d3d12_resource.cpp @@ -1247,12 +1247,11 @@ d3d12_transfer_map(struct pipe_context *pctx, slab_child_pool* transfer_pool = (usage & TC_TRANSFER_MAP_THREADED_UNSYNC) ? &ctx->transfer_pool_unsync : &ctx->transfer_pool; - struct d3d12_transfer *trans = (struct d3d12_transfer *)slab_alloc(transfer_pool); + struct d3d12_transfer *trans = (struct d3d12_transfer *)slab_zalloc(transfer_pool); struct pipe_transfer *ptrans = &trans->base.b; if (!trans) return NULL; - memset(trans, 0, sizeof(*trans)); pipe_resource_reference(&ptrans->resource, pres); ptrans->resource = pres;