-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] fix clear color optimization for large subpasses. #46887
Conversation
gaaclarke
left a comment
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.
Is there any docstrings that should be updated to make this more clear that this is the correct math?
|
I'm not really sure. I sort of eyeballed this after reading through the code for a bit because it didn't seem right that we were using the root pass size to compute the clear color. |
|
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. |
|
Looks like this is breaking CanRenderClippedLayers |
|
So with this change, we're now collapsing both colors into the save layer and using the CPU blends. I think the issue might just be that ColorDodge is incorrect, because If I change the advanced blend it renders as expected. |
|
ColorDodge on the CPU is computing a blended color of (1, 1, 1, 1). I think this is incorrect as it doesn't seem to match the GPU blend. |
|
I confirmed that there are otherwise no issues with the pass structures, other advanced blends show up correctly - the issue is entirely the result of Color::Blend. |
|
I'm tempted to just adjust the blend mode to a different advanced blend and file a bug for fixing color dodge. Thoughts @bdero / @gaaclarke ? |
|
Golden file changes are available for triage from new commit, Click here to view. |
|
I adjusted the test and filed a bug |
…ions) (#136564) Manual roll requested by [email protected] Cannot build log URL because revision "a4e62581525c" is invalid: Luci builds of "Mac mac_ios_engine" for a4e62581525c1864a3cd23a67539a3615717eb98 was STARTED 2023-10-13 [email protected] Manual roll Dart SDK from c8143a7c026f to 5844b34768ce (1 revision) (flutter/engine#46909) 2023-10-13 [email protected] Roll Skia from c9601553b0f3 to 4bc4b4d22866 (1 revision) (flutter/engine#46908) 2023-10-13 [email protected] Roll Skia from 8dc8e21a4dec to c9601553b0f3 (3 revisions) (flutter/engine#46907) 2023-10-13 [email protected] Roll Fuchsia Mac SDK from SDPa6SfaKvRRSUCij... to 4DwpR2CMJECZJ8EKz... (flutter/engine#46903) 2023-10-13 [email protected] Roll Skia from b50d7f9aa743 to 8dc8e21a4dec (4 revisions) (flutter/engine#46902) 2023-10-13 [email protected] [Impeller] fix clear color optimization for large subpasses. (flutter/engine#46887) 2023-10-13 [email protected] Oops, allow files in opted-in third_party directories. (flutter/engine#46897) 2023-10-13 [email protected] Roll Skia from e10e6765480a to b50d7f9aa743 (1 revision) (flutter/engine#46899) 2023-10-13 [email protected] Roll Fuchsia Linux SDK from pI1BVH08V0eG0M7sw... to wBb32R567S1alWbfn... (flutter/engine#46898) Also rolling transitive DEPS: fuchsia/sdk/core/linux-amd64 from pI1BVH08V0eG to wBb32R567S1a fuchsia/sdk/core/mac-amd64 from SDPa6SfaKvRR to 4DwpR2CMJECZ 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 [email protected],[email protected],[email protected],[email protected] 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
Fixes flutter/flutter#136507 . The cause of this bug is that we use different sizes to compute the clear color value when constructing the render target and when skipping entities: https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L632 https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L731 and https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L900C3-L900C3 Either the former should use the root pass size or the later should use the subpass size. This usually isn't an issue because if something covers the root pass size it generally always covers the subpass size. But during the page transition, the scaled subpass ends up slightly bigger than the root pass size and so these conditions are mismatched: Subpass size: (1550, 3188) root pass size (1440, 3036) I think subpass size is correct. If the subpass is larger than the parent, then checking the parent size will give incorrect result.
…#46887) Fixes flutter/flutter#136507 . The cause of this bug is that we use different sizes to compute the clear color value when constructing the render target and when skipping entities: https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L632 https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L731 and https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L900C3-L900C3 Either the former should use the root pass size or the later should use the subpass size. This usually isn't an issue because if something covers the root pass size it generally always covers the subpass size. But during the page transition, the scaled subpass ends up slightly bigger than the root pass size and so these conditions are mismatched: Subpass size: (1550, 3188) root pass size (1440, 3036) I think subpass size is correct. If the subpass is larger than the parent, then checking the parent size will give incorrect result.
) (#47577) Fixes flutter/flutter#136507 . The cause of this bug is that we use different sizes to compute the clear color value when constructing the render target and when skipping entities: https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L632 https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L731 and https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L900C3-L900C3 Either the former should use the root pass size or the later should use the subpass size. This usually isn't an issue because if something covers the root pass size it generally always covers the subpass size. But during the page transition, the scaled subpass ends up slightly bigger than the root pass size and so these conditions are mismatched: Subpass size: (1550, 3188) root pass size (1440, 3036) I think subpass size is correct. If the subpass is larger than the parent, then checking the parent size will give incorrect result.
Fixes flutter/flutter#136507 .
The cause of this bug is that we use different sizes to compute the clear color value when constructing the render target and when skipping entities:
https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L632
https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L731 and
https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L900C3-L900C3
Either the former should use the root pass size or the later should use the subpass size. This usually isn't an issue because if something covers the root pass size it generally always covers the subpass size. But during the page transition, the scaled subpass ends up slightly bigger than the root pass size and so these conditions are mismatched:
Subpass size: (1550, 3188) root pass size (1440, 3036)
I think subpass size is correct. If the subpass is larger than the parent, then checking the parent size will give incorrect result.