Disable sampler objects when using ES2 shading language on ES3 contexts.

Bug: https://github.com/flutter/flutter/issues/24402
Bug: https://github.com/flutter/flutter/issues/24289
Bug: https://github.com/flutter/flutter/issues/24391
Bug: https://github.com/flutter/flutter/issues/24517
Bug: https://github.com/flutter/flutter/issues/23900

Change-Id: I15aa8241f0c4d4b25f00aed9f6fabbe73ecf89ce
Reviewed-on: https://skia-review.googlesource.com/c/172405
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This commit is contained in:
Brian Salomon 2018-11-21 13:26:57 -05:00 committed by Skia Commit-Bot
parent 95dec69511
commit a6dddeaac9

View File

@ -2737,6 +2737,17 @@ void GrGLCaps::applyDriverCorrectnessWorkarounds(const GrGLContextInfo& ctxInfo,
fDynamicStateArrayGeometryProcessorTextureSupport = false;
}
#endif
// There are reports of both Mali and Adreno 3xx Flutter users having issues drawing
// videos and other embedded content on older Android versions (6 and earlier) after sampler
// objects were enabled. We suspect this may relate to using sampler objects on ES3 with the ES2
// shading language. (We may limit the shading language because of issues around
// GL_OES_EGL_image_external_essl3 on older Android versions). We suspect this may be an
// under tested combination (sampler object + EXTERNAL_OES texture + ES2 shading language).
if (kGLES_GrGLStandard == ctxInfo.standard() && ctxInfo.version() >= GR_GL_VER(3, 0) &&
ctxInfo.glslGeneration() <= k110_GrGLSLGeneration) {
fSamplerObjectSupport = false;
}
}
void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {