radv/winsys: fix freeing imported memory.
authorAndres Rodriguez <andresx7@gmail.com>
Sun, 26 Feb 2017 23:50:25 +0000 (23:50 +0000)
committerDave Airlie <airlied@redhat.com>
Mon, 27 Feb 2017 00:22:39 +0000 (00:22 +0000)
This bo->fd wasn't setting some stuff correctly that could
lead to crashes for anything using this path later.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c

index 7319a988872fac65c6fcd9d01056aed300aa9666..7f7fc7ac1ad3005ca433ee03bfe68c23cf51b214 100644 (file)
@@ -205,6 +205,8 @@ radv_amdgpu_winsys_bo_from_fd(struct radeon_winsys *_ws,
        bo->initial_domain = initial;
        bo->size = result.alloc_size;
        bo->is_shared = true;
+       bo->ws = ws;
+       radv_amdgpu_add_buffer_to_global_list(bo);
        return (struct radeon_winsys_bo *)bo;
 error_va_map:
        amdgpu_va_range_free(va_handle);