Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 1040303002: Use texture barriers to read directly from the RT (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_zz1_reverseiter
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrGpu.h » ('j') | src/gpu/GrGpu.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.cpp
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 420f9eae669f71dc9a12b69da08ebac28a3b933a..86b75d518590a40c91181e7676a97cb2f49b68ab 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -470,6 +470,10 @@ void GrDrawTarget::drawIndexed(GrPipelineBuilder* pipelineBuilder,
return;
}
+ if (!pipelineBuilder->willBlendCoherently(*this->caps())) {
egdaniel 2015/03/31 14:23:41 So I feel like somewhere we need to be checking th
Chris Dalton 2015/03/31 17:06:42 That seems fine. What about "requiresBlendBarrier(
Mark Kilgard 2015/04/02 23:02:38 Two cents: I like the shorter requiresBlendBarrier
+ this->onBlendBarrier();
+ }
+
this->setDrawBuffers(&info, gp->getVertexStride());
this->onDraw(gp, info, pipelineInfo);
@@ -515,6 +519,10 @@ void GrDrawTarget::drawNonIndexed(GrPipelineBuilder* pipelineBuilder,
return;
}
+ if (!pipelineBuilder->willBlendCoherently(*this->caps())) {
+ this->onBlendBarrier();
+ }
+
this->setDrawBuffers(&info, gp->getVertexStride());
this->onDraw(gp, info, pipelineInfo);
@@ -541,6 +549,10 @@ void GrDrawTarget::drawBatch(GrPipelineBuilder* pipelineBuilder,
return;
}
+ if (!pipelineBuilder->willBlendCoherently(*this->caps())) {
+ this->onBlendBarrier();
+ }
+
this->onDrawBatch(batch, pipelineInfo);
}
@@ -806,6 +818,10 @@ void GrDrawTarget::drawIndexedInstances(GrPipelineBuilder* pipelineBuilder,
return;
}
+ if (!pipelineBuilder->willBlendCoherently(*this->caps())) {
+ this->onBlendBarrier();
+ }
+
this->setDrawBuffers(&info, gp->getVertexStride());
this->onDraw(gp, info, pipelineInfo);
}
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrGpu.h » ('j') | src/gpu/GrGpu.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698