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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 GR_VK_CALL(gpu->vkInterface(), CmdBindIndexBuffer(fCmdBuffer, | 75 GR_VK_CALL(gpu->vkInterface(), CmdBindIndexBuffer(fCmdBuffer, |
76 vkBuffer, | 76 vkBuffer, |
77 0, | 77 0, |
78 VK_INDEX_TYPE_UINT
16)); | 78 VK_INDEX_TYPE_UINT
16)); |
79 fBoundIndexBufferIsValid = true; | 79 fBoundIndexBufferIsValid = true; |
80 fBoundIndexBuffer = vkBuffer; | 80 fBoundIndexBuffer = vkBuffer; |
81 addResource(ibuffer->resource()); | 81 addResource(ibuffer->resource()); |
82 } | 82 } |
83 } | 83 } |
84 | 84 |
| 85 void bindPipeline(const GrVkGpu* gpu, const GrVkPipeline* pipeline); |
| 86 |
85 void bindDescriptorSets(const GrVkGpu* gpu, | 87 void bindDescriptorSets(const GrVkGpu* gpu, |
86 GrVkPipelineState*, | 88 GrVkPipelineState*, |
87 VkPipelineLayout layout, | 89 VkPipelineLayout layout, |
88 uint32_t firstSet, | 90 uint32_t firstSet, |
89 uint32_t setCount, | 91 uint32_t setCount, |
90 const VkDescriptorSet* descriptorSets, | 92 const VkDescriptorSet* descriptorSets, |
91 uint32_t dynamicOffsetCount, | 93 uint32_t dynamicOffsetCount, |
92 const uint32_t* dynamicOffsets); | 94 const uint32_t* dynamicOffsets); |
93 | 95 |
94 void setViewport(const GrVkGpu* gpu, | 96 void setViewport(const GrVkGpu* gpu, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 uint32_t copyRegionCount, | 149 uint32_t copyRegionCount, |
148 const VkBufferImageCopy* copyRegions); | 150 const VkBufferImageCopy* copyRegions); |
149 | 151 |
150 // Commands that only work inside of a render pass | 152 // Commands that only work inside of a render pass |
151 void clearAttachments(const GrVkGpu* gpu, | 153 void clearAttachments(const GrVkGpu* gpu, |
152 int numAttachments, | 154 int numAttachments, |
153 const VkClearAttachment* attachments, | 155 const VkClearAttachment* attachments, |
154 int numRects, | 156 int numRects, |
155 const VkClearRect* clearRects) const; | 157 const VkClearRect* clearRects) const; |
156 | 158 |
157 void bindPipeline(const GrVkGpu* gpu, const GrVkPipeline* pipeline); | |
158 | |
159 | |
160 void drawIndexed(const GrVkGpu* gpu, | 159 void drawIndexed(const GrVkGpu* gpu, |
161 uint32_t indexCount, | 160 uint32_t indexCount, |
162 uint32_t instanceCount, | 161 uint32_t instanceCount, |
163 uint32_t firstIndex, | 162 uint32_t firstIndex, |
164 int32_t vertexOffset, | 163 int32_t vertexOffset, |
165 uint32_t firstInstance) const; | 164 uint32_t firstInstance) const; |
166 | 165 |
167 void draw(const GrVkGpu* gpu, | 166 void draw(const GrVkGpu* gpu, |
168 uint32_t vertexCount, | 167 uint32_t vertexCount, |
169 uint32_t instanceCount, | 168 uint32_t instanceCount, |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 const GrVkRenderPass* fActiveRenderPass; | 214 const GrVkRenderPass* fActiveRenderPass; |
216 | 215 |
217 // Cached values used for dynamic state updates | 216 // Cached values used for dynamic state updates |
218 VkViewport fCachedViewport; | 217 VkViewport fCachedViewport; |
219 VkRect2D fCachedScissor; | 218 VkRect2D fCachedScissor; |
220 float fCachedBlendConstant[4]; | 219 float fCachedBlendConstant[4]; |
221 }; | 220 }; |
222 | 221 |
223 | 222 |
224 #endif | 223 #endif |
OLD | NEW |