Module: Mesa Branch: main Commit: 38aad273aaf95d8af48705c83fdb685c3acb6fa4 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=38aad273aaf95d8af48705c83fdb685c3acb6fa4
Author: Pierre-Eric Pelloux-Prayer <[email protected]> Date: Tue Mar 8 11:55:33 2022 +0100 iris: replace opencoded slab_zalloc Acked-by: Emma Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277> --- src/gallium/drivers/iris/iris_resource.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index 49c36041e00..022f72c42df 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -2255,16 +2255,15 @@ iris_transfer_map(struct pipe_context *ctx, struct iris_transfer *map; if (usage & TC_TRANSFER_MAP_THREADED_UNSYNC) - map = slab_alloc(&ice->transfer_pool_unsync); + map = slab_zalloc(&ice->transfer_pool_unsync); else - map = slab_alloc(&ice->transfer_pool); + map = slab_zalloc(&ice->transfer_pool); if (!map) return NULL; struct pipe_transfer *xfer = &map->base.b; - memset(map, 0, sizeof(*map)); map->dbg = &ice->dbg; pipe_resource_reference(&xfer->resource, resource);
