aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/vk/GrVkBackendContext.h
diff options
context:
space:
mode:
authorGravatar jvanverth <jvanverth@google.com>2016-04-21 11:46:23 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-21 11:46:23 -0700
commitb0d4352ca610654f98c3c4ebc67ed9ad9c8c8493 (patch)
tree7b4587a89171aa7f651be0c9dbb1e271bd6ae6e4 /include/gpu/vk/GrVkBackendContext.h
parentfa7ff470a83183ba0d22a8b83a022e2e3122e851 (diff)
Revise WSI setup.
- Set up present queue creation correctly. - Move WSI functions to VulkanTestContext. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1899213002 Review URL: https://codereview.chromium.org/1899213002
Diffstat (limited to 'include/gpu/vk/GrVkBackendContext.h')
-rw-r--r--include/gpu/vk/GrVkBackendContext.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/gpu/vk/GrVkBackendContext.h b/include/gpu/vk/GrVkBackendContext.h
index 82a9f94bcc..d33466ca25 100644
--- a/include/gpu/vk/GrVkBackendContext.h
+++ b/include/gpu/vk/GrVkBackendContext.h
@@ -45,14 +45,17 @@ struct GrVkBackendContext : public SkRefCnt {
VkPhysicalDevice fPhysicalDevice;
VkDevice fDevice;
VkQueue fQueue;
- uint32_t fQueueFamilyIndex;
+ uint32_t fGraphicsQueueIndex;
uint32_t fMinAPIVersion;
uint32_t fExtensions;
uint32_t fFeatures;
SkAutoTUnref<const GrVkInterface> fInterface;
// Helper function to create the default Vulkan objects needed by the GrVkGpu object
- static const GrVkBackendContext* Create();
+ // If presentQueueIndex is non-NULL, will try to set up presentQueue as part of device
+ // creation. canPresent() is a device-dependent function.
+ static const GrVkBackendContext* Create(uint32_t* presentQueueIndex = nullptr,
+ bool(*canPresent)(VkInstance, VkPhysicalDevice, uint32_t queueIndex) = nullptr);
~GrVkBackendContext() override;
};