From a8e63387f3403ddb56a27a41229cd424d6d43da8 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Wed, 12 Jun 2019 18:24:30 +0200 Subject: [PATCH] zink: do not destroy staging-resource, deref it Acked-by: Jordan Justen --- src/gallium/drivers/zink/zink_resource.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c index 24dc051513d..34c7ed0e500 100644 --- a/src/gallium/drivers/zink/zink_resource.c +++ b/src/gallium/drivers/zink/zink_resource.c @@ -493,8 +493,7 @@ zink_transfer_unmap(struct pipe_context *pctx, zink_transfer_copy_bufimage(ctx, res, staging_res, trans, true); } - zink_resource_destroy(pctx->screen, trans->staging_res); - trans->staging_res = NULL; + pipe_resource_reference(&trans->staging_res, NULL); } else vkUnmapMemory(screen->dev, res->mem); -- 2.30.2