radv/winsys: fix leaking resources from bo's imported by fd
authorAndres Rodriguez <andresx7@gmail.com>
Mon, 30 Apr 2018 22:05:49 +0000 (18:05 -0400)
committerAndres Rodriguez <andresx7@gmail.com>
Mon, 30 Apr 2018 22:20:30 +0000 (18:20 -0400)
commitf56e22e49673e8234a7fe0c241b4c3eae4752f34
treeeadaf9d931e7114dd0e8136a85f260860cfb2c77
parent2a08ae3c7cba14b9805d006e1981ba9d762bf241
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>
src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c