etnaviv: replace opencoded slab_zalloc

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
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:56:13 +01:00
parent f8cbbaff5f
commit 42fe3c5815

View File

@@ -201,13 +201,10 @@ etna_transfer_map(struct pipe_context *pctx, struct pipe_resource *prsc,
struct pipe_transfer *ptrans;
enum pipe_format format = prsc->format;
trans = slab_alloc(&ctx->transfer_pool);
trans = slab_zalloc(&ctx->transfer_pool);
if (!trans)
return NULL;
/* slab_alloc() doesn't zero */
memset(trans, 0, sizeof(*trans));
/*
* Upgrade to UNSYNCHRONIZED if target is PIPE_BUFFER and range is uninitialized.
*/