anv: Add field anv_image::planes[]::bo_is_owned (v2)
authorChad Versace <chadversary@chromium.org>
Tue, 29 Aug 2017 08:36:42 +0000 (01:36 -0700)
committerChad Versace <chadversary@chromium.org>
Tue, 17 Oct 2017 18:08:26 +0000 (11:08 -0700)
commit076a279a1a0e3ffd537ff8c8e3d8541bd2d07830
treeb63c01c91f92e43207064bf5f894252a7a2dd21a
parenta9ca8f370d6cce0569f15cbbf0986f5d2e0c1384
anv: Add field anv_image::planes[]::bo_is_owned (v2)

If this flag is set, then the image and the bo have the same lifetime.
vkDestroyImage will release the bo.

We need this for VK_ANDROID_native_buffer, because that extension
creates the VkImage *and* imports its memory during the same
call, vkCreateImage.

v2: Rebase onto VK_KHR_bind_memory2.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_image.c
src/intel/vulkan/anv_private.h