diff options
author | Scott Lobdell <slobdell@google.com> | 2021-03-29 16:12:49 +0000 |
---|---|---|
committer | Scott Lobdell <slobdell@google.com> | 2021-04-02 22:35:29 +0000 |
commit | 21cdef883cc867db55340b25d5c95e19b12ab383 (patch) | |
tree | 93d1444ebe783f53f5f0ae2647592723b27b3fb8 /libs/hwui/renderthread/VulkanManager.h | |
parent | 7deab3736bb5f3a92be8ac820096926dce2366ad (diff) | |
parent | d1d45f856fdf68835f5b42eacecab44e6dfa8545 (diff) |
Merge SP1A.210329.001
Change-Id: I1e21c5890b5b2e2f2855f09960bc8eec8aa922bf
Diffstat (limited to 'libs/hwui/renderthread/VulkanManager.h')
-rw-r--r-- | libs/hwui/renderthread/VulkanManager.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/VulkanManager.h b/libs/hwui/renderthread/VulkanManager.h index 0912369b611d..7b5fe19c64f5 100644 --- a/libs/hwui/renderthread/VulkanManager.h +++ b/libs/hwui/renderthread/VulkanManager.h @@ -31,6 +31,21 @@ #include <vk/GrVkExtensions.h> #include <vulkan/vulkan.h> +// VK_ANDROID_frame_boundary is a bespoke extension defined by AGI +// (https://github.com/google/agi) to enable profiling of apps rendering via +// HWUI. This extension is not defined in Khronos, hence the need to declare it +// manually here. There's a superseding extension (VK_EXT_frame_boundary) being +// discussed in Khronos, but in the meantime we use the bespoke +// VK_ANDROID_frame_boundary. This is a device extension that is implemented by +// AGI's Vulkan capture layer, such that it is only supported by devices when +// AGI is doing a capture of the app. +// +// TODO(b/182165045): use the Khronos blessed VK_EXT_frame_boudary once it has +// landed in the spec. +typedef void(VKAPI_PTR* PFN_vkFrameBoundaryANDROID)(VkDevice device, VkSemaphore semaphore, + VkImage image); +#define VK_ANDROID_FRAME_BOUNDARY_EXTENSION_NAME "VK_ANDROID_frame_boundary" + #include "Frame.h" #include "IRenderPipeline.h" #include "VulkanSurface.h" @@ -160,6 +175,7 @@ private: VkPtr<PFN_vkDestroyFence> mDestroyFence; VkPtr<PFN_vkWaitForFences> mWaitForFences; VkPtr<PFN_vkResetFences> mResetFences; + VkPtr<PFN_vkFrameBoundaryANDROID> mFrameBoundaryANDROID; VkInstance mInstance = VK_NULL_HANDLE; VkPhysicalDevice mPhysicalDevice = VK_NULL_HANDLE; |