mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 04:20:18 +01:00
gallium/u_threaded: fix pipe_resource leak for staging transfer
In2900f82e19I mistakenly used tc_set_resource_reference in both tc_transfer_unmap and tc_call_transfer_unmap. This causes a leak because tc_call_transfer_unmap clears dst before acquiring a reference, so it must only be used when initializing tc_payloads. This fixes the perf drop reported by Marek in MR 7098. Fixes:2900f82e19("gallium/u_threaded: fix staging and non-staging conflicts") Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8035>
This commit is contained in:
parent
d9dd8288aa
commit
fb7ccd3b23
1 changed files with 1 additions and 1 deletions
|
|
@ -1770,7 +1770,7 @@ tc_call_transfer_unmap(struct pipe_context *pipe, union tc_payload *payload)
|
|||
/* Nothing to do except keeping track of staging uploads */
|
||||
assert(tres->pending_staging_uploads > 0);
|
||||
p_atomic_dec(&tres->pending_staging_uploads);
|
||||
tc_set_resource_reference(&p->resource, NULL);
|
||||
pipe_resource_reference(&p->resource, NULL);
|
||||
return;
|
||||
}
|
||||
pipe->transfer_unmap(pipe, p->transfer);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue