aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu/vk/VkTestContext.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-11-09 15:20:26 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-09 21:04:37 +0000
commit77d6feaa69d95c42f4e77195e92de33917995544 (patch)
tree105d7145e53d14cc2ead22f2e5807cb34b5fb481 /tools/gpu/vk/VkTestContext.cpp
parent0f3c73220a25eba9bf11583db3d0f76a2c4f6331 (diff)
Dynamically load the vulkan library in our test tools
Bug: skia: Change-Id: I7c1f6cbb2b50ca284f40cf4b9ef49a76083b38c6 Reviewed-on: https://skia-review.googlesource.com/68643 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'tools/gpu/vk/VkTestContext.cpp')
-rw-r--r--tools/gpu/vk/VkTestContext.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/gpu/vk/VkTestContext.cpp b/tools/gpu/vk/VkTestContext.cpp
index e329583a03..daaa55bfa0 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,8 +114,12 @@ public:
if (sharedContext) {
backendContext = sharedContext->getVkBackendContext();
} else {
- backendContext.reset(GrVkBackendContext::Create(vkGetInstanceProcAddr,
- vkGetDeviceProcAddr));
+ PFN_vkGetInstanceProcAddr instProc;
+ PFN_vkGetDeviceProcAddr devProc;
+ if (!sk_gpu_test::LoadVkLibraryAndGetProcAddrFuncs(&instProc, &devProc)) {
+ return nullptr;
+ }
+ backendContext.reset(GrVkBackendContext::Create(instProc, devProc));
}
if (!backendContext) {
return nullptr;