diff options
author | Tapani Pälli <[email protected]> | 2018-11-08 10:20:35 +0200 |
---|---|---|
committer | Tapani Pälli <[email protected]> | 2018-12-19 09:38:41 +0200 |
commit | c79a528d2b58dfa6f3d856271cbf29697a5322a1 (patch) | |
tree | 2f685992a3e78e96671c7a55c71858f8f5c5189a /src/intel/vulkan/anv_android.h | |
parent | 5c65c60d6c9120b2704e8767f3381faef97c4052 (diff) |
anv/android: support import/export of AHardwareBuffer objects
v2: add support for non-image buffers (AHARDWAREBUFFER_FORMAT_BLOB)
v3: properly handle usage bits when creating from image
v4: refactor, code cleanup (Jason)
v5: rebase to b43f955037c changes,
initialize bo flags as ANV_BO_EXTERNAL (Lionel)
v6: add assert that anv_bo_cache_import succeeds, add comment
about multi-bo support to clarify current implementation (Lionel)
Signed-off-by: Tapani Pälli <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_android.h')
-rw-r--r-- | src/intel/vulkan/anv_android.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_android.h b/src/intel/vulkan/anv_android.h index 8d748cecc39..01f0e856291 100644 --- a/src/intel/vulkan/anv_android.h +++ b/src/intel/vulkan/anv_android.h @@ -28,6 +28,8 @@ #include <vulkan/vulkan_android.h> #include <vulkan/vk_android_native_buffer.h> +struct anv_device_memory; + VkResult anv_image_from_gralloc(VkDevice device_h, const VkImageCreateInfo *base_info, const VkNativeBufferANDROID *gralloc_info, @@ -36,4 +38,12 @@ VkResult anv_image_from_gralloc(VkDevice device_h, uint64_t anv_ahw_usage_from_vk_usage(const VkImageCreateFlags vk_create, const VkImageUsageFlags vk_usage); + +VkResult anv_import_ahw_memory(VkDevice device_h, + struct anv_device_memory *mem, + const VkImportAndroidHardwareBufferInfoANDROID *info); + +VkResult anv_create_ahw_memory(VkDevice device_h, + struct anv_device_memory *mem, + const VkMemoryAllocateInfo *pAllocateInfo); #endif /* ANV_ANDROID_H */ |