summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_android.h
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2018-11-08 10:37:12 +0200
committerTapani Pälli <[email protected]>2018-12-19 09:38:41 +0200
commitf1654fa7e313a97e8849973b6877700bbdb2ce06 (patch)
treefb41b0cc479b352eac8abaa42178dccb01d5e08f /src/intel/vulkan/anv_android.h
parent517103abf1c2ba6c540ae4f5fb1d10874e5568f6 (diff)
anv/android: support creating images from external format
Since we don't know the exact format at creation time, some initialization is done only when bound with memory in vkBindImageMemory. v2: demand dedicated allocation in vkGetImageMemoryRequirements2 if image has external format v3: refactor prepare_ahw_image, support vkBindImageMemory2, calculate stride correctly for rgb(x) surfaces, rename as 'resolve_ahw_image' v4: rebase to b43f955037c changes v5: add some assertions to verify input correctness (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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_android.h b/src/intel/vulkan/anv_android.h
index 01f0e856291..d5c073126e3 100644
--- a/src/intel/vulkan/anv_android.h
+++ b/src/intel/vulkan/anv_android.h
@@ -29,6 +29,8 @@
#include <vulkan/vk_android_native_buffer.h>
struct anv_device_memory;
+struct anv_device;
+struct anv_image;
VkResult anv_image_from_gralloc(VkDevice device_h,
const VkImageCreateInfo *base_info,
@@ -36,6 +38,12 @@ VkResult anv_image_from_gralloc(VkDevice device_h,
const VkAllocationCallbacks *alloc,
VkImage *pImage);
+VkResult anv_image_from_external(VkDevice device_h,
+ const VkImageCreateInfo *base_info,
+ const struct VkExternalMemoryImageCreateInfo *create_info,
+ const VkAllocationCallbacks *alloc,
+ VkImage *out_image_h);
+
uint64_t anv_ahw_usage_from_vk_usage(const VkImageCreateFlags vk_create,
const VkImageUsageFlags vk_usage);