mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 12:30:09 +01:00
freedreno: replace opencoded slab_zalloc
Reviewed-by: Rob Clark <robdclark@chromium.org> Acked-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
This commit is contained in:
parent
06b72f1e1a
commit
f8cbbaff5f
1 changed files with 2 additions and 4 deletions
|
|
@ -956,17 +956,15 @@ fd_resource_transfer_map(struct pipe_context *pctx, struct pipe_resource *prsc,
|
|||
}
|
||||
|
||||
if (usage & TC_TRANSFER_MAP_THREADED_UNSYNC) {
|
||||
ptrans = slab_alloc(&ctx->transfer_pool_unsync);
|
||||
ptrans = slab_zalloc(&ctx->transfer_pool_unsync);
|
||||
} else {
|
||||
ptrans = slab_alloc(&ctx->transfer_pool);
|
||||
ptrans = slab_zalloc(&ctx->transfer_pool);
|
||||
}
|
||||
|
||||
if (!ptrans)
|
||||
return NULL;
|
||||
|
||||
/* slab_alloc_st() doesn't zero: */
|
||||
trans = fd_transfer(ptrans);
|
||||
memset(trans, 0, sizeof(*trans));
|
||||
|
||||
usage = improve_transfer_map_usage(ctx, rsc, usage, box);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue