diff options
author | Robert Phillips <robertphillips@google.com> | 2018-01-30 13:13:42 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-30 13:13:56 +0000 |
commit | 7f861927fcd4f9fdef958b5ed9d50b1362ee3232 (patch) | |
tree | f7c60f611d039539676ae4eb2466d81798e81cd7 /src/gpu/GrProgramDesc.cpp | |
parent | 2f5b8d81c231ef4acb4b5671c0956a249f0ef4cf (diff) |
Revert "Drop support for unused MSAA extensions"
This reverts commit 7df27465c4ecc8a4a0cdd95e9785c342903c2de9.
Reason for revert: experimental revert to see if this is the cause of the tree redness
Original change's description:
> Drop support for unused MSAA extensions
>
> Bug: skia:
> Change-Id: I113b80e3f991f195155148625ceb29242ea82776
> Reviewed-on: https://skia-review.googlesource.com/101403
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
TBR=bsalomon@google.com,csmartdalton@google.com,ethannicholas@google.com
Change-Id: I4fa4123e2d176bef88cd76a09a14053d9ac5809f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/101680
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrProgramDesc.cpp')
-rw-r--r-- | src/gpu/GrProgramDesc.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gpu/GrProgramDesc.cpp b/src/gpu/GrProgramDesc.cpp index c3d61985de..9c0add66e6 100644 --- a/src/gpu/GrProgramDesc.cpp +++ b/src/gpu/GrProgramDesc.cpp @@ -169,6 +169,7 @@ bool GrProgramDesc::Build(GrProgramDesc* desc, desc->key().reset(); return false; } + GrProcessor::RequiredFeatures requiredFeatures = primProc.requiredFeatures(); for (int i = 0; i < pipeline.numFragmentProcessors(); ++i) { const GrFragmentProcessor& fp = pipeline.getFragmentProcessor(i); @@ -176,6 +177,7 @@ bool GrProgramDesc::Build(GrProgramDesc* desc, desc->key().reset(); return false; } + requiredFeatures |= fp.requiredFeatures(); } const GrXferProcessor& xp = pipeline.getXferProcessor(); @@ -190,6 +192,7 @@ bool GrProgramDesc::Build(GrProgramDesc* desc, desc->key().reset(); return false; } + requiredFeatures |= xp.requiredFeatures(); // --------DO NOT MOVE HEADER ABOVE THIS LINE-------------------------------------------------- // Because header is a pointer into the dynamic array, we can't push any new data into the key @@ -201,6 +204,16 @@ bool GrProgramDesc::Build(GrProgramDesc* desc, GrRenderTargetProxy* proxy = pipeline.proxy(); + if (requiredFeatures & GrProcessor::kSampleLocations_RequiredFeature) { + SkASSERT(pipeline.isHWAntialiasState()); + + GrRenderTarget* rt = pipeline.renderTarget(); + header->fSamplePatternKey = + rt->renderTargetPriv().getMultisampleSpecs(pipeline).fUniqueID; + } else { + header->fSamplePatternKey = 0; + } + header->fOutputSwizzle = shaderCaps.configOutputSwizzle(proxy->config()).asKey(); header->fSnapVerticesToPixelCenters = pipeline.snapVerticesToPixelCenters(); |