aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gpu/gl/GrGLContext.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLContext.cpp b/src/gpu/gl/GrGLContext.cpp
index ffbae86bc9..a2a5a3b130 100644
--- a/src/gpu/gl/GrGLContext.cpp
+++ b/src/gpu/gl/GrGLContext.cpp
@@ -53,6 +53,21 @@ std::unique_ptr<GrGLContext> GrGLContext::Make(sk_sp<const GrGLInterface> interf
args.fGLSLGeneration = k110_GrGLSLGeneration;
}
+ // Many ES3 drivers only advertise the ES2 image_external extension, but support the _essl3
+ // extension, and require that it be enabled to work with ESSL3. Other devices require the ES2
+ // extension to be enabled, even when using ESSL3. Some devices appear to only support the ES2
+ // extension. As an extreme (optional) solution, we can fallback to using ES2 shading language
+ // if we want to prioritize external texture support. skbug.com/7713
+ if (kGLES_GrGLStandard == interface->fStandard &&
+ options.fPreferExternalImagesOverES3 &&
+ !options.fDisableDriverCorrectnessWorkarounds &&
+ interface->hasExtension("GL_OES_EGL_image_external") &&
+ args.fGLSLGeneration >= k330_GrGLSLGeneration &&
+ !interface->hasExtension("GL_OES_EGL_image_external_essl3") &&
+ !interface->hasExtension("OES_EGL_image_external_essl3")) {
+ args.fGLSLGeneration = k110_GrGLSLGeneration;
+ }
+
GrGLGetDriverInfo(interface->fStandard, args.fVendor, renderer, ver,
&args.fDriver, &args.fDriverVersion);