From 7554fa266a87d84d914683a649ad50a654c19ab0 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Mon, 10 Jul 2017 10:43:08 -0700 Subject: [PATCH] vulkan/registry: Add VK_ANDROID_native_buffer MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The VK_ANDROID_native_buffer extension is missing from the official vk.xml. This patch defines the extension in a separate, minimal XML file: vk_android_native_buffer.xml. I chose to add the extension to a new XML file instead of adding it to the official vk.xml in order to avoid conflicts each time we sync the vk.xml from Khronos. This should be only a temporary solution until Jesse Hall is persuaded to add it to the official vk.xml. Reviewed-by: Tapani Pälli --- src/Makefile.am | 2 + .../registry/vk_android_native_buffer.xml | 52 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 src/vulkan/registry/vk_android_native_buffer.xml diff --git a/src/Makefile.am b/src/Makefile.am index e055cb8e701..7ca3c0a12d9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -72,7 +72,9 @@ endif if HAVE_VULKAN_COMMON SUBDIRS += vulkan endif + EXTRA_DIST += vulkan/registry/vk.xml +EXTRA_DIST += vulkan/registry/vk_android_native_buffer.xml if HAVE_AMD_DRIVERS SUBDIRS += amd diff --git a/src/vulkan/registry/vk_android_native_buffer.xml b/src/vulkan/registry/vk_android_native_buffer.xml new file mode 100644 index 00000000000..2738908aa71 --- /dev/null +++ b/src/vulkan/registry/vk_android_native_buffer.xml @@ -0,0 +1,52 @@ + + + + + VkStructureType sType + const void* pNext + buffer_handle_t handle + int stride + int format + int usage + + + + + VkResult vkGetSwapchainGrallocUsageANDROID + VkDevice device + VkFormat format + VkImageUsageFlags imageUsage + int* grallocUsage + + + VkResult vkAcquireImageANDROID + VkDevice device + VkImage image + int nativeFenceFd + VkSemaphore semaphore + VkFence fence + + + VkResult vkQueueSignalReleaseImageANDROID + VkQueue queue + uint32_t waitSemaphoreCount + const VkSemaphore* pWaitSemaphores + VkImage image + int* pNativeFenceFd + + + + + + + + + + + + + + + + + -- 2.30.2