Driver bug workaround: gl_clear_broken

Skia does not appear to use depth buffers and this appears to be
identical to ClearFramebufferResourceManager::ClearFramebuffer in
Chromium code.  Therefore, just hook up this workaround to turn
on these internal Skia workarounds.

Bug: chromium: 829614
Change-Id: Icc5f2eb981e39ffef487efa16940d2e50cdbc399
Reviewed-on: https://skia-review.googlesource.com/127220
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adrienne Walker <enne@chromium.org>
This commit is contained in:
Adrienne Walker 2018-05-15 11:47:07 -07:00 committed by Skia Commit-Bot
parent 3c6087ccf4
commit 94f585ed09
3 changed files with 8 additions and 0 deletions

View File

@ -12,6 +12,8 @@
disable_discard_framebuffer) \
GPU_OP(DISALLOW_LARGE_INSTANCED_DRAW, \
disallow_large_instanced_draw) \
GPU_OP(GL_CLEAR_BROKEN, \
gl_clear_broken) \
GPU_OP(MAX_MSAA_SAMPLE_COUNT_4, \
max_msaa_sample_count_4) \
GPU_OP(MAX_TEXTURE_SIZE_LIMIT_4096, \

View File

@ -2450,6 +2450,11 @@ void GrGLCaps::applyDriverCorrectnessWorkarounds(const GrGLContextInfo& ctxInfo,
fDisallowTexSubImageForUnormConfigTexturesEverBoundToFBO = true;
}
if (fDriverBugWorkarounds.gl_clear_broken) {
fUseDrawToClearColor = true;
fUseDrawToClearStencilClip = true;
}
// This was reproduced on the following configurations:
// - A Galaxy J5 (Adreno 306) running Android 6 with driver 140.0
// - A Nexus 7 2013 (Adreno 320) running Android 5 with driver 104.0

View File

@ -1,6 +1,7 @@
disable_blend_equation_advanced
disable_discard_framebuffer
disallow_large_instanced_draw
gl_clear_broken
max_msaa_sample_count_4
max_texture_size_limit_4096
restore_scissor_on_fbo_change