diff options
author | bsalomon <bsalomon@google.com> | 2015-08-12 11:14:50 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-12 11:14:50 -0700 |
commit | cb02b38b2c48bfde333ce3c699dd0451e2d867fa (patch) | |
tree | fe4c1f40874588934ae4b07405dcdc9fc456bfa8 /src/gpu/GrReorderCommandBuilder.cpp | |
parent | 6028a8476504022fe40b6870b1460b5e4a80969f (diff) |
Check for xfer barriers in GrBatch, auto-issue barriers in GrGpu
Review URL: https://codereview.chromium.org/1287973003
Diffstat (limited to 'src/gpu/GrReorderCommandBuilder.cpp')
-rw-r--r-- | src/gpu/GrReorderCommandBuilder.cpp | 5 |
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; |