Limit Adreno 4xx stencil clear workaround to older drivers
Bug: skia:5587
Change-Id: I00f377c06228deb9053b1cf7d9f413e0bf2fb490
Reviewed-on: https://skia-review.googlesource.com/18936
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 44d2529..0f3d7ad 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -512,7 +512,11 @@
if (kAdreno4xx_GrGLRenderer == ctxInfo.renderer()) {
fUseDrawInsteadOfPartialRenderTargetWrite = true;
- fUseDrawToClearStencilClip = true;
+ // This is known to be fixed sometime between driver 145.0 and 219.0
+ if (ctxInfo.driver() == kQualcomm_GrGLDriver &&
+ ctxInfo.driverVersion() <= GR_GL_DRIVER_VER(219, 0)) {
+ fUseDrawToClearStencilClip = true;
+ }
}
// Texture uploads sometimes seem to be ignored to textures bound to FBOS on Tegra3.