summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_private.h
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2017-08-29 01:36:42 -0700
committerChad Versace <[email protected]>2017-10-17 11:08:26 -0700
commit076a279a1a0e3ffd537ff8c8e3d8541bd2d07830 (patch)
treeb63c01c91f92e43207064bf5f894252a7a2dd21a /src/intel/vulkan/anv_private.h
parenta9ca8f370d6cce0569f15cbbf0986f5d2e0c1384 (diff)
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 <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_private.h')
-rw-r--r--src/intel/vulkan/anv_private.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index a80e8519257..27d2c342033 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -2420,6 +2420,11 @@ struct anv_image {
*/
struct anv_bo *bo;
VkDeviceSize bo_offset;
+
+ /**
+ * When destroying the image, also free the bo.
+ * */
+ bool bo_is_owned;
} planes[3];
};