void GrVkRenderTarget::addResources(GrVkCommandBuffer& commandBuffer) const { commandBuffer.addResource(this->framebuffer()); commandBuffer.addResource(this->colorAttachmentView()); commandBuffer.addResource(this->msaaImageResource() ? this->msaaImageResource() : this->resource()); if (this->stencilImageResource()) { commandBuffer.addResource(this->stencilImageResource()); commandBuffer.addResource(this->stencilAttachmentView()); } }
void GrVkPipelineState::addUniformResources(GrVkCommandBuffer& commandBuffer) { if (fSamplerPoolManager.fPool) { commandBuffer.addResource(fSamplerPoolManager.fPool); } if (fCurrentUniformDescPool) { commandBuffer.addResource(fCurrentUniformDescPool); } if (fVertexUniformBuffer.get()) { commandBuffer.addResource(fVertexUniformBuffer->resource()); } if (fFragmentUniformBuffer.get()) { commandBuffer.addResource(fFragmentUniformBuffer->resource()); } for (int i = 0; i < fSamplers.count(); ++i) { commandBuffer.addResource(fSamplers[i]); } for (int i = 0; i < fTextureViews.count(); ++i) { commandBuffer.addResource(fTextureViews[i]); } for (int i = 0; i < fTextures.count(); ++i) { commandBuffer.addResource(fTextures[i]); } }
void GrVkProgram::addUniformResources(GrVkCommandBuffer& commandBuffer) { #if 1 commandBuffer.addResource(fDescriptorPool); if (fVertexUniformBuffer.get()) { commandBuffer.addResource(fVertexUniformBuffer->resource()); } if (fFragmentUniformBuffer.get()) { commandBuffer.addResource(fFragmentUniformBuffer->resource()); } for (int i = 0; i < fSamplers.count(); ++i) { commandBuffer.addResource(fSamplers[i]); } for (int i = 0; i < fTextureViews.count(); ++i) { commandBuffer.addResource(fTextureViews[i]); } for (int i = 0; i < fTextures.count(); ++i) { commandBuffer.addResource(fTextures[i]); } #endif }