Skip to content

Make compileShader() retry without sksl if it fails with sksl.#183146

Merged
auto-submit[bot] merged 2 commits into
flutter:masterfrom
b-luk:impellercwarn
Mar 4, 2026
Merged

Make compileShader() retry without sksl if it fails with sksl.#183146
auto-submit[bot] merged 2 commits into
flutter:masterfrom
b-luk:impellercwarn

Conversation

@b-luk

@b-luk b-luk commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

Updates compileShader() in shader_compiler.dart to retry impellerc without sksl if calling it with sksl fails.

Fixes #182400

Running an app with a non-sksl-compatible shader:
❯ flutter run -d mac
Launching lib/main.dart on macOS in debug mode...
warning: Shader `/Users/bensonluk/projects/hello_flutter/shaders/simple.frag` is incompatible with SkSL. This shader will not load when running with the Skia backend.
impellerc failure: There was a compiler error: SkSL does not support array initializers: /Users/bensonluk/projects/hello_flutter/shaders/simple.frag:12
Project /Users/bensonluk/projects/hello_flutter built and packaged successfully.
Building macOS application...
✓ Built build/macos/Build/Products/Debug/hello_flutter.app
2026-03-03 11:38:35.093 hello_flutter[76976:83279294] Running with merged UI and platform thread. Experimental.
Failed to foreground app; open returned 1
Syncing files to device macOS...                                    39ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on macOS is available at: http://127.0.0.1:57483/Nr_RN4azQw8=/
The Flutter DevTools debugger and profiler on macOS is available at: http://127.0.0.1:57483/Nr_RN4azQw8=/devtools/?uri=ws://127.0.0.1:57483/Nr_RN4azQw8=/ws
Running an app with multiple non-sksl-compatible shaders with longer error messages:
❯ flutter run -d mac
Launching lib/main.dart on macOS in debug mode...
warning: Shader `/Users/bensonluk/projects/flutter_liquid_glass/packages/liquid_glass_renderer/lib/assets/shaders/liquid_glass_arbitrary.frag` is incompatible with SkSL. This shader will not load when running with the Skia backend.
impellerc failure: Compilation failed for target: SkSL
"/Users/bensonluk/projects/flutter_liquid_glass/packages/liquid_glass_renderer/lib/assets/shaders/liquid_glass_arbitrary.frag":
Compiled to invalid SkSL:
        // This SkSL shader is autogenerated by spirv-cross.

        float4 flutter_FragCoord;

        uniform vec2 uSize;
        uniform vec2 uForegroundSize;
... (truncated 426 lines)
SkSL Error:
        error: 58: loop index initializer must be a constant expression
                for (int x = _703; x <= sampleRadius; x++)
                     ^^^^^^^^^^^^
        error: 55: loop index initializer must be a constant expression
            for (int y = _692; y <= sampleRadius; y++)
                 ^^^^^^^^^^^^
... (truncated 350 lines)
Full "liquid_glass_arbitrary" error output written to "/tmp/flutter_4Te755VI/impellerc_verbose_error.txt"

warning: Shader `/Users/bensonluk/projects/flutter_liquid_glass/packages/liquid_glass_renderer/lib/assets/shaders/liquid_glass_geometry_blended.frag` is incompatible with SkSL. This shader will not load when running with the Skia backend.
impellerc failure: Compilation failed for target: SkSL
"/Users/bensonluk/projects/flutter_liquid_glass/packages/liquid_glass_renderer/lib/assets/shaders/liquid_glass_geometry_blended.frag":
Compiled to invalid SkSL:
        // This SkSL shader is autogenerated by spirv-cross.

        float4 flutter_FragCoord;

        uniform vec2 uSize;
        uniform vec4 uOpticalProps;
... (truncated 229 lines)
SkSL Error:
        error: 111: initializers are not permitted on arrays (or structs containing arrays)
            float param_2[96] = shapeData;
                                ^^^^^^^^^
        error: 112: unknown identifier 'param_2'
            float result = FLT_flutter_local_getShapeSDFFromArray(param, param_1, param_2);
                                                                                  ^^^^^^^
... (truncated 185 lines)
Full "liquid_glass_geometry_blended" error output written to "/tmp/flutter_3qE1Q4aI/impellerc_verbose_error.txt"

warning: Shader `/Users/bensonluk/projects/flutter_liquid_glass/packages/liquid_glass_renderer/lib/assets/shaders/liquid_glass_filter.frag` is incompatible with SkSL. This shader will not load when running with the Skia backend.
impellerc failure: Compilation failed for target: SkSL
"/Users/bensonluk/projects/flutter_liquid_glass/packages/liquid_glass_renderer/lib/assets/shaders/liquid_glass_filter.frag":
Compiled to invalid SkSL:
        // This SkSL shader is autogenerated by spirv-cross.

        float4 flutter_FragCoord;

        uniform vec2 uSize;
        uniform vec4 uGlassColor;
