Lines Matching refs:cbInfo
91 CommandBufferInfo& cbInfo = fCommandBufferInfos.push_back(); in init() local
98 cbInfo.fRenderPass = fGpu->resourceProvider().findRenderPass(rpHandle, in init()
102 cbInfo.fRenderPass = fGpu->resourceProvider().findRenderPass(*vkRT, in init()
107 cbInfo.fColorClearValue.color.float32[0] = fClearColor[0]; in init()
108 cbInfo.fColorClearValue.color.float32[1] = fClearColor[1]; in init()
109 cbInfo.fColorClearValue.color.float32[2] = fClearColor[2]; in init()
110 cbInfo.fColorClearValue.color.float32[3] = fClearColor[3]; in init()
113 cbInfo.fBounds = SkRect::MakeWH(vkRT->width(), vkRT->height()); in init()
115 cbInfo.fBounds.setEmpty(); in init()
119 cbInfo.fLoadStoreState = LoadStoreState::kStartsWithClear; in init()
122 cbInfo.fLoadStoreState = LoadStoreState::kLoadAndStore; in init()
124 cbInfo.fLoadStoreState = LoadStoreState::kStartsWithDiscard; in init()
127 cbInfo.fCommandBuffers.push_back(fGpu->cmdPool()->findOrCreateSecondaryCommandBuffer(fGpu)); in init()
128 cbInfo.currentCmdBuf()->begin(fGpu, vkRT->framebuffer(), cbInfo.fRenderPass); in init()
132 CommandBufferInfo& cbInfo = fCommandBufferInfos.push_back(); in initWrapped() local
138 cbInfo.fRenderPass = vkRT->externalRenderPass(); in initWrapped()
139 cbInfo.fRenderPass->ref(); in initWrapped()
141 cbInfo.fBounds.setEmpty(); in initWrapped()
142 cbInfo.fCommandBuffers.push_back(vkRT->getExternalSecondaryCommandBuffer()); in initWrapped()
143 cbInfo.fCommandBuffers[0]->ref(); in initWrapped()
144 cbInfo.currentCmdBuf()->begin(fGpu, nullptr, cbInfo.fRenderPass); in initWrapped()
169 CommandBufferInfo& cbInfo = fCommandBufferInfos[i]; in submit() local
171 for (int j = 0; j < cbInfo.fPreDrawUploads.count(); ++j) { in submit()
172 InlineUploadInfo& iuInfo = cbInfo.fPreDrawUploads[j]; in submit()
176 for (int j = 0; j < cbInfo.fPreCopies.count(); ++j) { in submit()
177 CopyInfo& copyInfo = cbInfo.fPreCopies[j]; in submit()
187 if (cbInfo.fIsEmpty && in submit()
188 cbInfo.fLoadStoreState != LoadStoreState::kStartsWithClear && in submit()
189 cbInfo.fLoadStoreState != LoadStoreState::kStartsWithDiscard) { in submit()
198 for (int j = 0; j < cbInfo.fSampledTextures.count(); ++j) { in submit()
199 cbInfo.fSampledTextures[j]->setImageLayout( in submit()
213 if (cbInfo.fIsEmpty && cbInfo.fLoadStoreState == LoadStoreState::kStartsWithDiscard) { in submit()
214 cbInfo.fBounds = SkRect::MakeWH(vkRT->width(), vkRT->height()); in submit()
217 if (cbInfo.fBounds.intersect(0, 0, in submit()
250 for (int j = 0; j < cbInfo.fSampledTextures.count(); ++j) { in submit()
251 cbInfo.fSampledTextures[j]->setImageLayout( in submit()
257 cbInfo.fBounds.roundOut(&iBounds); in submit()
259 fGpu->submitSecondaryCommandBuffer(cbInfo.fCommandBuffers, cbInfo.fRenderPass, in submit()
260 &cbInfo.fColorClearValue, vkRT, fOrigin, iBounds); in submit()
294 CommandBufferInfo& cbInfo = fCommandBufferInfos[i]; in reset() local
295 for (int j = 0; j < cbInfo.fCommandBuffers.count(); ++j) { in reset()
296 cbInfo.fCommandBuffers[j]->unref(fGpu); in reset()
298 cbInfo.fRenderPass->unref(fGpu); in reset()
318 CommandBufferInfo& cbInfo = fCommandBufferInfos[fCurrentCmdInfo]; in discard() local
319 if (cbInfo.fIsEmpty) { in discard()
326 const GrVkRenderPass* oldRP = cbInfo.fRenderPass; in discard()
331 cbInfo.fRenderPass = fGpu->resourceProvider().findRenderPass(rpHandle, in discard()
335 cbInfo.fRenderPass = fGpu->resourceProvider().findRenderPass(*vkRT, in discard()
340 SkASSERT(cbInfo.fRenderPass->isCompatible(*oldRP)); in discard()
342 cbInfo.fBounds.join(fRenderTarget->getBoundsRect()); in discard()
343 cbInfo.fLoadStoreState = LoadStoreState::kStartsWithDiscard; in discard()
346 cbInfo.fPreCopies.reset(); in discard()
357 CommandBufferInfo& cbInfo = fCommandBufferInfos[fCurrentCmdInfo]; in onClearStencilClip() local
396 SkAssertResult(cbInfo.fRenderPass->stencilAttachmentIndex(&stencilIndex)); in onClearStencilClip()
403 cbInfo.currentCmdBuf()->clearAttachments(fGpu, 1, &attachment, 1, &clearRect); in onClearStencilClip()
404 cbInfo.fIsEmpty = false; in onClearStencilClip()
408 cbInfo.fBounds.join(fRenderTarget->getBoundsRect()); in onClearStencilClip()
410 cbInfo.fBounds.join(SkRect::Make(clip.scissorRect())); in onClearStencilClip()
420 CommandBufferInfo& cbInfo = fCommandBufferInfos[fCurrentCmdInfo]; in onClear() local
424 if (cbInfo.fIsEmpty && !clip.scissorEnabled()) { in onClear()
431 const GrVkRenderPass* oldRP = cbInfo.fRenderPass; in onClear()
436 cbInfo.fRenderPass = fGpu->resourceProvider().findRenderPass(rpHandle, in onClear()
440 cbInfo.fRenderPass = fGpu->resourceProvider().findRenderPass(*vkRT, in onClear()
445 SkASSERT(cbInfo.fRenderPass->isCompatible(*oldRP)); in onClear()
448 cbInfo.fColorClearValue.color = {{color.fR, color.fG, color.fB, color.fA}}; in onClear()
449 cbInfo.fLoadStoreState = LoadStoreState::kStartsWithClear; in onClear()
452 cbInfo.fPreCopies.reset(); in onClear()
455 cbInfo.fBounds.join(fRenderTarget->getBoundsRect()); in onClear()
478 SkAssertResult(cbInfo.fRenderPass->colorAttachmentIndex(&colorIndex)); in onClear()
485 cbInfo.currentCmdBuf()->clearAttachments(fGpu, 1, &attachment, 1, &clearRect); in onClear()
486 cbInfo.fIsEmpty = false; in onClear()
490 cbInfo.fBounds.join(fRenderTarget->getBoundsRect()); in onClear()
492 cbInfo.fBounds.join(SkRect::Make(clip.scissorRect())); in onClear()
502 CommandBufferInfo& cbInfo = fCommandBufferInfos[fCurrentCmdInfo]; in addAdditionalCommandBuffer() local
503 cbInfo.currentCmdBuf()->end(fGpu); in addAdditionalCommandBuffer()
504 cbInfo.fCommandBuffers.push_back(fGpu->cmdPool()->findOrCreateSecondaryCommandBuffer(fGpu)); in addAdditionalCommandBuffer()
505 cbInfo.currentCmdBuf()->begin(fGpu, vkRT->framebuffer(), cbInfo.fRenderPass); in addAdditionalCommandBuffer()
513 CommandBufferInfo& cbInfo = fCommandBufferInfos.push_back(); in addAdditionalRenderPass() local
524 cbInfo.fRenderPass = fGpu->resourceProvider().findRenderPass(rpHandle, in addAdditionalRenderPass()
528 cbInfo.fRenderPass = fGpu->resourceProvider().findRenderPass(*vkRT, in addAdditionalRenderPass()
532 cbInfo.fLoadStoreState = LoadStoreState::kLoadAndStore; in addAdditionalRenderPass()
534 cbInfo.fCommandBuffers.push_back(fGpu->cmdPool()->findOrCreateSecondaryCommandBuffer(fGpu)); in addAdditionalRenderPass()
537 memset(&cbInfo.fColorClearValue, 0, sizeof(VkClearValue)); in addAdditionalRenderPass()
538 cbInfo.fBounds.setEmpty(); in addAdditionalRenderPass()
540 cbInfo.currentCmdBuf()->begin(fGpu, vkRT->framebuffer(), cbInfo.fRenderPass); in addAdditionalRenderPass()
553 CommandBufferInfo& cbInfo = fCommandBufferInfos[fCurrentCmdInfo]; in copy() local
554 if (!cbInfo.fIsEmpty || LoadStoreState::kStartsWithClear == cbInfo.fLoadStoreState) { in copy()
560 LoadStoreState::kStartsWithDiscard == cbInfo.fLoadStoreState); in copy()
562 if (LoadStoreState::kLoadAndStore != cbInfo.fLoadStoreState) { in copy()
569 const GrVkRenderPass* oldRP = cbInfo.fRenderPass; in copy()
575 cbInfo.fRenderPass = fGpu->resourceProvider().findRenderPass(rpHandle, in copy()
579 cbInfo.fRenderPass = fGpu->resourceProvider().findRenderPass(*vkRT, in copy()
583 SkASSERT(cbInfo.fRenderPass->isCompatible(*oldRP)); in copy()
586 cbInfo.fLoadStoreState = LoadStoreState::kLoadAndStore; in copy()
635 CommandBufferInfo& cbInfo = fCommandBufferInfos[fCurrentCmdInfo]; in prepareDrawState() local
636 SkASSERT(cbInfo.fRenderPass); in prepareDrawState()
638 VkRenderPass compatibleRenderPass = cbInfo.fRenderPass->vkRenderPass(); in prepareDrawState()
660 if (!cbInfo.fIsEmpty && in prepareDrawState()
667 pipelineState->bindPipeline(fGpu, cbInfo.currentCmdBuf()); in prepareDrawState()
670 primProc, pipeline, cbInfo.currentCmdBuf()); in prepareDrawState()
676 cbInfo.currentCmdBuf()); in prepareDrawState()
680 GrVkPipeline::SetDynamicScissorRectState(fGpu, cbInfo.currentCmdBuf(), in prepareDrawState()
686 GrVkPipeline::SetDynamicScissorRectState(fGpu, cbInfo.currentCmdBuf(), fRenderTarget, in prepareDrawState()
690 GrVkPipeline::SetDynamicViewportState(fGpu, cbInfo.currentCmdBuf(), fRenderTarget); in prepareDrawState()
691 GrVkPipeline::SetDynamicBlendConstantState(fGpu, cbInfo.currentCmdBuf(), in prepareDrawState()
709 CommandBufferInfo& cbInfo = fCommandBufferInfos[fCurrentCmdInfo]; in onDraw() local
727 cbInfo.fSampledTextures.push_back(sk_ref_sp(vkTexture)); in onDraw()
751 cbInfo.fSampledTextures.push_back(sk_ref_sp(static_cast<GrVkTexture*>(dstTexture))); in onDraw()
778 GrVkPipeline::SetDynamicScissorRectState(fGpu, cbInfo.currentCmdBuf(), fRenderTarget, in onDraw()
786 cbInfo.currentCmdBuf()); in onDraw()
792 cbInfo.fBounds.join(bounds); in onDraw()
793 cbInfo.fIsEmpty = false; in onDraw()
803 CommandBufferInfo& cbInfo = fCommandBufferInfos[fCurrentCmdInfo]; in sendInstancedMeshToGpu() local
809 cbInfo.currentCmdBuf()->draw(fGpu, vertexCount, instanceCount, baseVertex, baseInstance); in sendInstancedMeshToGpu()
824 CommandBufferInfo& cbInfo = fCommandBufferInfos[fCurrentCmdInfo]; in sendIndexedInstancedMeshToGpu() local
832 cbInfo.currentCmdBuf()->drawIndexed(fGpu, indexCount, instanceCount, in sendIndexedInstancedMeshToGpu()
844 CommandBufferInfo& cbInfo = fCommandBufferInfos[fCurrentCmdInfo]; in executeDrawable() local
850 vkInfo.fSecondaryCommandBuffer = cbInfo.currentCmdBuf()->vkCommandBuffer(); in executeDrawable()
851 vkInfo.fCompatibleRenderPass = cbInfo.fRenderPass->vkRenderPass(); in executeDrawable()
852 SkAssertResult(cbInfo.fRenderPass->colorAttachmentIndex(&vkInfo.fColorAttachmentIndex)); in executeDrawable()
864 cbInfo.currentCmdBuf()->invalidateState(); in executeDrawable()
866 cbInfo.fIsEmpty = false; in executeDrawable()
872 cbInfo.fBounds.join(target->getBoundsRect()); in executeDrawable()
874 cbInfo.fBounds.join(SkRect::MakeXYWH(bounds.offset.x, bounds.offset.y, in executeDrawable()