Skip to content

Test-based shader warmup #53609

Closed as not planned
Closed as not planned

Description

@liyuqian

This tracks our medium-term solution of #32170 that's based on something similar to driver tests.

This approach would be completely device/hardware-independent.

Also, it will work well on newer backends such as Vulkan and Metal, whereas our short term solution "SkSL-based shader warmup #53607" would have issues.

Currently this is blocked on #38329

Activity

  1. added
    c: performanceRelates to speed or footprint issues (see "perf:" labels)
    perf: speedPerformance issues related to (mostly rendering) speed
    on Mar 30, 2020
  2. kf6gpe commented on Apr 21, 2020

    @kf6gpe
    Contributor
  3. added
    engineflutter/engine related. See also e: labels.
    on Jul 1, 2020
  4. added
    P3Issues that are less important to the Flutter project
    on Jul 6, 2020
  5. zanderso commented on Jul 6, 2020

    @zanderso
    Member

    @liyuqian are you working on this? Should this issue have a priority and milestone? Thanks!

  6. liyuqian commented on Jul 6, 2020

    @liyuqian
    ContributorAuthor

    @zanderso : this is currently blocked by #38329 . I'll self-assign and add a milestone once that's closed.

  7. acoutts commented on Jul 19, 2020

    @acoutts

    Looking forward to this one! By device independent do you mean an iphone 11 would need its own tests and an iphone 8 would also need its own?

  8. dannyvalentesonos commented on Jul 25, 2020

    @dannyvalentesonos
    Contributor

    @liyuqian I'm having trouble understanding what this solution would look like in practical terms for developers. Will we still need to run some tests and package some output into the actual app? If so, will this solution work with Add2App?
    Thanks!

  9. liyuqian commented on Jul 27, 2020

    @liyuqian
    ContributorAuthor

    @dannyvalentesonos : You'll write some tests like https://github.com/flutter/flutter/pull/62171/files#diff-e05d298bb504bbbed0b6f263fd72e954R17-R27. There's no need to run the test locally or generate something from it. We'll directly package the test code into the actual app, run the test code in the background with some special GPU context that only compiles shaders. It should work with Add2App.

  10. dannyvalentesonos commented on Jul 27, 2020

    @dannyvalentesonos
    Contributor

    That's great. Thanks @liyuqian . Do you have any sense of when this might be ready? I'm not looking for any accurate date, but wondering if this is possibly something in 2020 or 2021. Thanks.

  11. liyuqian commented on Jul 28, 2020

    @liyuqian
    ContributorAuthor

    It's probably 2021.

  12. xinoxapps commented on Oct 13, 2020

    @xinoxapps

    Any change this can have a boost with the available resources of Google.

    This is a big deal breaker as animations become more popular in the onboarding screens of the app.

  13. added
    P1High-priority issues at the top of the work list
    and removed
    P3Issues that are less important to the Flutter project
    on Oct 19, 2020
  14. 17 remaining items

  15. Hixie commented on Mar 20, 2021

    @Hixie
    Contributor

    @zanderso do we know what's needed to make that happen? Is it basically "run flutter_tester with all the backends enabled"?

    @esDotDev that's already possible right?

  16. zanderso commented on Mar 22, 2021

    @zanderso
    Member

    It sounds like @esDotDev is asking for SkSL warmup plus the ability to record a series of actions that can then be replayed---as opposed to writing something like that manually.

    @Hixie That's a good question. It looks like a lot of progress was made on flutter.dev/go/flutter-nonhost. As noted above, there are in-tree examples here, so making a public API and giving it good documentation might be all that is left to do, but progress on #38329 appears to have stalled out.

  17. esDotDev commented on Mar 23, 2021

    @esDotDev

    @esDotDev that's already possible right?

    I really have no idea. tbh I don't really know how to write tests, how the framework works, or any of that. And to super honest, I have like 0 passion to learn any of it, my passion is building cool UI's.

    So I was thinking more along the lines of "Press this button", I run my app, smoke test it, and everything else is just taken care of somehow by the framework.

  18. Hixie commented on Mar 23, 2021

    @Hixie
    Contributor

    @esDotDev Ah ok. That's not what this bug is about. This bug is about being able to create automated tests to collect shaders.

  19. esDotDev commented on Mar 23, 2021

    @esDotDev

    Just recap my understanding:

    • This bug is about the ability to write test code, that can be used to warm up shaders in a device independent way (I'm assuming this is some test code, that is run on device during the splash screen, just in time, to warm up shaders so the app then runs smoothly).
    • I'm simply saying, the write test code portion of this is problematic, maybe there some way we can automate it via recording a developer actions

    It sounds like @esDotDev is asking for SkSL warmup plus the ability to record a series of actions that can then be replayed---as opposed to writing something like that manually.

    Exactly this ^

  20. Hixie commented on Mar 23, 2021

    @Hixie
    Contributor
    • (I'm assuming this is some test code, that is run on device during the splash screen, just in time, to warm up shaders so the app then runs smoothly).

    Test code runs on the developer's computer (or in CI). The output would be something that you can package with the app so that the app can warm up shaders on launch, like you can do now with the more manual warm-up.

  21. Hixie commented on Mar 23, 2021

    @Hixie
    Contributor

    Being able to generate a test that replays a given input would be interesting, can you file a bug suggesting that? (It could be useful outside of shader warmup too.)

  22. esDotDev commented on Mar 23, 2021

    @esDotDev

    Done: #78869
    Cheers

  23. zanderso commented on Aug 11, 2023

    @zanderso
    Member

    SkSL caching and warm-up is no longer the approach the team is pursuing to solve early-onset jank.

  24. github-actions commented on Aug 25, 2023

    @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.

  25. locked as resolved and limited conversation to collaborators on Aug 25, 2023
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

    P1High-priority issues at the top of the work listc: performanceRelates to speed or footprint issues (see "perf:" labels)engineflutter/engine related. See also e: labels.perf: speedPerformance issues related to (mostly rendering) speedteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions