Re-enable opList dependency tracking
Change-Id: I0fa1bbaed565a0d7de8d4475ed1d2baf200b285f Reviewed-on: https://skia-review.googlesource.com/20700 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
parent
8744405448
commit
d261e1075a
@ -85,31 +85,18 @@ void GrPipeline::init(const InitArgs& args) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MDB TODO: re-enable when TextureSamplers store texture proxies
|
void GrPipeline::addDependenciesTo(GrOpList* opList, const GrCaps& caps) const {
|
||||||
#if 0
|
|
||||||
static void add_dependencies_for_processor(const GrFragmentProcessor* proc,
|
|
||||||
GrRenderTargetProxy* rtp) {
|
|
||||||
GrFragmentProcessor::TextureAccessIter iter(proc);
|
|
||||||
while (const GrResourceIOProcessor::TextureSampler* sampler = iter.next()) {
|
|
||||||
SkASSERT(rtp->getLastOpList());
|
|
||||||
rtp->getLastOpList()->addDependency(sampler->proxy());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void GrPipeline::addDependenciesTo(GrRenderTargetProxy* rtp) const {
|
|
||||||
// MDB TODO: re-enable when TextureSamplers store texture proxies
|
|
||||||
#if 0
|
|
||||||
for (int i = 0; i < fFragmentProcessors.count(); ++i) {
|
for (int i = 0; i < fFragmentProcessors.count(); ++i) {
|
||||||
add_dependencies_for_processor(fFragmentProcessors[i].get(), rtp);
|
GrFragmentProcessor::TextureAccessIter iter(fFragmentProcessors[i].get());
|
||||||
|
while (const GrResourceIOProcessor::TextureSampler* sampler = iter.next()) {
|
||||||
|
opList->addDependency(sampler->proxy(), caps);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (fDstTextureProxy) {
|
if (fDstTextureProxy) {
|
||||||
//SkASSERT(rtp->getLastOpList());
|
opList->addDependency(fDstTextureProxy.get(), caps);
|
||||||
// MDB TODO: re-enable when TextureSamplers store texture proxies
|
|
||||||
//rtp->getLastOpList()->addDependency(fDstTexture.get());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GrXferBarrierType GrPipeline::xferBarrierType(const GrCaps& caps) const {
|
GrXferBarrierType GrPipeline::xferBarrierType(const GrCaps& caps) const {
|
||||||
|
@ -150,9 +150,8 @@ public:
|
|||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
/// @name GrFragmentProcessors
|
/// @name GrFragmentProcessors
|
||||||
|
|
||||||
// Make the renderTarget's GrOpList (if it exists) be dependent on any
|
// Make the renderTargetContext's GrOpList be dependent on any GrOpLists in this pipeline
|
||||||
// GrOpLists in this pipeline
|
void addDependenciesTo(GrOpList* recipient, const GrCaps&) const;
|
||||||
void addDependenciesTo(GrRenderTargetProxy*) const;
|
|
||||||
|
|
||||||
int numColorFragmentProcessors() const { return fNumColorProcessors; }
|
int numColorFragmentProcessors() const { return fNumColorProcessors; }
|
||||||
int numCoverageFragmentProcessors() const {
|
int numCoverageFragmentProcessors() const {
|
||||||
|
@ -1872,7 +1872,7 @@ uint32_t GrRenderTargetContext::addLegacyMeshDrawOp(GrPipelineBuilder&& pipeline
|
|||||||
op->initPipeline(args, analysis, overrideColor);
|
op->initPipeline(args, analysis, overrideColor);
|
||||||
|
|
||||||
// Add the pipeline dependencies on textures, etc before recording this op.
|
// Add the pipeline dependencies on textures, etc before recording this op.
|
||||||
op->addDependenciesTo(fRenderTargetProxy.get());
|
op->addDependenciesTo(this->getOpList(), *this->caps());
|
||||||
|
|
||||||
op->setClippedBounds(bounds);
|
op->setClippedBounds(bounds);
|
||||||
return this->getOpList()->addOp(std::move(op), *this->caps());
|
return this->getOpList()->addOp(std::move(op), *this->caps());
|
||||||
|
@ -119,8 +119,8 @@ public:
|
|||||||
this->applyPipelineOptimizations(PipelineOptimizations(analysis, overrideColor));
|
this->applyPipelineOptimizations(PipelineOptimizations(analysis, overrideColor));
|
||||||
}
|
}
|
||||||
|
|
||||||
void addDependenciesTo(GrRenderTargetProxy* rtp) {
|
void addDependenciesTo(GrOpList* opList, const GrCaps& caps) {
|
||||||
fPipeline.addDependenciesTo(rtp);
|
fPipeline.addDependenciesTo(opList, caps);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user