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

Unified Diff: tests/GLProgramsTest.cpp

Issue 14233006: Perform coverage blend with the dst in the shader when using a dst-reading xfermode. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« src/gpu/gl/GrGLProgram.cpp ('K') | « src/gpu/gl/GrGLProgramDesc.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/GLProgramsTest.cpp
===================================================================
--- tests/GLProgramsTest.cpp (revision 8756)
+++ tests/GLProgramsTest.cpp (working copy)
@@ -54,12 +54,6 @@
fDiscardIfZeroCoverage = random->nextBool();
- if (gpu->caps()->dualSourceBlendingSupport()) {
- fDualSrcOutput = random->nextULessThan(kDualSrcOutputCnt);
- } else {
- fDualSrcOutput = kNone_DualSrcOutput;
- }
-
bool useLocalCoords = random->nextBool() && currAttribIndex < GrDrawState::kMaxVertexAttribCnt;
fLocalCoordAttributeIndex = useLocalCoords ? currAttribIndex++ : -1;
@@ -78,6 +72,17 @@
if (dstRead) {
this->fDstRead = GrGLShaderBuilder::KeyForDstRead(dstTexture, gpu->glCaps());
}
+
+ CoverageOutput coverageOutput;
+ bool illegalCoverageOutput;
+ do {
+ coverageOutput = static_cast<CoverageOutput>(random->nextULessThan(kCoverageOutputCnt));
+ illegalCoverageOutput = (!gpu->caps()->dualSourceBlendingSupport() &&
+ CoverageOutputUsesSecondaryOutput(coverageOutput)) ||
+ !dstRead && kCombineWithDst_CoverageOutput == coverageOutput;
+ } while (illegalCoverageOutput);
+
+ fCoverageOutput = coverageOutput;
}
bool GrGpuGL::programUnitTest(int maxStages) {
« src/gpu/gl/GrGLProgram.cpp ('K') | « src/gpu/gl/GrGLProgramDesc.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698