diff options
author | Brian Osman <brianosman@google.com> | 2018-05-07 17:07:35 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-05-08 19:28:34 +0000 |
commit | 71a6995084bd493622f4c701db1bf82edb15e062 (patch) | |
tree | 91234b58610b26fa1dcb44db5d4981392edda041 /src/gpu/gl/GrGLCaps.cpp | |
parent | 2700779c531fac93eb24484bd4437a77557d4c68 (diff) |
Only enable noperspective with ES3 shading language
This will never happen in real usage - the extension
requires ES3 support. However, we're likely to be
testing/running with ES3 and ES2 shading language to
work around driver bugs on other devices. Across many
devices, this was the only issue I found when forcing
ES2 shading language, so it seemed worth fixing.
Change-Id: I8b75c6935827c1a24c712cec4b36515581aea353
Reviewed-on: https://skia-review.googlesource.com/126640
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/gl/GrGLCaps.cpp')
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index a01531501e..4b77fc0421 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -735,7 +735,8 @@ void GrGLCaps::initGLSL(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli shaderCaps->fNoPerspectiveInterpolationSupport = ctxInfo.glslGeneration() >= k130_GrGLSLGeneration; } else { - if (ctxInfo.hasExtension("GL_NV_shader_noperspective_interpolation")) { + if (ctxInfo.hasExtension("GL_NV_shader_noperspective_interpolation") && + ctxInfo.glslGeneration() >= k330_GrGLSLGeneration /* GLSL ES 3.0 */) { shaderCaps->fNoPerspectiveInterpolationSupport = true; shaderCaps->fNoPerspectiveInterpolationExtensionString = "GL_NV_shader_noperspective_interpolation"; |