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

Side by Side Diff: tests/GLProgramsTest.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: Add Xfer barriers with glTextureBarrier instead of dst copies Created 5 years, 8 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 unified diff | Download patch
« src/gpu/gl/GrGLGpu.cpp ('K') | « src/gpu/gl/GrGLGpu.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 // This is a GPU-backend specific test. It relies on static intializers to work 9 // This is a GPU-backend specific test. It relies on static intializers to work
10 10
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 return false; 309 return false;
310 } 310 }
311 311
312 // create optimized draw state, setup readDst texture if required, and b uild a descriptor 312 // create optimized draw state, setup readDst texture if required, and b uild a descriptor
313 // and program. ODS creation can fail, so we have to check 313 // and program. ODS creation can fail, so we have to check
314 GrPipeline pipeline(pipelineBuilder, colorPOI, coveragePOI, 314 GrPipeline pipeline(pipelineBuilder, colorPOI, coveragePOI,
315 *gpu->caps(), scissor, &dstCopy); 315 *gpu->caps(), scissor, &dstCopy);
316 if (pipeline.mustSkip()) { 316 if (pipeline.mustSkip()) {
317 continue; 317 continue;
318 } 318 }
319
320 GrXferBarrierType barrierType;
321 if (pipeline.getXferProcessor()->willNeedXferBarrier(rt, *gpu->caps(), & barrierType)) {
322 gpu->setXferBarrier(barrierType);
323 }
324
319 GrBatchTracker bt; 325 GrBatchTracker bt;
320 primProc->initBatchTracker(&bt, pipeline.getInitBatchTracker()); 326 primProc->initBatchTracker(&bt, pipeline.getInitBatchTracker());
321 327
322 GrProgramDesc desc; 328 GrProgramDesc desc;
323 gpu->buildProgramDesc(&desc, *primProc, pipeline, bt); 329 gpu->buildProgramDesc(&desc, *primProc, pipeline, bt);
324 330
325 GrGpu::DrawArgs args(primProc, &pipeline, &desc, &bt); 331 GrGpu::DrawArgs args(primProc, &pipeline, &desc, &bt);
326 SkAutoTUnref<GrGLProgram> program(GrGLProgramBuilder::CreateProgram(args , gpu)); 332 SkAutoTUnref<GrGLProgram> program(GrGLProgramBuilder::CreateProgram(args , gpu));
327 333
328 if (NULL == program.get()) { 334 if (NULL == program.get()) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 } 379 }
374 #endif 380 #endif
375 GrTestTarget target; 381 GrTestTarget target;
376 context->getTestTarget(&target); 382 context->getTestTarget(&target);
377 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages )); 383 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages ));
378 } 384 }
379 } 385 }
380 } 386 }
381 387
382 #endif 388 #endif
OLDNEW
« src/gpu/gl/GrGLGpu.cpp ('K') | « src/gpu/gl/GrGLGpu.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698