diff --git a/.pick_status.json b/.pick_status.json index e4baae24ab1..1312e5ff66d 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -769,7 +769,7 @@ "description": "gallium/tc: zero alloc transfers", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index 8eb7f86f161..6cbe2567cb0 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -2148,11 +2148,9 @@ tc_buffer_map(struct pipe_context *_pipe, * only get resource_copy_region. */ if (usage & PIPE_MAP_DISCARD_RANGE) { - struct threaded_transfer *ttrans = slab_alloc(&tc->pool_transfers); + struct threaded_transfer *ttrans = slab_zalloc(&tc->pool_transfers); uint8_t *map; - ttrans->staging = NULL; - u_upload_alloc(tc->base.stream_uploader, 0, box->width + (box->x % tc->map_buffer_alignment), tc->map_buffer_alignment, &ttrans->b.offset,