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 #include "GrVkGpu.h" | 8 #include "GrVkGpu.h" |
9 | 9 |
10 #include "GrContextOptions.h" | 10 #include "GrContextOptions.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 fVkCaps.reset(new GrVkCaps(options, this->vkInterface(), backendCtx->fPhysic
alDevice, | 113 fVkCaps.reset(new GrVkCaps(options, this->vkInterface(), backendCtx->fPhysic
alDevice, |
114 backendCtx->fFeatures, backendCtx->fExtensions)); | 114 backendCtx->fFeatures, backendCtx->fExtensions)); |
115 fCaps.reset(SkRef(fVkCaps.get())); | 115 fCaps.reset(SkRef(fVkCaps.get())); |
116 | 116 |
117 VK_CALL(GetPhysicalDeviceMemoryProperties(backendCtx->fPhysicalDevice, &fPhy
sDevMemProps)); | 117 VK_CALL(GetPhysicalDeviceMemoryProperties(backendCtx->fPhysicalDevice, &fPhy
sDevMemProps)); |
118 | 118 |
119 const VkCommandPoolCreateInfo cmdPoolInfo = { | 119 const VkCommandPoolCreateInfo cmdPoolInfo = { |
120 VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO, // sType | 120 VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO, // sType |
121 nullptr, // pNext | 121 nullptr, // pNext |
122 VK_COMMAND_POOL_CREATE_TRANSIENT_BIT, // CmdPoolCreateFlags | 122 VK_COMMAND_POOL_CREATE_TRANSIENT_BIT, // CmdPoolCreateFlags |
123 backendCtx->fQueueFamilyIndex, // queueFamilyIndex | 123 backendCtx->fGraphicsQueueIndex, // queueFamilyIndex |
124 }; | 124 }; |
125 GR_VK_CALL_ERRCHECK(this->vkInterface(), CreateCommandPool(fDevice, &cmdPool
Info, nullptr, | 125 GR_VK_CALL_ERRCHECK(this->vkInterface(), CreateCommandPool(fDevice, &cmdPool
Info, nullptr, |
126 &fCmdPool)); | 126 &fCmdPool)); |
127 | 127 |
128 // must call this after creating the CommandPool | 128 // must call this after creating the CommandPool |
129 fResourceProvider.init(); | 129 fResourceProvider.init(); |
130 fCurrentCmdBuffer = fResourceProvider.createCommandBuffer(); | 130 fCurrentCmdBuffer = fResourceProvider.createCommandBuffer(); |
131 SkASSERT(fCurrentCmdBuffer); | 131 SkASSERT(fCurrentCmdBuffer); |
132 fCurrentCmdBuffer->begin(this); | 132 fCurrentCmdBuffer->begin(this); |
133 } | 133 } |
(...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1611 aglSwapBuffers(aglGetCurrentContext()); | 1611 aglSwapBuffers(aglGetCurrentContext()); |
1612 int set_a_break_pt_here = 9; | 1612 int set_a_break_pt_here = 9; |
1613 aglSwapBuffers(aglGetCurrentContext()); | 1613 aglSwapBuffers(aglGetCurrentContext()); |
1614 #elif defined(SK_BUILD_FOR_WIN32) | 1614 #elif defined(SK_BUILD_FOR_WIN32) |
1615 SwapBuf(); | 1615 SwapBuf(); |
1616 int set_a_break_pt_here = 9; | 1616 int set_a_break_pt_here = 9; |
1617 SwapBuf(); | 1617 SwapBuf(); |
1618 #endif | 1618 #endif |
1619 #endif | 1619 #endif |
1620 } | 1620 } |
OLD | NEW |