mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
virgl: Skip resource destruction only when there are actually needed references
Suggested by Jan Alexander Steffens in https://gitlab.freedesktop.org/mesa/mesa/-/issues/13844#note_3087461
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13844
Fixes: 6c1c116a0f
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37346>
This commit is contained in:
parent
7b337e214d
commit
63cd410c29
1 changed files with 1 additions and 1 deletions
|
|
@ -82,7 +82,7 @@ static void virgl_hw_res_destroy(struct virgl_drm_winsys *qdws,
|
|||
return;
|
||||
}
|
||||
|
||||
if (!--res->needed_references) {
|
||||
if (--res->needed_references > 0) {
|
||||
mtx_unlock(&qdws->bo_handles_mutex);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue