File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
engine/src/flutter/impeller/compiler Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 2626namespace impeller {
2727namespace compiler {
2828
29+ namespace {
30+ constexpr const char * kEGLImageExternalExtension = " GL_OES_EGL_image_external" ;
31+ constexpr const char * kEGLImageExternalExtension300 =
32+ " GL_OES_EGL_image_external_essl3" ;
33+ } // namespace
34+
2935static uint32_t ParseMSLVersion (const std::string& msl_version) {
3036 std::stringstream sstream (msl_version);
3137 std::string version_part;
@@ -147,7 +153,11 @@ static CompilerBackend CreateGLSLCompiler(const spirv_cross::ParsedIR& ir,
147153 // incompatible with ES 310+.
148154 for (auto & id : ir.ids_for_constant_or_variable ) {
149155 if (StringStartsWith (ir.get_name (id), kExternalTexturePrefix )) {
150- gl_compiler->require_extension (" GL_OES_EGL_image_external" );
156+ if (source_options.gles_language_version >= 300 ) {
157+ gl_compiler->require_extension (kEGLImageExternalExtension300 );
158+ } else {
159+ gl_compiler->require_extension (kEGLImageExternalExtension );
160+ }
151161 break ;
152162 }
153163 }
You can’t perform that action at this time.
0 commit comments