skia2/tools/gpu/vk/VkTestUtils.h
Greg Daniel a0651acaf2 Update vulkan features (again) to support extension features.
We need to handle all the possible ways a client is allowed to initialize
features on Vulkan.

Bug: skia:
Change-Id: I98b1dee2efa2c22c26ce093c590c7ccd0b626969
Reviewed-on: https://skia-review.googlesource.com/145530
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-08-08 13:48:38 +00:00

43 lines
1.2 KiB
C++

/*
* 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
#include "SkTypes.h"
#ifdef SK_VULKAN
#include "GrVulkanDefines.h"
#include "vk/GrVkBackendContext.h"
#include "vk/GrVkTypes.h"
#include <functional>
class GrVkExtensions;
struct GrVkBackendContext;
namespace sk_gpu_test {
bool LoadVkLibraryAndGetProcAddrFuncs(PFN_vkGetInstanceProcAddr*, PFN_vkGetDeviceProcAddr*);
using CanPresentFn = std::function<bool(VkInstance, VkPhysicalDevice,
uint32_t queueFamilyIndex)>;
bool CreateVkBackendContext(GrVkGetProc getProc,
GrVkBackendContext* ctx,
GrVkExtensions*,
VkPhysicalDeviceFeatures2*,
VkDebugReportCallbackEXT* debugCallback,
uint32_t* presentQueueIndexPtr = nullptr,
CanPresentFn canPresent = CanPresentFn());
void FreeVulkanFeaturesStructs(const VkPhysicalDeviceFeatures2*);
}
#endif
#endif