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;