Chromium Code Reviews| 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 "GrVkCommandBuffer.h" | 8 #include "GrVkCommandBuffer.h" |
| 9 | 9 |
| 10 #include "GrVkFramebuffer.h" | 10 #include "GrVkFramebuffer.h" |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 183 VK_PIPELINE_BIND_POINT_ GRAPHICS, | 183 VK_PIPELINE_BIND_POINT_ GRAPHICS, |
| 184 layout, | 184 layout, |
| 185 firstSet, | 185 firstSet, |
| 186 setCount, | 186 setCount, |
| 187 descriptorSets, | 187 descriptorSets, |
| 188 dynamicOffsetCount, | 188 dynamicOffsetCount, |
| 189 dynamicOffsets)); | 189 dynamicOffsets)); |
| 190 pipelineState->addUniformResources(*this); | 190 pipelineState->addUniformResources(*this); |
| 191 } | 191 } |
| 192 | 192 |
| 193 void GrVkCommandBuffer::bindDescriptorSets(const GrVkGpu* gpu, | |
|
jvanverth1
2016/09/26 17:26:11
Just making sure -- is there any way the descripto
egdaniel
2016/09/26 21:12:39
Just in the same way the descriptor sets we bind i
| |
| 194 const SkTArray<const GrVkRecycledReso urce*>& recycled, | |
| 195 const SkTArray<const GrVkResource*>& resources, | |
| 196 VkPipelineLayout layout, | |
| 197 uint32_t firstSet, | |
| 198 uint32_t setCount, | |
| 199 const VkDescriptorSet* descriptorSets , | |
| 200 uint32_t dynamicOffsetCount, | |
| 201 const uint32_t* dynamicOffsets) { | |
| 202 SkASSERT(fIsActive); | |
| 203 GR_VK_CALL(gpu->vkInterface(), CmdBindDescriptorSets(fCmdBuffer, | |
| 204 VK_PIPELINE_BIND_POINT_ GRAPHICS, | |
| 205 layout, | |
| 206 firstSet, | |
| 207 setCount, | |
| 208 descriptorSets, | |
| 209 dynamicOffsetCount, | |
| 210 dynamicOffsets)); | |
| 211 for (int i = 0; i < recycled.count(); ++i) { | |
| 212 this->addRecycledResource(recycled[i]); | |
| 213 } | |
| 214 for (int i = 0; i < resources.count(); ++i) { | |
| 215 this->addResource(resources[i]); | |
| 216 } | |
| 217 } | |
| 218 | |
| 193 void GrVkCommandBuffer::bindPipeline(const GrVkGpu* gpu, const GrVkPipeline* pip eline) { | 219 void GrVkCommandBuffer::bindPipeline(const GrVkGpu* gpu, const GrVkPipeline* pip eline) { |
| 194 SkASSERT(fIsActive); | 220 SkASSERT(fIsActive); |
| 195 GR_VK_CALL(gpu->vkInterface(), CmdBindPipeline(fCmdBuffer, | 221 GR_VK_CALL(gpu->vkInterface(), CmdBindPipeline(fCmdBuffer, |
| 196 VK_PIPELINE_BIND_POINT_GRAPHI CS, | 222 VK_PIPELINE_BIND_POINT_GRAPHI CS, |
| 197 pipeline->pipeline())); | 223 pipeline->pipeline())); |
| 198 this->addResource(pipeline); | 224 this->addResource(pipeline); |
| 199 } | 225 } |
| 200 | 226 |
| 201 void GrVkCommandBuffer::drawIndexed(const GrVkGpu* gpu, | 227 void GrVkCommandBuffer::drawIndexed(const GrVkGpu* gpu, |
| 202 uint32_t indexCount, | 228 uint32_t indexCount, |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 660 fIsActive = true; | 686 fIsActive = true; |
| 661 } | 687 } |
| 662 | 688 |
| 663 void GrVkSecondaryCommandBuffer::end(const GrVkGpu* gpu) { | 689 void GrVkSecondaryCommandBuffer::end(const GrVkGpu* gpu) { |
| 664 SkASSERT(fIsActive); | 690 SkASSERT(fIsActive); |
| 665 GR_VK_CALL_ERRCHECK(gpu->vkInterface(), EndCommandBuffer(fCmdBuffer)); | 691 GR_VK_CALL_ERRCHECK(gpu->vkInterface(), EndCommandBuffer(fCmdBuffer)); |
| 666 this->invalidateState(); | 692 this->invalidateState(); |
| 667 fIsActive = false; | 693 fIsActive = false; |
| 668 } | 694 } |
| 669 | 695 |
| OLD | NEW |