diff options
author | Andres Rodriguez <[email protected]> | 2018-04-30 18:05:49 -0400 |
---|---|---|
committer | Juan A. Suarez Romero <[email protected]> | 2018-05-02 12:15:05 +0200 |
commit | 5a7de464926e71e8b257b24a7151d0613af23664 (patch) | |
tree | ad0fd362ba802c3635e8b3e93fbf226a27ad6bba /src | |
parent | 1a23971b49f77960afb2c686d20fced476185602 (diff) |
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 <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
CC: 18.0 18.1 <[email protected]>
(cherry picked from commit f56e22e49673e8234a7fe0c241b4c3eae4752f34)
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c index 603111d2ebc..78bf454eca0 100644 --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c @@ -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: |