mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
radv/winsys: fix leaking resources from bo's imported by fd
A bo's ref_count was not being initialized when imported from an fd.
Therefore, we would fail to free the resource during VkFreeMemory().
This patch fixes applications like hifi VR in threaded mode, which
perform frequent imports/releases of IPC shared memory.
Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
CC: 18.0 18.1 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit f56e22e496)
This commit is contained in:
parent
1a23971b49
commit
5a7de46492
1 changed files with 1 additions and 0 deletions
|
|
@ -450,6 +450,7 @@ radv_amdgpu_winsys_bo_from_fd(struct radeon_winsys *_ws,
|
|||
bo->size = result.alloc_size;
|
||||
bo->is_shared = true;
|
||||
bo->ws = ws;
|
||||
bo->ref_count = 1;
|
||||
radv_amdgpu_add_buffer_to_global_list(bo);
|
||||
return (struct radeon_winsys_bo *)bo;
|
||||
error_va_map:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue