aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gpu')
-rw-r--r--tools/gpu/vk/VkTestContext.cpp10
-rw-r--r--tools/gpu/vk/VkTestUtils.cpp40
-rw-r--r--tools/gpu/vk/VkTestUtils.h21
3 files changed, 3 insertions, 68 deletions
diff --git a/tools/gpu/vk/VkTestContext.cpp b/tools/gpu/vk/VkTestContext.cpp
index daaa55bfa0..e329583a03 100644
--- a/tools/gpu/vk/VkTestContext.cpp
+++ b/tools/gpu/vk/VkTestContext.cpp
@@ -10,9 +10,9 @@
#ifdef SK_VULKAN
#include "GrContext.h"
-#include "VkTestUtils.h"
#include "vk/GrVkInterface.h"
#include "vk/GrVkUtil.h"
+#include <vulkan/vulkan.h>
namespace {
/**
@@ -114,12 +114,8 @@ public:
if (sharedContext) {
backendContext = sharedContext->getVkBackendContext();
} else {
- PFN_vkGetInstanceProcAddr instProc;
- PFN_vkGetDeviceProcAddr devProc;
- if (!sk_gpu_test::LoadVkLibraryAndGetProcAddrFuncs(&instProc, &devProc)) {
- return nullptr;
- }
- backendContext.reset(GrVkBackendContext::Create(instProc, devProc));
+ backendContext.reset(GrVkBackendContext::Create(vkGetInstanceProcAddr,
+ vkGetDeviceProcAddr));
}
if (!backendContext) {
return nullptr;
diff --git a/tools/gpu/vk/VkTestUtils.cpp b/tools/gpu/vk/VkTestUtils.cpp
deleted file mode 100644
index 62fd312ecf..0000000000
--- a/tools/gpu/vk/VkTestUtils.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2017 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "VkTestUtils.h"
-
-#include "../ports/SkOSLibrary.h"
-
-namespace sk_gpu_test {
-
-bool LoadVkLibraryAndGetProcAddrFuncs(PFN_vkGetInstanceProcAddr* instProc,
- PFN_vkGetDeviceProcAddr* devProc) {
- static void* vkLib = nullptr;
- static PFN_vkGetInstanceProcAddr localInstProc = nullptr;
- static PFN_vkGetDeviceProcAddr localDevProc = nullptr;
- if (!vkLib) {
-#if defined _WIN32
- vkLib = DynamicLoadLibrary("vulkan-1.dll");
-#else
- vkLib = DynamicLoadLibrary("libvulkan.so");
-#endif
- if (!vkLib) {
- return false;
- }
- localInstProc = (PFN_vkGetInstanceProcAddr) GetProcedureAddress(vkLib,
- "vkGetInstanceProcAddr");
- localDevProc = (PFN_vkGetDeviceProcAddr) GetProcedureAddress(vkLib,
- "vkGetDeviceProcAddr");
- }
- if (!localInstProc || !localDevProc) {
- return false;
- }
- *instProc = localInstProc;
- *devProc = localDevProc;
- return true;
-}
-}
diff --git a/tools/gpu/vk/VkTestUtils.h b/tools/gpu/vk/VkTestUtils.h
deleted file mode 100644
index 43e9dfdbdc..0000000000
--- a/tools/gpu/vk/VkTestUtils.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright 2017 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef VkTestUtils_DEFINED
-#define VkTestUtils_DEFINED
-
-#ifdef SK_VULKAN
-
-#include "vk/GrVkDefines.h"
-
-namespace sk_gpu_test {
- bool LoadVkLibraryAndGetProcAddrFuncs(PFN_vkGetInstanceProcAddr*, PFN_vkGetDeviceProcAddr*);
-}
-
-#endif
-#endif
-