OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef GrRadInterface_DEFINED | 8 #ifndef GrRadInterface_DEFINED |
9 #define GrRadInterface_DEFINED | 9 #define GrRadInterface_DEFINED |
10 | 10 |
11 #include "SkRefCnt.h" | 11 #include "SkRefCnt.h" |
12 | 12 |
13 #include "GrVkExtensions.h" | 13 #include "GrVkExtensions.h" |
14 | 14 |
15 #include "vulkan/vulkan.h" | 15 #include "vulkan/vulkan.h" |
16 | 16 |
17 //////////////////////////////////////////////////////////////////////////////// | 17 //////////////////////////////////////////////////////////////////////////////// |
18 | 18 |
19 /** | 19 /** |
20 * The default interface is returned by GrVkDefaultInterface. This function's | 20 * The default interface is returned by GrVkDefaultInterface. This function's |
21 * implementation is platform-specific. | 21 * implementation is platform-specific. |
22 */ | 22 */ |
23 | 23 |
24 struct GrVkInterface; | 24 struct GrVkInterface; |
25 | 25 |
26 /** | 26 /** |
27 * Creates a GrVkInterface. | 27 * Creates a GrVkInterface. |
28 */ | 28 */ |
29 const GrVkInterface* GrVkCreateInterface(VkInstance instance); | 29 const GrVkInterface* GrVkCreateInterface(VkInstance instance, VkPhysicalDevice p
hysDev, |
| 30 VkDevice device); |
30 | 31 |
31 | 32 |
32 /** | 33 /** |
33 * GrContext uses the following interface to make all calls into Vulkan. When a | 34 * GrContext uses the following interface to make all calls into Vulkan. When a |
34 * GrContext is created it is given a GrVkInterface. All functions that should b
e | 35 * GrContext is created it is given a GrVkInterface. All functions that should b
e |
35 * available based on the Vulkan's version must be non-NULL or GrContext creatio
n | 36 * available based on the Vulkan's version must be non-NULL or GrContext creatio
n |
36 * will fail. This can be tested with the validate() method. | 37 * will fail. This can be tested with the validate() method. |
37 */ | 38 */ |
38 struct SK_API GrVkInterface : public SkRefCnt { | 39 struct SK_API GrVkInterface : public SkRefCnt { |
39 private: | 40 private: |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 VkPtr<PFN_vkCreateDisplayPlaneSurfaceKHR> fCreateDisplayPlaneSurfaceKHR; | 231 VkPtr<PFN_vkCreateDisplayPlaneSurfaceKHR> fCreateDisplayPlaneSurfaceKHR; |
231 VkPtr<PFN_vkCreateSharedSwapchainsKHR> fCreateSharedSwapchainsKHR; | 232 VkPtr<PFN_vkCreateSharedSwapchainsKHR> fCreateSharedSwapchainsKHR; |
232 VkPtr<PFN_vkCreateDebugReportCallbackEXT> fCreateDebugReportCallbackEXT; | 233 VkPtr<PFN_vkCreateDebugReportCallbackEXT> fCreateDebugReportCallbackEXT; |
233 VkPtr<PFN_vkDebugReportMessageEXT> fDebugReportMessageEXT; | 234 VkPtr<PFN_vkDebugReportMessageEXT> fDebugReportMessageEXT; |
234 VkPtr<PFN_vkDestroyDebugReportCallbackEXT> fDestroyDebugReportCallbackEX
T; | 235 VkPtr<PFN_vkDestroyDebugReportCallbackEXT> fDestroyDebugReportCallbackEX
T; |
235 } fFunctions; | 236 } fFunctions; |
236 | 237 |
237 }; | 238 }; |
238 | 239 |
239 #endif | 240 #endif |
OLD | NEW |