aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrReorderCommandBuilder.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-08-12 11:14:50 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-12 11:14:50 -0700
commitcb02b38b2c48bfde333ce3c699dd0451e2d867fa (patch)
treefe4c1f40874588934ae4b07405dcdc9fc456bfa8 /src/gpu/GrReorderCommandBuilder.cpp
parent6028a8476504022fe40b6870b1460b5e4a80969f (diff)
Check for xfer barriers in GrBatch, auto-issue barriers in GrGpu
Diffstat (limited to 'src/gpu/GrReorderCommandBuilder.cpp')
-rw-r--r--src/gpu/GrReorderCommandBuilder.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gpu/GrReorderCommandBuilder.cpp b/src/gpu/GrReorderCommandBuilder.cpp
index 29b450063a..2da7f85f89 100644
--- a/src/gpu/GrReorderCommandBuilder.cpp
+++ b/src/gpu/GrReorderCommandBuilder.cpp
@@ -15,7 +15,8 @@ static bool intersect(const Left& a, const Right& b) {
a.fTop < b.fBottom && b.fTop < a.fBottom;
}
-GrTargetCommands::Cmd* GrReorderCommandBuilder::recordDrawBatch(GrBatch* batch) {
+GrTargetCommands::Cmd* GrReorderCommandBuilder::recordDrawBatch(GrBatch* batch,
+ const GrCaps& caps) {
// Check if there is a Batch Draw we can batch with by linearly searching back until we either
// 1) check every draw
// 2) intersect with something
@@ -58,7 +59,7 @@ GrTargetCommands::Cmd* GrReorderCommandBuilder::recordDrawBatch(GrBatch* batch)
break;
}
// We cannot continue to search backwards if the render target changes
- if (previous->batch()->combineIfPossible(batch)) {
+ if (previous->batch()->combineIfPossible(batch, caps)) {
GrBATCH_INFO("\t\tCombining with (%s, B%u)\n",
previous->fBatch->name(), previous->fBatch->uniqueID());
return NULL;