Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Impeller] EntityPass::Clone needs to clone harder #45313

Merged
merged 2 commits into from
Sep 1, 2023

Conversation

jonahwilliams
Copy link
Member

@flutter-dashboard
Copy link

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.

Changes reported for pull request #45313 at sha 68931d1

@jonahwilliams
Copy link
Member Author

These goldens look really weird...

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

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

LGTM, would appreciate a review from @bdero as well

@jonahwilliams
Copy link
Member Author

I'm not sure if this is entirely right or if I'm missing something, goldens look very different locally...

@jonahwilliams
Copy link
Member Author

Goldens look like the pictures keep building up

Copy link
Member

@bdero bdero left a comment

Choose a reason for hiding this comment

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

LGTM. Haven't checked the mentioned discrepancies w/ the local playgrounds.

pass->delegate_ = delegate_;
// Note: I tried also adding flood clip and bounds limit but one of the
// two caused rendering in wonderous to break. It's 10:51 PM, and I'm
// ready to move on.
Copy link
Member

Choose a reason for hiding this comment

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

Follow-up bug for investigating? The bounds limit might need to be transformed when the pass is applied with DrawPicture.

pass->backdrop_filter_reads_from_pass_texture_ =
backdrop_filter_reads_from_pass_texture_;
pass->advanced_blend_reads_from_pass_texture_ =
advanced_blend_reads_from_pass_texture_;
Copy link
Member

Choose a reason for hiding this comment

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

(These read-counts are what's important for DrawPicture.)

Copy link
Member Author

Choose a reason for hiding this comment

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

You need the readcounts, the delegate, and the backdrop proc or wonderous will crash.

Copy link
Member

Choose a reason for hiding this comment

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

That shouldn't be the case if the cloned pass is being used for DrawPicture (the elements are copied inline and these values should get discarded).

Copy link
Member

Choose a reason for hiding this comment

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

For the delegate and backdrop proc, that is. The read counts are important.

Copy link
Member Author

Choose a reason for hiding this comment

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

I can confirm that wonderous does not work correctly without copying the backdrop prop and entity delegate. Maybe the entity delegate doesn't need to be copied but it does need to be set to a non-default value.

Let me double check that.

Copy link
Member

@bdero bdero Sep 1, 2023

Choose a reason for hiding this comment

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

Ah nevermind, we don't need these for the base pass/inline merge, but we definitely need to copy them for the recursive clone, otherwise Very Bad Things will happen:

new_elements.push_back(subpass->get()->Clone());

@jonahwilliams
Copy link
Member Author

This still isn't right though, here is what the backdrop blur output is giving me on Vulkan:

image

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 1, 2023
@auto-submit auto-submit bot merged commit 66e53ee into flutter:main Sep 1, 2023
@jonahwilliams jonahwilliams deleted the fix_clone branch September 1, 2023 17:24
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 1, 2023
fluttermirroringbot pushed a commit to flutter/flutter that referenced this pull request Sep 2, 2023
…133879)

flutter/engine@d00b69a...489c399

2023-09-01 matanlurey@users.noreply.github.com Update (flipping the default from false -> true) and deprecate Paint.enableDithering. (flutter/engine#44705)
2023-09-01 jonahwilliams@google.com [Impeller] EntityPass::Clone needs to clone harder (flutter/engine#45313)
2023-09-01 ychris@google.com Reland "ios: remove shared_application and support app extension build #44732" (flutter/engine#45351)

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 aaclarke@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App e: impeller will affect goldens
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Impeller] EntityPass::Clone fails to copy most properties of entity pass, causing issues with DlAiksCanvas
3 participants