... (truncated 426 lines)
SkSL Error:
        error: 121: initializers are not permitted on arrays (or structs containing arrays)
            float param_2[96] = shapeData;
                                ^^^^^^^^^
        error: 122: unknown identifier 'param_2'
            float result = FLT_flutter_local_getShapeSDFFromArray(param, param_1, param_2);
                                                                                  ^^^^^^^
... (truncated 488 lines)
Full "liquid_glass_filter" error output written to "/tmp/flutter_OQtgOkth/impellerc_verbose_error.txt"
Project /Users/bensonluk/projects/flutter_liquid_glass/packages/liquid_glass_renderer/example built and packaged successfully.Command PhaseScriptExecution emitted errors but did not return a nonzero exit code to indicate failure
Building macOS application...
✓ Built build/macos/Build/Products/Debug/liquid_glass_renderer_example.app
2026-03-03 11:39:31.435 liquid_glass_renderer_example[77352:83282562] Running with merged UI and platform thread. Experimental.
Failed to foreground app; open returned 1
flutter: Initializing logger: lgr
flutter: lgr.render.layer > WARNING: LiquidGlassLayer is only supported when using Impeller at the moment. Falling back to FakeGlass for LiquidGlassLayer. To prevent this warning, enable Impeller, or set LiquidGlassLayer.fake to true before you use liquid glass widgets on Skia.
flutter: lgr.render.layer > WARNING: LiquidGlassLayer is only supported when using Impeller at the moment. Falling back to FakeGlass for LiquidGlassLayer. To prevent this warning, enable Impeller, or set LiquidGlassLayer.fake to true before you use liquid glass widgets on Skia.
Syncing files to device macOS...                                    47ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on macOS is available at: http://127.0.0.1:57532/tQZkdNat5B0=/
The Flutter DevTools debugger and profiler on macOS is available at: http://127.0.0.1:57532/tQZkdNat5B0=/devtools/?uri=ws://127.0.0.1:57532/tQZkdNat5B0=/ws

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@github-actions github-actions Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Mar 3, 2026
@b-luk b-luk marked this pull request as ready for review March 3, 2026 19:48

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates compileShader to retry compilation without SkSL if the initial attempt fails, which is a useful improvement for handling shaders that are not SkSL-compatible. The changes in shader_compiler.dart introduce this retry logic, and the tests in shader_compiler_test.dart are updated to cover these new scenarios. The implementation is mostly correct, but I have a couple of suggestions to improve logging and error reporting for better debuggability.

