Skip to content

[Impeller] Hot reloaded shader code is always SkSL. #114654

Closed

Description

@bdero

When Impeller is enabled, hot reloading results in a new shader asset containing SkSL in the code mapping instead of shader code that corresponds to the correct Impeller backend.

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    t: hot reloadReloading code during "flutter run"
    e: impellerImpeller rendering backend issues and features requests
    on Nov 4, 2022
  2. moved this to 🤔 Needs Triage in Impelleron Nov 4, 2022
  3. changed the title [-]Hot reloaded shader code is always SkSL[/-] [+]Hot reloaded shader code is SkSL when Impeller is enabled[/+] on Nov 4, 2022
  4. moved this from 🤔 Needs Triage to 🐞 Bugs in Impelleron Nov 4, 2022
  5. changed the title [-]Hot reloaded shader code is SkSL when Impeller is enabled[/-] [+][Impeller] Hot reloaded shader code is always SkSL.[/+] on Nov 4, 2022
  6. jonahwilliams commented on Nov 4, 2022

    @jonahwilliams
    Contributor

    Try this:

    diff --git a/packages/flutter_tools/lib/src/build_system/targets/shader_compiler.dart b/packages/flutter_tools/lib/src/build_system/targets/shader_compiler.dart
    index a1721a097c..0d5317d4aa 100644
    --- a/packages/flutter_tools/lib/src/build_system/targets/shader_compiler.dart
    +++ b/packages/flutter_tools/lib/src/build_system/targets/shader_compiler.dart
    @@ -54,7 +54,9 @@ class DevelopmentShaderCompiler {
       void configureCompiler(TargetPlatform? platform, { required bool enableImpeller }) {
         switch (platform) {
           case TargetPlatform.ios:
    -        _shaderTarget = enableImpeller ? ShaderTarget.impelleriOS : ShaderTarget.sksl;
    +        // Always target impeller so both SkSL and platform specific
    +        // shaders are produced.
    +        _shaderTarget = ShaderTarget.impelleriOS;
             break;
           case TargetPlatform.android_arm64:
           case TargetPlatform.android_x64:
  7. jonahwilliams commented on Nov 18, 2022

    @jonahwilliams
    Contributor

    I believe this is fixed. Closing

  8. Repository owner moved this from 🐞 Bugs to ✅ Done in Impelleron Nov 18, 2022
  9. github-actions commented on Dec 2, 2022

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  10. locked as resolved and limited conversation to collaborators on Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    e: impellerImpeller rendering backend issues and features requestst: hot reloadReloading code during "flutter run"toolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions