-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Impeller] Reland 3: Implement draw order optimization. #54673
Conversation
3db20e1
to
9a54d47
Compare
if (draw_order_layers_.size() == 1u) { | ||
// This is likely recoverable, so don't assert. | ||
VALIDATION_LOG | ||
<< "Attemped to pop the first draw order clip layer. This is a bug in " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should that read "may be a bug"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as the draw order resolver is working off of indices, it should be straightforward to port to the new canvas. That said, I plan to reland the switch after #54604 which would disable this optimization, unless you update exp canvas as well.
I'm still trying to reland indices (#54676) so we can't do reorder optimization until that happens. And expCanvas doesn't use indices at all yet, so we'd need to decide if we want to do that conversion as a separate step or combine it with the re-order re-write. |
It's hard to know exactly what features we need in the DL until this actually sticks. The nature of what we'd need to do in exp canvas to support this kind of thing changed significantly from the first time I tried to land this. So I'll help unravel the puzzle after this change sticks. |
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. |
while (const EntityPassClipStack::ReplayResult* next_replay_clip = | ||
clip_coverage_stack.GetNextReplayResult(element_entity)) { | ||
auto& replay_entity = next_replay_clip->entity; | ||
SetClipScissor(next_replay_clip->clip_coverage, *result.pass, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only line that changed from the previous attempt (other than the new golden that I added).
clip_coverage_stack.CurrentClipCoverage()
changed to next_replay_clip->clip_coverage
.
…153994) flutter/engine@67a7fe1...e4fac78 2024-08-23 flar@google.com Revert "Framework wide color" (flutter/engine#54728) 2024-08-23 skia-flutter-autoroll@skia.org Roll Skia from 7ac776072577 to 7d96b8516e8d (3 revisions) (flutter/engine#54731) 2024-08-23 skia-flutter-autoroll@skia.org Roll Skia from 789f5cb0b9c2 to 7ac776072577 (1 revision) (flutter/engine#54729) 2024-08-23 skia-flutter-autoroll@skia.org Roll Skia from b25553b2fb9f to 789f5cb0b9c2 (1 revision) (flutter/engine#54726) 2024-08-23 skia-flutter-autoroll@skia.org Roll Dart SDK from ca009736fb3e to f9e6abb21ac7 (1 revision) (flutter/engine#54725) 2024-08-23 bdero@google.com [Impeller] Reland 3: Implement draw order optimization. (flutter/engine#54673) 2024-08-23 skia-flutter-autoroll@skia.org Roll Fuchsia Test Scripts from 2fOjXGNxdSoRSGCL7... to 2TaLkdJNlAIbDYccn... (flutter/engine#54721) 2024-08-23 skia-flutter-autoroll@skia.org Roll Fuchsia GN SDK from sbh76PYVTMxav4ACT... to OKGFjciA5Vd0TQks4... (flutter/engine#54722) 2024-08-22 magder@google.com Test running the macOS engine has no stray logging (flutter/engine#54716) 2024-08-22 skia-flutter-autoroll@skia.org Roll Dart SDK from 937389f7bc48 to ca009736fb3e (1 revision) (flutter/engine#54719) 2024-08-22 matanlurey@users.noreply.github.com More diagnostic clean ups (flutter/engine#54265) 2024-08-22 30870216+gaaclarke@users.noreply.github.com Framework wide color (flutter/engine#54415) 2024-08-22 skia-flutter-autoroll@skia.org Roll Skia from 10e9072dcea0 to b25553b2fb9f (2 revisions) (flutter/engine#54717) 2024-08-22 skia-flutter-autoroll@skia.org Roll Dart SDK from ce160bf13347 to 937389f7bc48 (1 revision) (flutter/engine#54715) 2024-08-22 yjbanov@google.com [web:semantics] fix double click due to long-press (flutter/engine#54697) 2024-08-22 skia-flutter-autoroll@skia.org Roll Skia from 04ce2e2bfc35 to 10e9072dcea0 (1 revision) (flutter/engine#54713) 2024-08-22 zanderso@users.noreply.github.com Pin mac host and iOS builds to arm64 builders (flutter/engine#54711) 2024-08-22 chris@bracken.jp macOS: Bundle dSYM packages in FlutterMacOS.xcframework (flutter/engine#54696) 2024-08-22 skia-flutter-autoroll@skia.org Roll Skia from 7611984dc27b to 04ce2e2bfc35 (2 revisions) (flutter/engine#54712) 2024-08-22 joel.winarske@gmail.com vulkan_glfw validation layer logging (flutter/engine#54607) 2024-08-22 skia-flutter-autoroll@skia.org Roll Skia from 4c66b7e42027 to 7611984dc27b (1 revision) (flutter/engine#54710) 2024-08-22 skia-flutter-autoroll@skia.org Roll Dart SDK from 025bf8d376d3 to ce160bf13347 (1 revision) (flutter/engine#54709) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: 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: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#153994) flutter/engine@67a7fe1...e4fac78 2024-08-23 flar@google.com Revert "Framework wide color" (flutter/engine#54728) 2024-08-23 skia-flutter-autoroll@skia.org Roll Skia from 7ac776072577 to 7d96b8516e8d (3 revisions) (flutter/engine#54731) 2024-08-23 skia-flutter-autoroll@skia.org Roll Skia from 789f5cb0b9c2 to 7ac776072577 (1 revision) (flutter/engine#54729) 2024-08-23 skia-flutter-autoroll@skia.org Roll Skia from b25553b2fb9f to 789f5cb0b9c2 (1 revision) (flutter/engine#54726) 2024-08-23 skia-flutter-autoroll@skia.org Roll Dart SDK from ca009736fb3e to f9e6abb21ac7 (1 revision) (flutter/engine#54725) 2024-08-23 bdero@google.com [Impeller] Reland 3: Implement draw order optimization. (flutter/engine#54673) 2024-08-23 skia-flutter-autoroll@skia.org Roll Fuchsia Test Scripts from 2fOjXGNxdSoRSGCL7... to 2TaLkdJNlAIbDYccn... (flutter/engine#54721) 2024-08-23 skia-flutter-autoroll@skia.org Roll Fuchsia GN SDK from sbh76PYVTMxav4ACT... to OKGFjciA5Vd0TQks4... (flutter/engine#54722) 2024-08-22 magder@google.com Test running the macOS engine has no stray logging (flutter/engine#54716) 2024-08-22 skia-flutter-autoroll@skia.org Roll Dart SDK from 937389f7bc48 to ca009736fb3e (1 revision) (flutter/engine#54719) 2024-08-22 matanlurey@users.noreply.github.com More diagnostic clean ups (flutter/engine#54265) 2024-08-22 30870216+gaaclarke@users.noreply.github.com Framework wide color (flutter/engine#54415) 2024-08-22 skia-flutter-autoroll@skia.org Roll Skia from 10e9072dcea0 to b25553b2fb9f (2 revisions) (flutter/engine#54717) 2024-08-22 skia-flutter-autoroll@skia.org Roll Dart SDK from ce160bf13347 to 937389f7bc48 (1 revision) (flutter/engine#54715) 2024-08-22 yjbanov@google.com [web:semantics] fix double click due to long-press (flutter/engine#54697) 2024-08-22 skia-flutter-autoroll@skia.org Roll Skia from 04ce2e2bfc35 to 10e9072dcea0 (1 revision) (flutter/engine#54713) 2024-08-22 zanderso@users.noreply.github.com Pin mac host and iOS builds to arm64 builders (flutter/engine#54711) 2024-08-22 chris@bracken.jp macOS: Bundle dSYM packages in FlutterMacOS.xcframework (flutter/engine#54696) 2024-08-22 skia-flutter-autoroll@skia.org Roll Skia from 7611984dc27b to 04ce2e2bfc35 (2 revisions) (flutter/engine#54712) 2024-08-22 joel.winarske@gmail.com vulkan_glfw validation layer logging (flutter/engine#54607) 2024-08-22 skia-flutter-autoroll@skia.org Roll Skia from 4c66b7e42027 to 7611984dc27b (1 revision) (flutter/engine#54710) 2024-08-22 skia-flutter-autoroll@skia.org Roll Dart SDK from 025bf8d376d3 to ce160bf13347 (1 revision) (flutter/engine#54709) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: 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: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Attempt 1: #54136
Revert 1: #54067
Attempt 2: #54215
Revert 2: #54261
Attempt 3: #54268
Revert 3: #54325
This time for sure!
Includes a fix for the bug discovered in yt.
This turned out to be a bug that was laying dormant in EntityPass for about 5 months. During the clip replay, the clip scissor was getting set to
clip_coverage_stack.CurrentClipCoverage()
instead of the coverage stored along side the clip being replayed.Description
For each clip scope, draw opaque items in reverse order and translucent/backdrop-independent items in their original order afterwards. Clips are treated as translucent by the parent scope.
Respects clips, subpass collapse, and the clear color optimization.
Local new_gallery before/after (iPhone 12 mini):