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 GrVkCommandBuffer_DEFINED | 8 #ifndef GrVkCommandBuffer_DEFINED |
9 #define GrVkCommandBuffer_DEFINED | 9 #define GrVkCommandBuffer_DEFINED |
10 | 10 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 uint32_t instanceCount, | 153 uint32_t instanceCount, |
154 uint32_t firstIndex, | 154 uint32_t firstIndex, |
155 int32_t vertexOffset, | 155 int32_t vertexOffset, |
156 uint32_t firstInstance) const; | 156 uint32_t firstInstance) const; |
157 | 157 |
158 void draw(const GrVkGpu* gpu, | 158 void draw(const GrVkGpu* gpu, |
159 uint32_t vertexCount, | 159 uint32_t vertexCount, |
160 uint32_t instanceCount, | 160 uint32_t instanceCount, |
161 uint32_t firstVertex, | 161 uint32_t firstVertex, |
162 uint32_t firstInstance) const; | 162 uint32_t firstInstance) const; |
163 | 163 |
164 // Add ref-counted resource that will be tracked and released when this | 164 // Add ref-counted resource that will be tracked and released when this |
165 // command buffer finishes execution | 165 // command buffer finishes execution |
166 void addResource(const GrVkResource* resource) { | 166 void addResource(const GrVkResource* resource) { |
167 resource->ref(); | 167 resource->ref(); |
168 fTrackedResources.push_back(resource); | 168 fTrackedResources.push_back(resource); |
169 } | 169 } |
170 | 170 |
171 private: | 171 private: |
172 static const int kInitialTrackedResourcesCount = 32; | 172 static const int kInitialTrackedResourcesCount = 32; |
173 | 173 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 const GrVkRenderPass* fActiveRenderPass; | 206 const GrVkRenderPass* fActiveRenderPass; |
207 | 207 |
208 // Cached values used for dynamic state updates | 208 // Cached values used for dynamic state updates |
209 VkViewport fCachedViewport; | 209 VkViewport fCachedViewport; |
210 VkRect2D fCachedScissor; | 210 VkRect2D fCachedScissor; |
211 float fCachedBlendConstant[4]; | 211 float fCachedBlendConstant[4]; |
212 }; | 212 }; |
213 | 213 |
214 | 214 |
215 #endif | 215 #endif |
216 | |
OLD | NEW |