diff options
Diffstat (limited to 'tools/gpu/vk/VkTestUtils.h')
-rw-r--r-- | tools/gpu/vk/VkTestUtils.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/gpu/vk/VkTestUtils.h b/tools/gpu/vk/VkTestUtils.h index 9f34ef09c5..30471a78c0 100644 --- a/tools/gpu/vk/VkTestUtils.h +++ b/tools/gpu/vk/VkTestUtils.h @@ -13,9 +13,21 @@ #ifdef SK_VULKAN #include "vk/GrVkDefines.h" +#include "vk/GrVkInterface.h" + +struct GrVkBackendContext; namespace sk_gpu_test { bool LoadVkLibraryAndGetProcAddrFuncs(PFN_vkGetInstanceProcAddr*, PFN_vkGetDeviceProcAddr*); + + using CanPresentFn = std::function<bool(VkInstance, VkPhysicalDevice, + uint32_t queueFamilyIndex)>; + + bool CreateVkBackendContext(const GrVkInterface::GetInstanceProc& getInstanceProc, + const GrVkInterface::GetDeviceProc& getDeviceProc, + GrVkBackendContext* ctx, + uint32_t* presentQueueIndexPtr = nullptr, + CanPresentFn canPresent = CanPresentFn()); } #endif |