diff options
author | Brian Osman <brianosman@google.com> | 2018-04-17 14:22:15 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-18 19:13:13 +0000 |
commit | 061020eab431e9bf43fe47ace659fedf367c0745 (patch) | |
tree | 6080dd5d00f0a452f7487c58985b4fbd3f830434 /src/gpu | |
parent | b120e9291a7d43347ebce89de522a15771cd9dea (diff) |
With ES3, enable both ES2 and ES3 external image extensions
Bug: skia:7713
Change-Id: If06c0368e91c33bbac9e7715227d619c4834684f
Reviewed-on: https://skia-review.googlesource.com/121884
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/GrShaderCaps.cpp | 1 | ||||
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 13 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/gpu/GrShaderCaps.cpp b/src/gpu/GrShaderCaps.cpp index c0b34ab746..486909e028 100644 --- a/src/gpu/GrShaderCaps.cpp +++ b/src/gpu/GrShaderCaps.cpp @@ -57,6 +57,7 @@ GrShaderCaps::GrShaderCaps(const GrContextOptions& options) { fFragCoordConventionsExtensionString = nullptr; fSecondaryOutputExtensionString = nullptr; fExternalTextureExtensionString = nullptr; + fSecondExternalTextureExtensionString = nullptr; fTexelBufferExtensionString = nullptr; fNoPerspectiveInterpolationExtensionString = nullptr; fFBFetchColorName = nullptr; diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 3299416c5b..c569e031e2 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -2478,15 +2478,16 @@ void GrGLCaps::applyDriverCorrectnessWorkarounds(const GrGLContextInfo& ctxInfo, fInvalidateFBType = kNone_InvalidateFBType; } - // Various Samsung devices (Note4, S7, ...) don't advertise the image_external_essl3 extension, - // (only the base image_external extension), but do support it, and require that it be enabled - // to work with ESSL3. This has been seen on both Mali and Adreno devices. skbug.com/7713 + // 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. Enabling both extensions fixes both cases. + // skbug.com/7713 if (ctxInfo.hasExtension("GL_OES_EGL_image_external") && ctxInfo.glslGeneration() >= k330_GrGLSLGeneration && - !shaderCaps->fExternalTextureSupport && // i.e. Missing the _essl3 extension - (kARM_GrGLVendor == ctxInfo.vendor() || kQualcomm_GrGLVendor == ctxInfo.vendor())) { + !shaderCaps->fExternalTextureSupport) { // i.e. Missing the _essl3 extension shaderCaps->fExternalTextureSupport = true; - shaderCaps->fExternalTextureExtensionString = "GL_OES_EGL_image_external_essl3"; + shaderCaps->fExternalTextureExtensionString = "GL_OES_EGL_image_external"; + shaderCaps->fSecondExternalTextureExtensionString = "GL_OES_EGL_image_external_essl3"; } } |