aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-04-25 16:05:29 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-26 12:50:03 +0000
commit5db010bfb5d4ed9d9f1dd90d5baa56e14e07a1cd (patch)
treee452eed9d5291a9f48d677d6b28f1f35fde52348 /include
parent78de212909a72a3ad74d652b39c941236f7047ad (diff)
Link to vulkan in tools but not library.
This also now requires an explicit vulkan proc address getter to be used with GrVkBackendContext::Create. Change-Id: I768ec487398dab68e6e10409419ac7a00ec1822a Reviewed-on: https://skia-review.googlesource.com/14322 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/gpu/vk/GrVkBackendContext.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/gpu/vk/GrVkBackendContext.h b/include/gpu/vk/GrVkBackendContext.h
index 987b32f3b3..429319c31c 100644
--- a/include/gpu/vk/GrVkBackendContext.h
+++ b/include/gpu/vk/GrVkBackendContext.h
@@ -56,10 +56,8 @@ struct GrVkBackendContext : public SkRefCnt {
/**
* Helper function to create the Vulkan objects needed for a Vulkan-backed GrContext.
- * If getProc is null, a default getProc will be constructed if we are statically linking
- * against Vulkan. Note that this default behavior will be removed soon as well as the version
- * that uses the unified "GetProc" instead of separate "GetInstanceProc" and "GetDeviceProc"
- * functions.
+ * Note that the version that uses the unified "GetProc" instead of separate "GetInstanceProc"
+ * and "GetDeviceProc" functions will be removed.
*
* If presentQueueIndex is non-NULL, will try to set up presentQueue as part of device
* creation using the platform-specific canPresent() function.
@@ -75,6 +73,9 @@ struct GrVkBackendContext : public SkRefCnt {
const GrVkInterface::GetDeviceProc& getDeviceProc,
uint32_t* presentQueueIndex = nullptr,
CanPresentFn canPresent = CanPresentFn()) {
+ if (!getInstanceProc || !getDeviceProc) {
+ return nullptr;
+ }
auto getProc = [&getInstanceProc, &getDeviceProc](const char* proc_name,
VkInstance instance, VkDevice device) {
if (device != VK_NULL_HANDLE) {