[impellerc] Generate GLSL output for the runtime-stage-gles target (flutter/engine#39602)

This commit is contained in:
Jason Simmons
2023-02-14 11:24:33 -08:00
committed by GitHub
parent 4beb3bd963
commit cf1add3a71

View File

@@ -91,7 +91,8 @@ static CompilerBackend CreateGLSLCompiler(const spirv_cross::ParsedIR& ir,
spirv_cross::CompilerGLSL::Options sl_options;
sl_options.force_zero_initialized_variables = true;
sl_options.vertex.fixup_clipspace = true;
if (source_options.target_platform == TargetPlatform::kOpenGLES) {
if (source_options.target_platform == TargetPlatform::kOpenGLES ||
source_options.target_platform == TargetPlatform::kRuntimeStageGLES) {
sl_options.version = source_options.gles_language_version > 0
? source_options.gles_language_version
: 100;
@@ -137,13 +138,13 @@ static CompilerBackend CreateCompiler(const spirv_cross::ParsedIR& ir,
case TargetPlatform::kMetalDesktop:
case TargetPlatform::kMetalIOS:
case TargetPlatform::kRuntimeStageMetal:
case TargetPlatform::kRuntimeStageGLES:
case TargetPlatform::kVulkan:
compiler = CreateMSLCompiler(ir, source_options);
break;
case TargetPlatform::kUnknown:
case TargetPlatform::kOpenGLES:
case TargetPlatform::kOpenGLDesktop:
case TargetPlatform::kRuntimeStageGLES:
compiler = CreateGLSLCompiler(ir, source_options);
break;
case TargetPlatform::kSkSL: