gpu: Disable dual source blending support on buggy driver versions.
R=bsalomon@google.com Bug:1027981 Change-Id: I1f0704451fadcd845a0f8845d728f4b8986d88ec Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261211 Auto-Submit: Khushal Sagar <khushalsagar@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Khushal Sagar <khushalsagar@chromium.org>
This commit is contained in:
parent
9c4ee9c79a
commit
988db63351
@ -12,6 +12,8 @@
|
||||
disable_blend_equation_advanced) \
|
||||
GPU_OP(DISABLE_DISCARD_FRAMEBUFFER, \
|
||||
disable_discard_framebuffer) \
|
||||
GPU_OP(DISABLE_DUAL_SOURCE_BLENDING_SUPPORT, \
|
||||
disable_dual_source_blending_support) \
|
||||
GPU_OP(DISABLE_TEXTURE_STORAGE, \
|
||||
disable_texture_storage) \
|
||||
GPU_OP(DISALLOW_LARGE_INSTANCED_DRAW, \
|
||||
|
@ -352,9 +352,10 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
|
||||
|
||||
// Enable supported shader-related caps
|
||||
if (GR_IS_GR_GL(standard)) {
|
||||
shaderCaps->fDualSourceBlendingSupport = (version >= GR_GL_VER(3, 3) ||
|
||||
ctxInfo.hasExtension("GL_ARB_blend_func_extended")) &&
|
||||
ctxInfo.glslGeneration() >= k130_GrGLSLGeneration;
|
||||
shaderCaps->fDualSourceBlendingSupport =
|
||||
(version >= GR_GL_VER(3, 3) ||
|
||||
ctxInfo.hasExtension("GL_ARB_blend_func_extended")) &&
|
||||
ctxInfo.glslGeneration() >= k130_GrGLSLGeneration;
|
||||
|
||||
shaderCaps->fShaderDerivativeSupport = true;
|
||||
|
||||
@ -3583,6 +3584,10 @@ void GrGLCaps::applyDriverCorrectnessWorkarounds(const GrGLContextInfo& ctxInfo,
|
||||
shaderCaps->fRemovePowWithConstantExponent = true;
|
||||
}
|
||||
|
||||
if (fDriverBugWorkarounds.disable_dual_source_blending_support) {
|
||||
shaderCaps->fDualSourceBlendingSupport = false;
|
||||
}
|
||||
|
||||
if (kAdreno3xx_GrGLRenderer == ctxInfo.renderer() ||
|
||||
kAdreno4xx_other_GrGLRenderer == ctxInfo.renderer()) {
|
||||
shaderCaps->fMustWriteToFragColor = true;
|
||||
|
@ -15,3 +15,4 @@ restore_scissor_on_fbo_change
|
||||
rewrite_do_while_loops
|
||||
unbind_attachments_on_bound_render_fbo_delete
|
||||
unfold_short_circuit_as_ternary_operation
|
||||
disable_dual_source_blending_support
|
||||
|
Loading…
Reference in New Issue
Block a user