Comment thread packages/flutter_tools/lib/src/build_system/tools/shader_compiler.dart Outdated
Comment on lines +230 to 236
if (failure) {
if (fatal) {
throw ShaderCompilerException._(
'Shader compilation of "${input.path}" to "$outputPath" '
'failed with exit code $code.',
'failed with exit code ${result.exitCode}.',
);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

When a retry fails, the exception message reports the exit code from the initial attempt (result.exitCode), not the retry attempt. This is because retryResult is out of scope in this final error handling block, which could be confusing when debugging.

Consider refactoring to store the exit code of the last failed command in a variable that can be accessed here to provide a more accurate error message.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this matters because impellerc only has a single possible failing exit code: 1. If impellerc changes in the future to have multiple exit codes, the logic here will be updated to log and handle different exit codes differently.

@b-luk b-luk requested a review from gaaclarke March 3, 2026 19:55

@gaaclarke gaaclarke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! thanks @b-luk

@b-luk b-luk added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 4, 2026
@auto-submit auto-submit Bot added this pull request to the merge queue Mar 4, 2026
Merged via the queue into flutter:master with commit 213ef37 Mar 4, 2026
144 of 145 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 4, 2026
@b-luk b-luk deleted the impellercwarn branch March 4, 2026 22:28
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 5, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 5, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 5, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 5, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 6, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 6, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Mar 6, 2026
Roll Flutter from d3dd7744e81f to d18214307703 (33 revisions)

flutter/flutter@d3dd774...d182143

2026-03-06 engine-flutter-autoroll@skia.org Roll Packages from 8d5c5cd to fe3de64 (2 revisions) (flutter/flutter#183308)
2026-03-06 engine-flutter-autoroll@skia.org Roll Dart SDK from 1b51451cdb99 to 7c7c1e3d024d (2 revisions) (flutter/flutter#183294)
2026-03-06 engine-flutter-autoroll@skia.org Roll Dart SDK from 9ac06cdd1801 to 1b51451cdb99 (9 revisions) (flutter/flutter#183289)
2026-03-06 jacksongardner@google.com Add GitHub workflows to assist with release tasks (flutter/flutter#181978)
2026-03-06 flar@google.com [Impeller] Fix new convex path shadow generation in perspective (flutter/flutter#183187)
2026-03-06 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#183178)
2026-03-05 ishaquehassan@gmail.com fix: use double quotes in settings.gradle.kts template (flutter/flutter#183081)
2026-03-05 victorsanniay@gmail.com Add fallbackColor for PredictiveBackPageTransitionBuilder and PredictiveBackFullscreenPageTransitionBuilder (flutter/flutter#182690)
2026-03-05 97480502+b-luk@users.noreply.github.com Simplify TesterContextGLES (multithreading logic not needed), and enable some tests that now pass (flutter/flutter#183250)
2026-03-05 engine-flutter-autoroll@skia.org Roll Skia from a94df1cdabb0 to a69ef43650ee (14 revisions) (flutter/flutter#183280)
2026-03-05 matt.kosarek@canonical.com Windowing implementation of `showDialog` that uses a native desktop window to display the content  (flutter/flutter#181861)
2026-03-05 15619084+vashworth@users.noreply.github.com Build CocoaPod plugin frameworks for Add to App FlutterPluginRegistrant (flutter/flutter#183239)
2026-03-05 jason-simmons@users.noreply.github.com Extend the Linux web_skwasm_tests_1 timeout to 45 minutes (flutter/flutter#183247)
2026-03-05 liama@google.com Update Dart to 3.12 beta 2 (flutter/flutter#183251)
2026-03-05 116356835+AbdeMohlbi@users.noreply.github.com Replace the rest of the references to `flutter/engine` with `flutter/flutter` (flutter/flutter#182938)
2026-03-05 codefu@google.com chore: convert android_verified_input to pub-workspace (flutter/flutter#183175)
2026-03-05 victorsanniay@gmail.com Add await to flutter_test callsites (flutter/flutter#182983)
2026-03-05 okorohelijah@google.com [iOS] Skip gesture recognizer reset workaround on iOS 26+  (flutter/flutter#183186)
2026-03-05 okorohelijah@google.com Add warning for plugins not migrated to UIScene (flutter/flutter#182826)
2026-03-05 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from JJw5EJ87vLGqFVl4h... to 8ay15_eQOEgPHCypm... (flutter/flutter#183255)
2026-03-05 engine-flutter-autoroll@skia.org Roll Skia from ada0b7628c79 to a94df1cdabb0 (2 revisions) (flutter/flutter#183249)
2026-03-05 engine-flutter-autoroll@skia.org Roll Packages from 82baf93 to 8d5c5cd (2 revisions) (flutter/flutter#183269)
2026-03-05 36861262+QuncCccccc@users.noreply.github.com Add `UnlabaledLeafNodeEvaluation` (flutter/flutter#182872)
2026-03-04 34871572+gmackall@users.noreply.github.com Re-specify the ndk version in various test apps, to prevent ndk download (flutter/flutter#183134)
2026-03-04 nate.w5687@gmail.com Eliminate rebuilds for Scaffold FAB animation (flutter/flutter#182331)
2026-03-04 43498643+mkucharski17@users.noreply.github.com Add Michal Kucharski to AUTHORS (flutter/flutter#182366)
2026-03-04 jacksongardner@google.com Merge changelog from 3.41.4 stable. (flutter/flutter#183243)
2026-03-04 codedoctor@linwood.dev Allow stylus support on windows (flutter/flutter#165323)
2026-03-04 737941+loic-sharma@users.noreply.github.com Fix docs on SingletonFlutterWindow.supportsShowingSystemContextMenu (flutter/flutter#183142)
2026-03-04 engine-flutter-autoroll@skia.org Roll Packages from 9083bc9 to 82baf93 (5 revisions) (flutter/flutter#183240)
2026-03-04 11901536+romaingyh@users.noreply.github.com Fixes FocusHighlightMode on Android when typing in software keyboard (flutter/flutter#180753)
2026-03-04 97480502+b-luk@users.noreply.github.com Make compileShader() retry without sksl if it fails with sksl. (flutter/flutter#183146)
2026-03-04 zhongliu88889@gmail.com [web] Use pointer-events: auto for non-interactive leaf semantics nodes (flutter/flutter#183077)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
...
xxxOVALxxx pushed a commit to xxxOVALxxx/flutter that referenced this pull request Mar 10, 2026
…er#183146)

Updates `compileShader()` in `shader_compiler.dart` to retry `impellerc`
without sksl if calling it with sksl fails.

Fixes flutter#182400

<details><summary>Running an app with a non-sksl-compatible
shader:</summary>

```
❯ flutter run -d mac
Launching lib/main.dart on macOS in debug mode...
warning: Shader `/Users/bensonluk/projects/hello_flutter/shaders/simple.frag` is incompatible with SkSL. This shader will not load when running with the Skia backend.
impellerc failure: There was a compiler error: SkSL does not support array initializers: /Users/bensonluk/projects/hello_flutter/shaders/simple.frag:12
Project /Users/bensonluk/projects/hello_flutter built and packaged successfully.
Building macOS application...
✓ Built build/macos/Build/Products/Debug/hello_flutter.app
2026-03-03 11:38:35.093 hello_flutter[76976:83279294] Running with merged UI and platform thread. Experimental.
Failed to foreground app; open returned 1
Syncing files to device macOS...                                    39ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on macOS is available at: http://127.0.0.1:57483/Nr_RN4azQw8=/
The Flutter DevTools debugger and profiler on macOS is available at: http://127.0.0.1:57483/Nr_RN4azQw8=/devtools/?uri=ws://127.0.0.1:57483/Nr_RN4azQw8=/ws
```
</details>

<details><summary>Running an app with multiple non-sksl-compatible
shaders with longer error messages:</summary>

```
❯ flutter run -d mac
Launching lib/main.dart on macOS in debug mode...
warning: Shader `/Users/bensonluk/projects/flutter_liquid_glass/packages/liquid_glass_renderer/lib/assets/shaders/liquid_glass_arbitrary.frag` is incompatible with SkSL. This shader will not load when running with the Skia backend.
impellerc failure: Compilation failed for target: SkSL
"/Users/bensonluk/projects/flutter_liquid_glass/packages/liquid_glass_renderer/lib/assets/shaders/liquid_glass_arbitrary.frag":
Compiled to invalid SkSL:
        // This SkSL shader is autogenerated by spirv-cross.

        float4 flutter_FragCoord;

        uniform vec2 uSize;
        uniform vec2 uForegroundSize;
... (truncated 426 lines)
SkSL Error:
        error: 58: loop index initializer must be a constant expression
                for (int x = _703; x <= sampleRadius; x++)
                     ^^^^^^^^^^^^
        error: 55: loop index initializer must be a constant expression
            for (int y = _692; y <= sampleRadius; y++)
                 ^^^^^^^^^^^^
... (truncated 350 lines)
Full "liquid_glass_arbitrary" error output written to "/tmp/flutter_4Te755VI/impellerc_verbose_error.txt"

warning: Shader `/Users/bensonluk/projects/flutter_liquid_glass/packages/liquid_glass_renderer/lib/assets/shaders/liquid_glass_geometry_blended.frag` is incompatible with SkSL. This shader will not load when running with the Skia backend.
impellerc failure: Compilation failed for target: SkSL
"/Users/bensonluk/projects/flutter_liquid_glass/packages/liquid_glass_renderer/lib/assets/shaders/liquid_glass_geometry_blended.frag":
Compiled to invalid SkSL:
        // This SkSL shader is autogenerated by spirv-cross.

        float4 flutter_FragCoord;

        uniform vec2 uSize;
        uniform vec4 uOpticalProps;
... (truncated 229 lines)
SkSL Error:
        error: 111: initializers are not permitted on arrays (or structs containing arrays)
            float param_2[96] = shapeData;
                                ^^^^^^^^^
        error: 112: unknown identifier 'param_2'
            float result = FLT_flutter_local_getShapeSDFFromArray(param, param_1, param_2);
                                                                                  ^^^^^^^
... (truncated 185 lines)
Full "liquid_glass_geometry_blended" error output written to "/tmp/flutter_3qE1Q4aI/impellerc_verbose_error.txt"

warning: Shader `/Users/bensonluk/projects/flutter_liquid_glass/packages/liquid_glass_renderer/lib/assets/shaders/liquid_glass_filter.frag` is incompatible with SkSL. This shader will not load when running with the Skia backend.
impellerc failure: Compilation failed for target: SkSL
"/Users/bensonluk/projects/flutter_liquid_glass/packages/liquid_glass_renderer/lib/assets/shaders/liquid_glass_filter.frag":
Compiled to invalid SkSL:
        // This SkSL shader is autogenerated by spirv-cross.

        float4 flutter_FragCoord;

        uniform vec2 uSize;
        uniform vec4 uGlassColor;
... (truncated 426 lines)
SkSL Error:
        error: 121: initializers are not permitted on arrays (or structs containing arrays)
            float param_2[96] = shapeData;
                                ^^^^^^^^^
        error: 122: unknown identifier 'param_2'
            float result = FLT_flutter_local_getShapeSDFFromArray(param, param_1, param_2);
                                                                                  ^^^^^^^
... (truncated 488 lines)
Full "liquid_glass_filter" error output written to "/tmp/flutter_OQtgOkth/impellerc_verbose_error.txt"
Project /Users/bensonluk/projects/flutter_liquid_glass/packages/liquid_glass_renderer/example built and packaged successfully.Command PhaseScriptExecution emitted errors but did not return a nonzero exit code to indicate failure
Building macOS application...
✓ Built build/macos/Build/Products/Debug/liquid_glass_renderer_example.app
2026-03-03 11:39:31.435 liquid_glass_renderer_example[77352:83282562] Running with merged UI and platform thread. Experimental.
Failed to foreground app; open returned 1
flutter: Initializing logger: lgr
flutter: lgr.render.layer > WARNING: LiquidGlassLayer is only supported when using Impeller at the moment. Falling back to FakeGlass for LiquidGlassLayer. To prevent this warning, enable Impeller, or set LiquidGlassLayer.fake to true before you use liquid glass widgets on Skia.
flutter: lgr.render.layer > WARNING: LiquidGlassLayer is only supported when using Impeller at the moment. Falling back to FakeGlass for LiquidGlassLayer. To prevent this warning, enable Impeller, or set LiquidGlassLayer.fake to true before you use liquid glass widgets on Skia.
Syncing files to device macOS...                                    47ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on macOS is available at: http://127.0.0.1:57532/tQZkdNat5B0=/
The Flutter DevTools debugger and profiler on macOS is available at: http://127.0.0.1:57532/tQZkdNat5B0=/devtools/?uri=ws://127.0.0.1:57532/tQZkdNat5B0=/ws
```
</details>

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
okorohelijah pushed a commit to okorohelijah/packages that referenced this pull request Mar 26, 2026
…r#11191)

Roll Flutter from d3dd7744e81f to d18214307703 (33 revisions)

flutter/flutter@d3dd774...d182143

2026-03-06 engine-flutter-autoroll@skia.org Roll Packages from 8d5c5cd to fe3de64 (2 revisions) (flutter/flutter#183308)
2026-03-06 engine-flutter-autoroll@skia.org Roll Dart SDK from 1b51451cdb99 to 7c7c1e3d024d (2 revisions) (flutter/flutter#183294)
2026-03-06 engine-flutter-autoroll@skia.org Roll Dart SDK from 9ac06cdd1801 to 1b51451cdb99 (9 revisions) (flutter/flutter#183289)
2026-03-06 jacksongardner@google.com Add GitHub workflows to assist with release tasks (flutter/flutter#181978)
2026-03-06 flar@google.com [Impeller] Fix new convex path shadow generation in perspective (flutter/flutter#183187)
2026-03-06 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#183178)
2026-03-05 ishaquehassan@gmail.com fix: use double quotes in settings.gradle.kts template (flutter/flutter#183081)
2026-03-05 victorsanniay@gmail.com Add fallbackColor for PredictiveBackPageTransitionBuilder and PredictiveBackFullscreenPageTransitionBuilder (flutter/flutter#182690)
2026-03-05 97480502+b-luk@users.noreply.github.com Simplify TesterContextGLES (multithreading logic not needed), and enable some tests that now pass (flutter/flutter#183250)
2026-03-05 engine-flutter-autoroll@skia.org Roll Skia from a94df1cdabb0 to a69ef43650ee (14 revisions) (flutter/flutter#183280)
2026-03-05 matt.kosarek@canonical.com Windowing implementation of `showDialog` that uses a native desktop window to display the content  (flutter/flutter#181861)
2026-03-05 15619084+vashworth@users.noreply.github.com Build CocoaPod plugin frameworks for Add to App FlutterPluginRegistrant (flutter/flutter#183239)
2026-03-05 jason-simmons@users.noreply.github.com Extend the Linux web_skwasm_tests_1 timeout to 45 minutes (flutter/flutter#183247)
2026-03-05 liama@google.com Update Dart to 3.12 beta 2 (flutter/flutter#183251)
2026-03-05 116356835+AbdeMohlbi@users.noreply.github.com Replace the rest of the references to `flutter/engine` with `flutter/flutter` (flutter/flutter#182938)
2026-03-05 codefu@google.com chore: convert android_verified_input to pub-workspace (flutter/flutter#183175)
2026-03-05 victorsanniay@gmail.com Add await to flutter_test callsites (flutter/flutter#182983)
2026-03-05 okorohelijah@google.com [iOS] Skip gesture recognizer reset workaround on iOS 26+  (flutter/flutter#183186)
2026-03-05 okorohelijah@google.com Add warning for plugins not migrated to UIScene (flutter/flutter#182826)
2026-03-05 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from JJw5EJ87vLGqFVl4h... to 8ay15_eQOEgPHCypm... (flutter/flutter#183255)
2026-03-05 engine-flutter-autoroll@skia.org Roll Skia from ada0b7628c79 to a94df1cdabb0 (2 revisions) (flutter/flutter#183249)
2026-03-05 engine-flutter-autoroll@skia.org Roll Packages from 82baf93 to 8d5c5cd (2 revisions) (flutter/flutter#183269)
2026-03-05 36861262+QuncCccccc@users.noreply.github.com Add `UnlabaledLeafNodeEvaluation` (flutter/flutter#182872)
2026-03-04 34871572+gmackall@users.noreply.github.com Re-specify the ndk version in various test apps, to prevent ndk download (flutter/flutter#183134)
2026-03-04 nate.w5687@gmail.com Eliminate rebuilds for Scaffold FAB animation (flutter/flutter#182331)
2026-03-04 43498643+mkucharski17@users.noreply.github.com Add Michal Kucharski to AUTHORS (flutter/flutter#182366)
2026-03-04 jacksongardner@google.com Merge changelog from 3.41.4 stable. (flutter/flutter#183243)
2026-03-04 codedoctor@linwood.dev Allow stylus support on windows (flutter/flutter#165323)
2026-03-04 737941+loic-sharma@users.noreply.github.com Fix docs on SingletonFlutterWindow.supportsShowingSystemContextMenu (flutter/flutter#183142)
2026-03-04 engine-flutter-autoroll@skia.org Roll Packages from 9083bc9 to 82baf93 (5 revisions) (flutter/flutter#183240)
2026-03-04 11901536+romaingyh@users.noreply.github.com Fixes FocusHighlightMode on Android when typing in software keyboard (flutter/flutter#180753)
2026-03-04 97480502+b-luk@users.noreply.github.com Make compileShader() retry without sksl if it fails with sksl. (flutter/flutter#183146)
2026-03-04 zhongliu88889@gmail.com [web] Use pointer-events: auto for non-interactive leaf semantics nodes (flutter/flutter#183077)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
...
mboetger pushed a commit to mboetger/flutter that referenced this pull request Mar 26, 2026
…er#183146)

Updates `compileShader()` in `shader_compiler.dart` to retry `impellerc`
without sksl if calling it with sksl fails.

Fixes flutter#182400

<details><summary>Running an app with a non-sksl-compatible
shader:</summary>

```
❯ flutter run -d mac
Launching lib/main.dart on macOS in debug mode...
warning: Shader `/Users/bensonluk/projects/hello_flutter/shaders/simple.frag` is incompatible with SkSL. This shader will not load when running with the Skia backend.
impellerc failure: There was a compiler error: SkSL does not support array initializers: /Users/bensonluk/projects/hello_flutter/shaders/simple.frag:12
Project /Users/bensonluk/projects/hello_flutter built and packaged successfully.
Building macOS application...
✓ Built build/macos/Build/Products/Debug/hello_flutter.app
2026-03-03 11:38:35.093 hello_flutter[76976:83279294] Running with merged UI and platform thread. Experimental.
Failed to foreground app; open returned 1
Syncing files to device macOS...                                    39ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on macOS is available at: http://127.0.0.1:57483/Nr_RN4azQw8=/
The Flutter DevTools debugger and profiler on macOS is available at: http://127.0.0.1:57483/Nr_RN4azQw8=/devtools/?uri=ws://127.0.0.1:57483/Nr_RN4azQw8=/ws
```
</details>

<details><summary>Running an app with multiple non-sksl-compatible
shaders with longer error messages:</summary>

```
❯ flutter run -d mac
Launching lib/main.dart on macOS in debug mode...
warning: Shader `/Users/bensonluk/projects/flutter_liquid_glass/packages/liquid_glass_renderer/lib/assets/shaders/liquid_glass_arbitrary.frag` is incompatible with SkSL. This shader will not load when running with the Skia backend.
impellerc failure: Compilation failed for target: SkSL
"/Users/bensonluk/projects/flutter_liquid_glass/packages/liquid_glass_renderer/lib/assets/shaders/liquid_glass_arbitrary.frag":
Compiled to invalid SkSL:
        // This SkSL shader is autogenerated by spirv-cross.

        float4 flutter_FragCoord;

        uniform vec2 uSize;
        uniform vec2 uForegroundSize;
... (truncated 426 lines)
SkSL Error:
        error: 58: loop index initializer must be a constant expression
                for (int x = _703; x <= sampleRadius; x++)
                     ^^^^^^^^^^^^
        error: 55: loop index initializer must be a constant expression
            for (int y = _692; y <= sampleRadius; y++)
                 ^^^^^^^^^^^^
... (truncated 350 lines)
Full "liquid_glass_arbitrary" error output written to "/tmp/flutter_4Te755VI/impellerc_verbose_error.txt"

warning: Shader `/Users/bensonluk/projects/flutter_liquid_glass/packages/liquid_glass_renderer/lib/assets/shaders/liquid_glass_geometry_blended.frag` is incompatible with SkSL. This shader will not load when running with the Skia backend.
impellerc failure: Compilation failed for target: SkSL
"/Users/bensonluk/projects/flutter_liquid_glass/packages/liquid_glass_renderer/lib/assets/shaders/liquid_glass_geometry_blended.frag":
Compiled to invalid SkSL:
        // This SkSL shader is autogenerated by spirv-cross.

        float4 flutter_FragCoord;

        uniform vec2 uSize;
        uniform vec4 uOpticalProps;
... (truncated 229 lines)
SkSL Error:
        error: 111: initializers are not permitted on arrays (or structs containing arrays)
            float param_2[96] = shapeData;
                                ^^^^^^^^^
        error: 112: unknown identifier 'param_2'
            float result = FLT_flutter_local_getShapeSDFFromArray(param, param_1, param_2);
                                                                                  ^^^^^^^
... (truncated 185 lines)
Full "liquid_glass_geometry_blended" error output written to "/tmp/flutter_3qE1Q4aI/impellerc_verbose_error.txt"

warning: Shader `/Users/bensonluk/projects/flutter_liquid_glass/packages/liquid_glass_renderer/lib/assets/shaders/liquid_glass_filter.frag` is incompatible with SkSL. This shader will not load when running with the Skia backend.
impellerc failure: Compilation failed for target: SkSL
"/Users/bensonluk/projects/flutter_liquid_glass/packages/liquid_glass_renderer/lib/assets/shaders/liquid_glass_filter.frag":
Compiled to invalid SkSL:
        // This SkSL shader is autogenerated by spirv-cross.

        float4 flutter_FragCoord;

        uniform vec2 uSize;
        uniform vec4 uGlassColor;
... (truncated 426 lines)
SkSL Error:
        error: 121: initializers are not permitted on arrays (or structs containing arrays)
            float param_2[96] = shapeData;
                                ^^^^^^^^^
        error: 122: unknown identifier 'param_2'
            float result = FLT_flutter_local_getShapeSDFFromArray(param, param_1, param_2);
                                                                                  ^^^^^^^
... (truncated 488 lines)
Full "liquid_glass_filter" error output written to "/tmp/flutter_OQtgOkth/impellerc_verbose_error.txt"
Project /Users/bensonluk/projects/flutter_liquid_glass/packages/liquid_glass_renderer/example built and packaged successfully.Command PhaseScriptExecution emitted errors but did not return a nonzero exit code to indicate failure
Building macOS application...
✓ Built build/macos/Build/Products/Debug/liquid_glass_renderer_example.app
2026-03-03 11:39:31.435 liquid_glass_renderer_example[77352:83282562] Running with merged UI and platform thread. Experimental.
Failed to foreground app; open returned 1
flutter: Initializing logger: lgr
flutter: lgr.render.layer > WARNING: LiquidGlassLayer is only supported when using Impeller at the moment. Falling back to FakeGlass for LiquidGlassLayer. To prevent this warning, enable Impeller, or set LiquidGlassLayer.fake to true before you use liquid glass widgets on Skia.
flutter: lgr.render.layer > WARNING: LiquidGlassLayer is only supported when using Impeller at the moment. Falling back to FakeGlass for LiquidGlassLayer. To prevent this warning, enable Impeller, or set LiquidGlassLayer.fake to true before you use liquid glass widgets on Skia.
Syncing files to device macOS...                                    47ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on macOS is available at: http://127.0.0.1:57532/tQZkdNat5B0=/
The Flutter DevTools debugger and profiler on macOS is available at: http://127.0.0.1:57532/tQZkdNat5B0=/devtools/?uri=ws://127.0.0.1:57532/tQZkdNat5B0=/ws
```
</details>

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
…r#11191)

Roll Flutter from d3dd7744e81f to d18214307703 (33 revisions)

flutter/flutter@d3dd774...d182143

2026-03-06 engine-flutter-autoroll@skia.org Roll Packages from 8d5c5cd to fe3de64 (2 revisions) (flutter/flutter#183308)
2026-03-06 engine-flutter-autoroll@skia.org Roll Dart SDK from 1b51451cdb99 to 7c7c1e3d024d (2 revisions) (flutter/flutter#183294)
2026-03-06 engine-flutter-autoroll@skia.org Roll Dart SDK from 9ac06cdd1801 to 1b51451cdb99 (9 revisions) (flutter/flutter#183289)
2026-03-06 jacksongardner@google.com Add GitHub workflows to assist with release tasks (flutter/flutter#181978)
2026-03-06 flar@google.com [Impeller] Fix new convex path shadow generation in perspective (flutter/flutter#183187)
2026-03-06 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#183178)
2026-03-05 ishaquehassan@gmail.com fix: use double quotes in settings.gradle.kts template (flutter/flutter#183081)
2026-03-05 victorsanniay@gmail.com Add fallbackColor for PredictiveBackPageTransitionBuilder and PredictiveBackFullscreenPageTransitionBuilder (flutter/flutter#182690)
2026-03-05 97480502+b-luk@users.noreply.github.com Simplify TesterContextGLES (multithreading logic not needed), and enable some tests that now pass (flutter/flutter#183250)
2026-03-05 engine-flutter-autoroll@skia.org Roll Skia from a94df1cdabb0 to a69ef43650ee (14 revisions) (flutter/flutter#183280)
2026-03-05 matt.kosarek@canonical.com Windowing implementation of `showDialog` that uses a native desktop window to display the content  (flutter/flutter#181861)
2026-03-05 15619084+vashworth@users.noreply.github.com Build CocoaPod plugin frameworks for Add to App FlutterPluginRegistrant (flutter/flutter#183239)
2026-03-05 jason-simmons@users.noreply.github.com Extend the Linux web_skwasm_tests_1 timeout to 45 minutes (flutter/flutter#183247)
2026-03-05 liama@google.com Update Dart to 3.12 beta 2 (flutter/flutter#183251)
2026-03-05 116356835+AbdeMohlbi@users.noreply.github.com Replace the rest of the references to `flutter/engine` with `flutter/flutter` (flutter/flutter#182938)
2026-03-05 codefu@google.com chore: convert android_verified_input to pub-workspace (flutter/flutter#183175)
2026-03-05 victorsanniay@gmail.com Add await to flutter_test callsites (flutter/flutter#182983)
2026-03-05 okorohelijah@google.com [iOS] Skip gesture recognizer reset workaround on iOS 26+  (flutter/flutter#183186)
2026-03-05 okorohelijah@google.com Add warning for plugins not migrated to UIScene (flutter/flutter#182826)
2026-03-05 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from JJw5EJ87vLGqFVl4h... to 8ay15_eQOEgPHCypm... (flutter/flutter#183255)
2026-03-05 engine-flutter-autoroll@skia.org Roll Skia from ada0b7628c79 to a94df1cdabb0 (2 revisions) (flutter/flutter#183249)
2026-03-05 engine-flutter-autoroll@skia.org Roll Packages from 82baf93 to 8d5c5cd (2 revisions) (flutter/flutter#183269)
2026-03-05 36861262+QuncCccccc@users.noreply.github.com Add `UnlabaledLeafNodeEvaluation` (flutter/flutter#182872)
2026-03-04 34871572+gmackall@users.noreply.github.com Re-specify the ndk version in various test apps, to prevent ndk download (flutter/flutter#183134)
2026-03-04 nate.w5687@gmail.com Eliminate rebuilds for Scaffold FAB animation (flutter/flutter#182331)
2026-03-04 43498643+mkucharski17@users.noreply.github.com Add Michal Kucharski to AUTHORS (flutter/flutter#182366)
2026-03-04 jacksongardner@google.com Merge changelog from 3.41.4 stable. (flutter/flutter#183243)
2026-03-04 codedoctor@linwood.dev Allow stylus support on windows (flutter/flutter#165323)
2026-03-04 737941+loic-sharma@users.noreply.github.com Fix docs on SingletonFlutterWindow.supportsShowingSystemContextMenu (flutter/flutter#183142)
2026-03-04 engine-flutter-autoroll@skia.org Roll Packages from 9083bc9 to 82baf93 (5 revisions) (flutter/flutter#183240)
2026-03-04 11901536+romaingyh@users.noreply.github.com Fixes FocusHighlightMode on Android when typing in software keyboard (flutter/flutter#180753)
2026-03-04 97480502+b-luk@users.noreply.github.com Make compileShader() retry without sksl if it fails with sksl. (flutter/flutter#183146)
2026-03-04 zhongliu88889@gmail.com [web] Use pointer-events: auto for non-interactive leaf semantics nodes (flutter/flutter#183077)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SkSL compilation errors are generated when they're irrelevant

2 participants