@@ -13,7 +13,8 @@ import '../../../src/fake_process_manager.dart';
1313const String fragDir = '/shaders' ;
1414const String fragPath = '/shaders/my_shader.frag' ;
1515const String notFragPath = '/shaders/not_a_frag.file' ;
16- const String outputPath = '/output/shaders/my_shader.spv' ;
16+ const String outputSpirvPath = '/output/shaders/my_shader.frag.spirv' ;
17+ const String outputPath = '/output/shaders/my_shader.frag' ;
1718
1819void main () {
1920 late BufferLogger logger;
@@ -37,14 +38,17 @@ void main() {
3738 FakeCommand (
3839 command: < String > [
3940 impellerc,
40- '--flutter-spirv' ,
41- '--spirv=$outputPath ' ,
41+ '--sksl' ,
42+ '--iplr' ,
43+ '--sl=$outputPath ' ,
44+ '--spirv=$outputSpirvPath ' ,
4245 '--input=$fragPath ' ,
4346 '--input-type=frag' ,
4447 '--include=$fragDir ' ,
4548 ],
4649 onRun: () {
4750 fileSystem.file (outputPath).createSync (recursive: true );
51+ fileSystem.file (outputSpirvPath).createSync (recursive: true );
4852 },
4953 ),
5054 ]);
@@ -63,21 +67,25 @@ void main() {
6367 true ,
6468 );
6569 expect (fileSystem.file (outputPath).existsSync (), true );
70+ expect (fileSystem.file (outputSpirvPath).existsSync (), false );
6671 });
6772
6873 testWithoutContext ('compileShader invokes impellerc for non-.frag files' , () async {
6974 final FakeProcessManager processManager = FakeProcessManager .list (< FakeCommand > [
7075 FakeCommand (
7176 command: < String > [
7277 impellerc,
73- '--flutter-spirv' ,
74- '--spirv=$outputPath ' ,
78+ '--sksl' ,
79+ '--iplr' ,
80+ '--sl=$outputPath ' ,
81+ '--spirv=$outputSpirvPath ' ,
7582 '--input=$notFragPath ' ,
7683 '--input-type=frag' ,
7784 '--include=$fragDir ' ,
7885 ],
7986 onRun: () {
8087 fileSystem.file (outputPath).createSync (recursive: true );
88+ fileSystem.file (outputSpirvPath).createSync (recursive: true );
8189 },
8290 ),
8391 ]);
@@ -96,15 +104,18 @@ void main() {
96104 true ,
97105 );
98106 expect (fileSystem.file (outputPath).existsSync (), true );
107+ expect (fileSystem.file (outputSpirvPath).existsSync (), false );
99108 });
100109
101110 testWithoutContext ('compileShader throws an exception when impellerc fails' , () async {
102111 final FakeProcessManager processManager = FakeProcessManager .list (< FakeCommand > [
103112 FakeCommand (
104113 command: < String > [
105114 impellerc,
106- '--flutter-spirv' ,
107- '--spirv=$outputPath ' ,
115+ '--sksl' ,
116+ '--iplr' ,
117+ '--sl=$outputPath ' ,
118+ '--spirv=$outputSpirvPath ' ,
108119 '--input=$notFragPath ' ,
109120 '--input-type=frag' ,
110121 '--include=$fragDir ' ,
0 commit comments