Skip to content
Snippets Groups Projects
Commit 637e02c1 authored by Lepton Wu's avatar Lepton Wu Committed by Dylan Baker
Browse files

virgl: Fix pipe_resource leaks under multi-sample.


Fixes: 900a80f9 ("virgl: virgl_transfer should own its virgl_resource")

Signed-off-by: default avatarLepton Wu <lepton@chromium.org>
Reviewed-by: default avatarChia-I Wu <olvaffe@gmail.com>
(cherry picked from commit 263136fb)
parent e4bb2ceb
No related branches found
No related tags found
No related merge requests found
......@@ -169,6 +169,9 @@ static void *texture_transfer_map_resolve(struct pipe_context *ctx,
if (!ptr)
goto fail;
/* trans->resolve_transfer owns resolve_tmp now */
pipe_resource_reference(&resolve_tmp, NULL);
*transfer = &trans->base;
if (fmt == resource->format) {
trans->base.stride = trans->resolve_transfer->stride;
......@@ -283,7 +286,6 @@ static void virgl_texture_transfer_unmap(struct pipe_context *ctx,
}
if (trans->resolve_transfer) {
pipe_resource_reference(&trans->resolve_transfer->resource, NULL);
virgl_resource_destroy_transfer(vctx,
virgl_transfer(trans->resolve_transfer));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment