anv: Move close(fd) from anv_bo_cache_import to its callers (v2)
authorChad Versace <chadversary@chromium.org>
Mon, 11 Sep 2017 23:41:21 +0000 (16:41 -0700)
committerChad Versace <chadversary@chromium.org>
Tue, 17 Oct 2017 18:08:26 +0000 (11:08 -0700)
commiteb69a61806a6bee22f2306420314ac712f4c6e1e
treec554761aec91ebc820fd0f908b882f1ba6d202b1
parent076a279a1a0e3ffd537ff8c8e3d8541bd2d07830
anv: Move close(fd) from anv_bo_cache_import to its callers (v2)

This will allow us to implement VK_ANDROID_native_buffer without dup'ing
the fd. We must close the fd in VK_KHR_external_memory_fd, but we should
not in VK_ANDROID_native_buffer.

v2:
  - Add missing close(fd) for case
    VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR, subcase
    ANV_SEMAPHORE_TYPE_BO.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_allocator.c
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_intel.c
src/intel/vulkan/anv_queue.c