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

Unified Diff: src/gpu/gl/GrGLProgram.cpp

Issue 154623002: Stop discarding in frag shader when coverage is zero and stencil writes are enabled (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: save all the files Created 6 years, 10 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
« no previous file with comments | « no previous file | src/gpu/gl/GrGLProgramDesc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLProgram.cpp
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index cac38b4bddcf3c4445e58ddab0cbfcd3d42fa58f..6e9878a91949873a0b69bb113d65888c9ce0f2d7 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -120,17 +120,6 @@ bool GrGLProgram::genProgram(GrGLShaderBuilder* builder,
fDesc.numCoverageEffects(),
&inCoverage));
- // discard if coverage is zero
- if (header.fDiscardIfZeroCoverage && !inCoverage.isOnes()) {
- if (inCoverage.isZeros()) {
- // This is unfortunate.
- builder->fsCodeAppend("\tdiscard;\n");
- } else {
- builder->fsCodeAppendf("\tif (all(lessThanEqual(%s, vec4(0.0)))) {\n\t\tdiscard;\n\t}\n",
- inCoverage.c_str());
- }
- }
-
if (GrGLProgramDesc::CoverageOutputUsesSecondaryOutput(header.fCoverageOutput)) {
const char* secondaryOutputName = builder->enableSecondaryOutput();
« no previous file with comments | « no previous file | src/gpu/gl/GrGLProgramDesc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698