Reland "Driver bug workaround: disable_blend_equation_advanced"

This is a reland of f31fece658

Original change's description:
> Driver bug workaround: disable_blend_equation_advanced
>
> Bug: chromium: 829614
> Change-Id: If8eaec6d22412ec36aad8a143f84080be05f2926
> Reviewed-on: https://skia-review.googlesource.com/126748
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Adrienne Walker <enne@chromium.org>

Bug: chromium: 829614
Change-Id: Idd36ff90a99336521ef5d47f0d7baf079c1bda09
Reviewed-on: https://skia-review.googlesource.com/128107
Commit-Queue: Adrienne Walker <enne@chromium.org>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Adrienne Walker <enne@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This commit is contained in:
Adrienne Walker 2018-05-14 14:02:53 -07:00 committed by Skia Commit-Bot
parent 6e9f34f0e0
commit 683148419e
4 changed files with 14 additions and 6 deletions

View File

@ -6,8 +6,10 @@
// DO NOT EDIT!
#define GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP)\
GPU_OP(AVOID_STENCIL_BUFFERS, \
avoid_stencil_buffers) \
GPU_OP(CLEAR_TO_ZERO_OR_ONE_BROKEN, \
clear_to_zero_or_one_broken) \
GPU_OP(AVOID_STENCIL_BUFFERS, \
avoid_stencil_buffers) \
GPU_OP(CLEAR_TO_ZERO_OR_ONE_BROKEN, \
clear_to_zero_or_one_broken) \
GPU_OP(DISABLE_BLEND_EQUATION_ADVANCED, \
disable_blend_equation_advanced) \
// The End

View File

@ -331,6 +331,8 @@ protected:
int fMaxWindowRectangles;
int fMaxClipAnalyticFPs;
GrDriverBugWorkarounds fDriverBugWorkarounds;
private:
virtual void onApplyOptionsOverrides(const GrContextOptions&) {}
virtual void onDumpJSON(SkJSONWriter*) const {}
@ -344,8 +346,6 @@ private:
bool fSuppressPrints : 1;
bool fWireframeMode : 1;
GrDriverBugWorkarounds fDriverBugWorkarounds;
typedef SkRefCnt INHERITED;
};

View File

@ -2624,6 +2624,11 @@ void GrGLCaps::applyDriverCorrectnessWorkarounds(const GrGLContextInfo& ctxInfo,
shaderCaps->fAdvBlendEqInteraction = GrShaderCaps::kNotSupported_AdvBlendEqInteraction;
}
if (fDriverBugWorkarounds.disable_blend_equation_advanced) {
fBlendEquationSupport = kBasic_BlendEquationSupport;
shaderCaps->fAdvBlendEqInteraction = GrShaderCaps::kNotSupported_AdvBlendEqInteraction;
}
if (this->advancedBlendEquationSupport()) {
if (kNVIDIA_GrGLDriver == ctxInfo.driver() &&
ctxInfo.driverVersion() < GR_GL_DRIVER_VER(355, 00, 0)) {

View File

@ -1,2 +1,3 @@
avoid_stencil_buffers
disable_blend_equation_advanced
clear_to_zero_or_one_broken