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 GrVkGpu_DEFINED | 8 #ifndef GrVkGpu_DEFINED |
9 #define GrVkGpu_DEFINED | 9 #define GrVkGpu_DEFINED |
10 | 10 |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 bool uploadTexDataOptimal(GrVkTexture* tex, | 201 bool uploadTexDataOptimal(GrVkTexture* tex, |
202 int left, int top, int width, int height, | 202 int left, int top, int width, int height, |
203 GrPixelConfig dataConfig, | 203 GrPixelConfig dataConfig, |
204 const SkTArray<GrMipLevel>&); | 204 const SkTArray<GrMipLevel>&); |
205 | 205 |
206 SkAutoTUnref<const GrVkBackendContext> fBackendContext; | 206 SkAutoTUnref<const GrVkBackendContext> fBackendContext; |
207 SkAutoTUnref<GrVkCaps> fVkCaps; | 207 SkAutoTUnref<GrVkCaps> fVkCaps; |
208 | 208 |
209 // These Vulkan objects are provided by the client, and also stored in fBack
endContext. | 209 // These Vulkan objects are provided by the client, and also stored in fBack
endContext. |
210 // They're copied here for convenient access. | 210 // They're copied here for convenient access. |
211 #ifdef ENABLE_VK_LAYERS | |
212 VkInstance fVkInstance; | |
213 #endif | |
214 VkDevice fDevice; | 211 VkDevice fDevice; |
215 VkQueue fQueue; // Must be Graphics queue | 212 VkQueue fQueue; // Must be Graphics queue |
216 | 213 |
217 // Created by GrVkGpu | 214 // Created by GrVkGpu |
218 GrVkResourceProvider fResourceProvider; | 215 GrVkResourceProvider fResourceProvider; |
219 VkCommandPool fCmdPool; | 216 VkCommandPool fCmdPool; |
220 GrVkCommandBuffer* fCurrentCmdBuffer; | 217 GrVkCommandBuffer* fCurrentCmdBuffer; |
221 VkPhysicalDeviceMemoryProperties fPhysDevMemProps; | 218 VkPhysicalDeviceMemoryProperties fPhysDevMemProps; |
222 | 219 |
223 #ifdef ENABLE_VK_LAYERS | 220 #ifdef ENABLE_VK_LAYERS |
224 // For reporting validation layer errors | 221 // For reporting validation layer errors |
225 VkDebugReportCallbackEXT fCallback; | 222 VkDebugReportCallbackEXT fCallback; |
226 #endif | 223 #endif |
227 | 224 |
228 // Shaderc compiler used for compiling glsl in spirv. We only want to create
the compiler once | 225 // Shaderc compiler used for compiling glsl in spirv. We only want to create
the compiler once |
229 // since there is significant overhead to the first compile of any compiler. | 226 // since there is significant overhead to the first compile of any compiler. |
230 shaderc_compiler_t fCompiler; | 227 shaderc_compiler_t fCompiler; |
231 | 228 |
232 | 229 |
233 typedef GrGpu INHERITED; | 230 typedef GrGpu INHERITED; |
234 }; | 231 }; |
235 | 232 |
236 #endif | 233 #endif |
OLD | NEW |