Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 84ed058

Browse files
[flutter_tools] Add remap sampler support (#116861)
1 parent d1436d1 commit 84ed058

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

packages/flutter_tools/lib/src/build_system/targets/shader_compiler.dart

+1
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ class ShaderCompiler {
186186
'--spirv=$outputPath.spirv',
187187
'--input=${input.path}',
188188
'--input-type=frag',
189+
'--remap-samplers',
189190
'--include=${input.parent.path}',
190191
'--include=$shaderLibPath',
191192
];

packages/flutter_tools/test/general.shard/asset_bundle_test.dart

+2
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ flutter:
453453
'--spirv=$outputPath.spirv',
454454
'--input=/$shaderPath',
455455
'--input-type=frag',
456+
'--remap-samplers',
456457
'--include=/$assetsPath',
457458
'--include=$shaderLibDir',
458459
],
@@ -541,6 +542,7 @@ flutter:
541542
'--spirv=${fileSystem.path.join(output.path, 'shaders', 'ink_sparkle.frag.spirv')}',
542543
'--input=${fileSystem.path.join(materialDir.path, 'shaders', 'ink_sparkle.frag')}',
543544
'--input-type=frag',
545+
'--remap-samplers',
544546
'--include=${fileSystem.path.join(materialDir.path, 'shaders')}',
545547
'--include=$shaderLibDir',
546548
],

packages/flutter_tools/test/general.shard/build_system/targets/ios_test.dart

+1
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ void main() {
262262
'--spirv=/App.framework/flutter_assets/shader.glsl.spirv',
263263
'--input=/shader.glsl',
264264
'--input-type=frag',
265+
'--remap-samplers',
265266
'--include=/',
266267
'--include=/./shader_lib',
267268
]),

packages/flutter_tools/test/general.shard/build_system/targets/shader_compiler_test.dart

+8
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ void main() {
5050
'--spirv=$outputSpirvPath',
5151
'--input=$fragPath',
5252
'--input-type=frag',
53+
'--remap-samplers',
5354
'--include=$fragDir',
5455
'--include=$shaderLibDir',
5556
],
@@ -90,6 +91,7 @@ void main() {
9091
'--spirv=$outputPath.spirv',
9192
'--input=$fragPath',
9293
'--input-type=frag',
94+
'--remap-samplers',
9395
'--include=$fragDir',
9496
'--include=$shaderLibDir',
9597
],
@@ -128,6 +130,7 @@ void main() {
128130
'--spirv=$outputPath.spirv',
129131
'--input=$fragPath',
130132
'--input-type=frag',
133+
'--remap-samplers',
131134
'--include=$fragDir',
132135
'--include=$shaderLibDir',
133136
],
@@ -166,6 +169,7 @@ void main() {
166169
'--spirv=$outputSpirvPath',
167170
'--input=$notFragPath',
168171
'--input-type=frag',
172+
'--remap-samplers',
169173
'--include=$fragDir',
170174
'--include=$shaderLibDir',
171175
],
@@ -206,6 +210,7 @@ void main() {
206210
'--spirv=$outputSpirvPath',
207211
'--input=$notFragPath',
208212
'--input-type=frag',
213+
'--remap-samplers',
209214
'--include=$fragDir',
210215
'--include=$shaderLibDir',
211216
],
@@ -248,6 +253,7 @@ void main() {
248253
'--spirv=/.tmp_rand0/0.8255140718871702.temp.spirv',
249254
'--input=$fragPath',
250255
'--input-type=frag',
256+
'--remap-samplers',
251257
'--include=$fragDir',
252258
'--include=$shaderLibDir',
253259
],
@@ -293,6 +299,7 @@ void main() {
293299
'--spirv=/.tmp_rand0/0.8255140718871702.temp.spirv',
294300
'--input=$fragPath',
295301
'--input-type=frag',
302+
'--remap-samplers',
296303
'--include=$fragDir',
297304
'--include=$shaderLibDir',
298305
],
@@ -339,6 +346,7 @@ void main() {
339346
'--spirv=/.tmp_rand0/0.8255140718871702.temp.spirv',
340347
'--input=$fragPath',
341348
'--input-type=frag',
349+
'--remap-samplers',
342350
'--include=$fragDir',
343351
'--include=$shaderLibDir',
344352
],

0 commit comments

Comments
 (0)