32 if (!sk_gpu_test::LoadVkLibraryAndGetProcAddrFuncs(&instProc)) {
39 if (!sk_gpu_test::CreateVkBackendContext(instProc, &backendContext,
extensions,
40 features, &debugCallback,
41 nullptr, sk_gpu_test::CanPresentFn(),
43 sk_gpu_test::FreeVulkanFeaturesStructs(features);
50 backendContext.
fInstance,
"vkDestroyDebugReportCallbackEXT");
60#define ACQUIRE_VK_PROC_LOCAL(name, inst) \
61 PFN_vk##name localVk##name = \
62 reinterpret_cast<PFN_vk##name>(fVulkan.fGetProc("vk" #name, inst, nullptr)); \
64 if (localVk##name == nullptr) { \
65 SkDebugf("Function ptr for vk%s could not be acquired\n", #name); \
75 localVkDeviceWaitIdle(fVulkan.
fDevice);
76 localVkDestroyDevice(fVulkan.
fDevice,
nullptr);
77#ifdef SK_ENABLE_VK_LAYERS
79 fDestroyDebugReportCallbackEXT(fVulkan.
fInstance, fDebugCallback,
nullptr);
84 (void)fDestroyDebugReportCallbackEXT;
86 localVkDestroyInstance(fVulkan.
fInstance,
nullptr);
89 sk_gpu_test::FreeVulkanFeaturesStructs(fFeatures);
102 if (!
options.fContextOptions.fOptionsPriv) {
103 revisedContextOptions.
fOptionsPriv = &contextOptionsPriv;
#define ACQUIRE_VK_PROC_LOCAL(name, inst)
bool gCreateProtectedContext
~VulkanTestContext() override
skgpu::ContextType contextType() override
std::unique_ptr< skgpu::graphite::Context > makeContext(const TestOptions &) override
static std::unique_ptr< GraphiteTestContext > Make()
SK_API std::unique_ptr< Context > MakeVulkan(const VulkanBackendContext &, const ContextOptions &)
@ kVulkan
ANGLE on Metal ES 3 context.
sk_sp< VulkanMemoryAllocator > fMemoryAllocator
bool fStoreContextRefInRecorder
ContextOptionsPriv * fOptionsPriv
void(VKAPI_PTR * PFN_vkDestroyDebugReportCallbackEXT)(VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks *pAllocator)
struct VkPhysicalDeviceFeatures2 VkPhysicalDeviceFeatures2
PFN_vkVoidFunction(VKAPI_PTR * PFN_vkGetInstanceProcAddr)(VkInstance instance, const char *pName)