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

Unified Diff: src/gpu/gl/GrGLProgramDesc.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 | « src/gpu/gl/GrGLProgramDesc.h ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLProgramDesc.cpp
diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp
index 381461a03b60e7c90bdc06925e924b4e4c3499d0..b6029fe4ee193befd5e1d426c0b4e01dcc80e95e 100644
--- a/src/gpu/gl/GrGLProgramDesc.cpp
+++ b/src/gpu/gl/GrGLProgramDesc.cpp
@@ -215,8 +215,7 @@ void GrGLProgramDesc::Build(const GrDrawState& drawState,
// Here we deal with whether/how we handle color and coverage separately.
- // Set these defaults and then possibly change our mind if there is coverage.
- header->fDiscardIfZeroCoverage = false;
+ // Set this default and then possibly change our mind if there is coverage.
header->fCoverageOutput = kModulate_CoverageOutput;
// If we do have coverage determine whether it matters.
@@ -224,12 +223,6 @@ void GrGLProgramDesc::Build(const GrDrawState& drawState,
if (!drawState.isCoverageDrawing() && !skipCoverage &&
(drawState.numCoverageStages() > 0 || requiresCoverageAttrib)) {
- // If we're stenciling then we want to discard samples that have zero coverage
- if (drawState.getStencil().doesWrite()) {
- header->fDiscardIfZeroCoverage = true;
- separateCoverageFromColor = true;
- }
-
if (gpu->caps()->dualSourceBlendingSupport() &&
!(blendOpts & (GrDrawState::kEmitCoverage_BlendOptFlag |
GrDrawState::kCoverageAsAlpha_BlendOptFlag))) {
« no previous file with comments | « src/gpu/gl/GrGLProgramDesc.h ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698