diff options
author | Brian Osman <brianosman@google.com> | 2018-01-12 10:16:41 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-12 19:26:00 +0000 |
commit | 1001f843a45e95f6df1d44242b6b06c77898e870 (patch) | |
tree | 492d437b075eac3cabb095f3d1f0401d28150ba1 /src/gpu/gl | |
parent | f4c13166de2ad3c67a4a391d8595b5c8fa04ad4d (diff) |
Added SkSL workaround for devices which cannot safely access gl_FragCoord
This is the root cause of https://github.com/flutter/flutter/issues/13216
I've got a GM that demonstrates the bug, but only in Viewer.
Bug: skia:7410
Change-Id: Iaa1f27b10166aa09e4dc5949e5a6ca1bd14c99ac
Reviewed-on: https://skia-review.googlesource.com/93920
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/gl')
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 4996859c51..d310cd219b 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -1048,6 +1048,12 @@ void GrGLCaps::initGLSL(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli shaderCaps->fMustGuardDivisionEvenAfterExplicitZeroCheck = true; } #endif + + // We've seen Adreno 3xx devices produce incorrect (flipped) values for gl_FragCoord, in some + // (rare) situations. It's sporadic, and mostly on older drviers. + if (kAdreno3xx_GrGLRenderer == ctxInfo.renderer()) { + shaderCaps->fCanUseFragCoord = false; + } } bool GrGLCaps::hasPathRenderingSupport(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) { |