[Impeller] Add shader include with FlutterFragCoord for use by FragmentProgram (#114214)

This commit is contained in:
Brandon DeRosier
2022-11-14 21:38:46 -08:00
committed by GitHub
parent 9d64a0f40b
commit e9c6212da0
5 changed files with 23 additions and 3 deletions

View File

@@ -54,7 +54,7 @@ class DevelopmentShaderCompiler {
void configureCompiler(TargetPlatform? platform, { required bool enableImpeller }) {
switch (platform) {
case TargetPlatform.ios:
_shaderTarget = enableImpeller ? ShaderTarget.impelleriOS : ShaderTarget.sksl;
_shaderTarget = ShaderTarget.impelleriOS;
break;
case TargetPlatform.android_arm64:
case TargetPlatform.android_x64:
@@ -175,6 +175,8 @@ class ShaderCompiler {
);
}
final String shaderLibPath = _fs.path.join(_fs.path.dirname(impellerc.path), 'shader_lib');
final List<String> cmd = <String>[
impellerc.path,
target.target,
@@ -186,6 +188,7 @@ class ShaderCompiler {
'--input=${input.path}',
'--input-type=frag',
'--include=${input.parent.path}',
'--include=$shaderLibPath',
];
final Process impellercProcess = await _processManager.start(cmd);
final int code = await impellercProcess.exitCode;