diff options
author | Brian Salomon <bsalomon@google.com> | 2017-06-07 09:42:52 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-07 14:04:10 +0000 |
commit | b52fa02227d8e7413d174bc5b3808f795d0215f0 (patch) | |
tree | b66a9d0aad0986b9cab43091ee9b6b10222adbdd /src/gpu | |
parent | b15ef6f149232c93303c691b22c9bf368b1043f2 (diff) |
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>
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 6 | ||||
-rw-r--r-- | src/gpu/gl/GrGLUtil.cpp | 10 | ||||
-rw-r--r-- | src/gpu/gl/GrGLUtil.h | 1 |
3 files changed, 16 insertions, 1 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 44d25299ae..0f3d7add82 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -512,7 +512,11 @@ void GrGLCaps::init(const GrContextOptions& contextOptions, 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. diff --git a/src/gpu/gl/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp index cf4615ad86..6da7c20aec 100644 --- a/src/gpu/gl/GrGLUtil.cpp +++ b/src/gpu/gl/GrGLUtil.cpp @@ -173,6 +173,16 @@ void GrGLGetDriverInfo(GrGLStandard standard, // We presume we're on the Intel driver since it hasn't identified itself as Mesa. *outDriver = kIntel_GrGLDriver; } + + if (kQualcomm_GrGLVendor == vendor) { + *outDriver = kQualcomm_GrGLDriver; + int n = sscanf(versionString, "OpenGL ES %d.%d V@%d.%d", &major, &minor, &driverMajor, + &driverMinor); + if (4 == n) { + *outVersion = GR_GL_DRIVER_VER(driverMajor, driverMinor); + } + return; + } } GrGLVersion GrGLGetVersionFromString(const char* versionString) { diff --git a/src/gpu/gl/GrGLUtil.h b/src/gpu/gl/GrGLUtil.h index fc2594a3a0..b798385cf6 100644 --- a/src/gpu/gl/GrGLUtil.h +++ b/src/gpu/gl/GrGLUtil.h @@ -68,6 +68,7 @@ enum GrGLDriver { kNVIDIA_GrGLDriver, kIntel_GrGLDriver, kANGLE_GrGLDriver, + kQualcomm_GrGLDriver, kUnknown_GrGLDriver }; |