forked from firka/flutter
[flutter_tool] Build shaders as .iplr and use FragmentProgram.fromAsset for ink_sparkle (#108071)
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
import 'package:process/process.dart';
|
||||
|
||||
import '../../artifacts.dart';
|
||||
import '../../base/error_handling_io.dart';
|
||||
import '../../base/file_system.dart';
|
||||
import '../../base/io.dart';
|
||||
import '../../base/logger.dart';
|
||||
@@ -64,8 +65,10 @@ class ShaderCompiler {
|
||||
// TODO(zanderso): When impeller is enabled, the correct flags for the
|
||||
// target backend will need to be passed.
|
||||
// https://github.com/flutter/flutter/issues/102853
|
||||
'--flutter-spirv',
|
||||
'--spirv=$outputPath',
|
||||
'--sksl',
|
||||
'--iplr',
|
||||
'--sl=$outputPath',
|
||||
'--spirv=$outputPath.spirv',
|
||||
'--input=${input.path}',
|
||||
'--input-type=frag',
|
||||
'--include=${input.parent.path}',
|
||||
@@ -81,6 +84,7 @@ class ShaderCompiler {
|
||||
);
|
||||
}
|
||||
|
||||
ErrorHandlingFileSystem.deleteIfExists(_fs.file('$outputPath.spirv'));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user