d3d12: replace opencoded slab_zalloc
Acked-by: Emma Anholt <emma@anholt.net> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user