Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
e9529e25
Unverified
Commit
e9529e25
authored
Jul 19, 2022
by
Zachary Anderson
Committed by
GitHub
Jul 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tool] Allow includes relative to shader path (#107862)
parent
6bd3e6e0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
shader_compiler.dart
...r_tools/lib/src/build_system/targets/shader_compiler.dart
+1
-0
asset_bundle_test.dart
...s/flutter_tools/test/general.shard/asset_bundle_test.dart
+5
-2
shader_compiler_test.dart
...eral.shard/build_system/targets/shader_compiler_test.dart
+4
-0
No files found.
packages/flutter_tools/lib/src/build_system/targets/shader_compiler.dart
View file @
e9529e25
...
...
@@ -68,6 +68,7 @@ class ShaderCompiler {
'--spirv=
$outputPath
'
,
'--input=
${input.path}
'
,
'--input-type=frag'
,
'--include=
${input.parent.path}
'
,
];
final
Process
impellercProcess
=
await
_processManager
.
start
(
cmd
);
final
int
code
=
await
impellercProcess
.
exitCode
;
...
...
packages/flutter_tools/test/general.shard/asset_bundle_test.dart
View file @
e9529e25
...
...
@@ -397,6 +397,7 @@ flutter:
late
Artifacts
artifacts
;
late
String
impellerc
;
late
Directory
output
;
late
String
assetsPath
;
late
String
shaderPath
;
late
String
outputPath
;
...
...
@@ -408,8 +409,9 @@ flutter:
fileSystem
.
file
(
impellerc
).
createSync
(
recursive:
true
);
output
=
fileSystem
.
directory
(
'asset_output'
)..
createSync
(
recursive:
true
);
shaderPath
=
fileSystem
.
path
.
join
(
'assets'
,
'shader.frag'
);
outputPath
=
fileSystem
.
path
.
join
(
output
.
path
,
'assets'
,
'shader.frag'
);
assetsPath
=
'assets'
;
shaderPath
=
fileSystem
.
path
.
join
(
assetsPath
,
'shader.frag'
);
outputPath
=
fileSystem
.
path
.
join
(
output
.
path
,
assetsPath
,
'shader.frag'
);
fileSystem
.
file
(
shaderPath
).
createSync
(
recursive:
true
);
});
...
...
@@ -445,6 +447,7 @@ flutter:
'--spirv=
$outputPath
'
,
'--input=/
$shaderPath
'
,
'--input-type=frag'
,
'--include=/
$assetsPath
'
,
],
onRun:
()
{
fileSystem
.
file
(
outputPath
).
createSync
(
recursive:
true
);
...
...
packages/flutter_tools/test/general.shard/build_system/targets/shader_compiler_test.dart
View file @
e9529e25
...
...
@@ -10,6 +10,7 @@ import 'package:flutter_tools/src/build_system/targets/shader_compiler.dart';
import
'../../../src/common.dart'
;
import
'../../../src/fake_process_manager.dart'
;
const
String
fragDir
=
'/shaders'
;
const
String
fragPath
=
'/shaders/my_shader.frag'
;
const
String
notFragPath
=
'/shaders/not_a_frag.file'
;
const
String
outputPath
=
'/output/shaders/my_shader.spv'
;
...
...
@@ -40,6 +41,7 @@ void main() {
'--spirv=
$outputPath
'
,
'--input=
$fragPath
'
,
'--input-type=frag'
,
'--include=
$fragDir
'
,
],
onRun:
()
{
fileSystem
.
file
(
outputPath
).
createSync
(
recursive:
true
);
...
...
@@ -72,6 +74,7 @@ void main() {
'--spirv=
$outputPath
'
,
'--input=
$notFragPath
'
,
'--input-type=frag'
,
'--include=
$fragDir
'
,
],
onRun:
()
{
fileSystem
.
file
(
outputPath
).
createSync
(
recursive:
true
);
...
...
@@ -104,6 +107,7 @@ void main() {
'--spirv=
$outputPath
'
,
'--input=
$notFragPath
'
,
'--input-type=frag'
,
'--include=
$fragDir
'
,
],
exitCode:
1
,
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment