OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright 2016 Google Inc. | |
3 * | |
4 * Use of this source code is governed by a BSD-style license that can be | |
5 * found in the LICENSE file. | |
6 */ | |
7 | |
8 #ifndef GrVkBackendContext_DEFINED | |
9 #define GrVkBackendContext_DEFINED | |
10 | |
11 #include "SkRefCnt.h" | |
12 | |
13 #include "vulkan/vulkan.h" | |
14 | |
15 #ifdef SK_DEBUG | |
16 #define ENABLE_VK_LAYERS | |
17 #endif | |
18 | |
19 struct GrVkInterface; | |
20 | |
21 // The BackendContext contains all of the base Vulkan objects needed by the GrVk Gpu. The assumption | |
22 // is that the client will set these up and pass them to the GrVkGpu constructor . The VkDevice | |
23 // created must support at least one graphics queue, which is passed in as well. The client may | |
24 // create more than one queue (reserving one for swap chain presentation, for ex ample). | |
25 struct GrVkBackendContext : public SkRefCnt { | |
egdaniel
2016/03/23 14:51:57
Does the comment about more than one queue add any
jvanverth1
2016/03/23 15:44:13
Done.
| |
26 VkInstance fInstance; | |
27 VkPhysicalDevice fPhysicalDevice; | |
28 VkDevice fDevice; | |
29 VkQueue fQueue; | |
30 uint32_t fQueueFamilyIndex; | |
egdaniel
2016/03/23 14:51:57
The fact that we pass in this queue family index h
jvanverth1
2016/03/23 15:44:13
As discussed, the contract with the client will be
| |
31 SkAutoTUnref<const GrVkInterface> fInterface; | |
32 | |
33 // Helper function to create the default Vulkan objects needed by the GrVkGp u object | |
34 static const GrVkBackendContext* Create(); | |
35 | |
36 ~GrVkBackendContext() override; | |
37 }; | |
38 | |
39 #endif | |
OLD | NEW |