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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 void submitSecondaryCommandBuffer(const GrVkSecondaryCommandBuffer*, | 118 void submitSecondaryCommandBuffer(const GrVkSecondaryCommandBuffer*, |
119 const GrVkRenderPass*, | 119 const GrVkRenderPass*, |
120 const VkClearValue*, | 120 const VkClearValue*, |
121 GrVkRenderTarget*, | 121 GrVkRenderTarget*, |
122 const SkIRect& bounds); | 122 const SkIRect& bounds); |
123 | 123 |
124 void finishDrawTarget() override; | 124 void finishDrawTarget() override; |
125 | 125 |
126 void generateMipmap(GrVkTexture* tex) const; | 126 void generateMipmap(GrVkTexture* tex) const; |
127 | 127 |
| 128 bool updateBuffer(GrVkBuffer* buffer, const void* src, size_t srcSizeInBytes
); |
| 129 |
128 // Heaps | 130 // Heaps |
129 enum Heap { | 131 enum Heap { |
130 kLinearImage_Heap = 0, | 132 kLinearImage_Heap = 0, |
131 // We separate out small (i.e., <= 16K) images to reduce fragmentation | 133 // We separate out small (i.e., <= 16K) images to reduce fragmentation |
132 // in the main heap. | 134 // in the main heap. |
133 kOptimalImage_Heap, | 135 kOptimalImage_Heap, |
134 kSmallOptimalImage_Heap, | 136 kSmallOptimalImage_Heap, |
135 // We have separate vertex and image heaps, because it's possible that | 137 // We have separate vertex and image heaps, because it's possible that |
136 // a given Vulkan driver may allocate them separately. | 138 // a given Vulkan driver may allocate them separately. |
137 kVertexBuffer_Heap, | 139 kVertexBuffer_Heap, |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 | 244 |
243 // Shaderc compiler used for compiling glsl in spirv. We only want to create
the compiler once | 245 // Shaderc compiler used for compiling glsl in spirv. We only want to create
the compiler once |
244 // since there is significant overhead to the first compile of any compiler. | 246 // since there is significant overhead to the first compile of any compiler. |
245 shaderc_compiler_t fCompiler; | 247 shaderc_compiler_t fCompiler; |
246 | 248 |
247 | 249 |
248 typedef GrGpu INHERITED; | 250 typedef GrGpu INHERITED; |
249 }; | 251 }; |
250 | 252 |
251 #endif | 253 #endif |
OLD | NEW |