diff options
| author | cdalton <cdalton@nvidia.com> | 2015-04-29 14:17:00 -0700 |
|---|---|---|
| committer | Commit bot <commit-bot@chromium.org> | 2015-04-29 14:17:00 -0700 |
| commit | 9954bc38c498f6b9e9d8c0bcc5cd00d45bfc6e23 (patch) | |
| tree | f88d88bad3884d979e595a6a462e21cf89b4bdc9 /tests/GLProgramsTest.cpp | |
| parent | dbc3cefb0b624808ddb86d444e6103f216e12fa5 (diff) | |
Use texture barriers to read directly from the RT
Updates GrXferProcessor to read directly from the RT texture when
texture barriers are supported and it needs to know the dst color.
Also adds the notion of an Xfer barrier and uses it to issue texture
barriers when the XP will read the RT.
BUG=skia:
Review URL: https://codereview.chromium.org/1040303002
Diffstat (limited to 'tests/GLProgramsTest.cpp')
| -rw-r--r-- | tests/GLProgramsTest.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp index bc3da6d9ee..c12e5e8781 100644 --- a/tests/GLProgramsTest.cpp +++ b/tests/GLProgramsTest.cpp @@ -304,6 +304,12 @@ bool GrDrawTarget::programUnitTest(int maxStages) { if (pipeline.mustSkip()) { continue; } + + GrXferBarrierType barrierType; + if (pipeline.getXferProcessor()->willNeedXferBarrier(rt, *gpu->caps(), &barrierType)) { + gpu->xferBarrier(barrierType); + } + GrBatchTracker bt; primProc->initBatchTracker(&bt, pipeline.getInitBatchTracker()); |
