Flutter Engine
The Flutter Engine
VkTestUtils.h
Go to the documentation of this file.
1/*
2 * Copyright 2017 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef VkTestUtils_DEFINED
9#define VkTestUtils_DEFINED
10
12
13#ifdef SK_VULKAN
14
17#include <functional>
18
19namespace skgpu {
20struct VulkanBackendContext;
21class VulkanExtensions;
22}
23
24namespace sk_gpu_test {
25 bool LoadVkLibraryAndGetProcAddrFuncs(PFN_vkGetInstanceProcAddr*);
26
27 using CanPresentFn = std::function<bool(VkInstance, VkPhysicalDevice,
28 uint32_t queueFamilyIndex)>;
29
30 bool CreateVkBackendContext(PFN_vkGetInstanceProcAddr getInstProc,
34 VkDebugReportCallbackEXT* debugCallback,
35 uint32_t* presentQueueIndexPtr = nullptr,
36 const CanPresentFn& canPresent = CanPresentFn(),
37 bool isProtected = false);
38
39 void FreeVulkanFeaturesStructs(const VkPhysicalDeviceFeatures2*);
40
41} // namespace sk_gpu_test
42
43#endif
44#endif
Dart_NativeFunction function
Definition: fuchsia.cc:51
Definition: GpuTools.h:21
PFN_vkVoidFunction(VKAPI_PTR * PFN_vkGetInstanceProcAddr)(VkInstance instance, const char *pName)
Definition: vulkan_core.h:3989