lima: replace opencoded slab_zalloc

Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2022-03-08 11:55:45 +01:00
parent 38aad273aa
commit 06b72f1e1a

View file

@ -657,11 +657,10 @@ lima_transfer_map(struct pipe_context *pctx,
if (!lima_bo_map(bo))
return NULL;
trans = slab_alloc(&ctx->transfer_pool);
trans = slab_zalloc(&ctx->transfer_pool);
if (!trans)
return NULL;
memset(trans, 0, sizeof(*trans));
ptrans = &trans->base;
pipe_resource_reference(&ptrans->resource, pres);