forked from firka/flutter
[Impeller] Add shader include with FlutterFragCoord for use by FragmentProgram (#114214)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user