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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
561 SkASSERT(!fActiveRenderPass); | 561 SkASSERT(!fActiveRenderPass); |
562 this->addResource(image->resource()); | 562 this->addResource(image->resource()); |
563 GR_VK_CALL(gpu->vkInterface(), CmdClearDepthStencilImage(fCmdBuffer, | 563 GR_VK_CALL(gpu->vkInterface(), CmdClearDepthStencilImage(fCmdBuffer, |
564 image->image(), | 564 image->image(), |
565 image->currentLayou t(), | 565 image->currentLayou t(), |
566 color, | 566 color, |
567 subRangeCount, | 567 subRangeCount, |
568 subRanges)); | 568 subRanges)); |
569 } | 569 } |
570 | 570 |
571 void GrVkPrimaryCommandBuffer::resolveImage(GrVkGpu* gpu | |
572 const GrVkImage& srcImage, | |
573 const GrVkImage& dstImage, | |
574 uint32_t regionCount, | |
575 const VkImageResolve* regions) { | |
576 SkASSERT(fIsActive); | |
577 SkASSERT(!fActiveRenderPass); | |
578 | |
579 this->addResource(srcImage.resource()); | |
580 this->addResource(dstImage.resource()); | |
581 | |
582 GR_VK_CALL(gpu->vkInterface(), CmdResolveImage(fCmdBuffer, | |
jvanverth1
2016/08/04 19:00:48
Do we need to transition the image layouts to anyt
egdaniel
2016/08/04 19:16:17
ahh yes good catch. layouts changed in GrVkGpu::on
| |
583 srcImage.image(), | |
584 srcImage.currentLayout(), | |
585 dstImage.image(), | |
586 dstImage.currentLayout(), | |
587 regionCount, | |
588 regions)); | |
589 } | |
590 | |
571 void GrVkPrimaryCommandBuffer::onFreeGPUData(const GrVkGpu* gpu) const { | 591 void GrVkPrimaryCommandBuffer::onFreeGPUData(const GrVkGpu* gpu) const { |
572 SkASSERT(!fActiveRenderPass); | 592 SkASSERT(!fActiveRenderPass); |
573 // Destroy the fence, if any | 593 // Destroy the fence, if any |
574 if (VK_NULL_HANDLE != fSubmitFence) { | 594 if (VK_NULL_HANDLE != fSubmitFence) { |
575 GR_VK_CALL(gpu->vkInterface(), DestroyFence(gpu->device(), fSubmitFence, nullptr)); | 595 GR_VK_CALL(gpu->vkInterface(), DestroyFence(gpu->device(), fSubmitFence, nullptr)); |
576 } | 596 } |
577 } | 597 } |
578 | 598 |
579 /////////////////////////////////////////////////////////////////////////////// | 599 /////////////////////////////////////////////////////////////////////////////// |
580 // SecondaryCommandBuffer | 600 // SecondaryCommandBuffer |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
631 fIsActive = true; | 651 fIsActive = true; |
632 } | 652 } |
633 | 653 |
634 void GrVkSecondaryCommandBuffer::end(const GrVkGpu* gpu) { | 654 void GrVkSecondaryCommandBuffer::end(const GrVkGpu* gpu) { |
635 SkASSERT(fIsActive); | 655 SkASSERT(fIsActive); |
636 GR_VK_CALL_ERRCHECK(gpu->vkInterface(), EndCommandBuffer(fCmdBuffer)); | 656 GR_VK_CALL_ERRCHECK(gpu->vkInterface(), EndCommandBuffer(fCmdBuffer)); |
637 this->invalidateState(); | 657 this->invalidateState(); |
638 fIsActive = false; | 658 fIsActive = false; |
639 } | 659 } |
640 | 660 |
OLD | NEW |