-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] new blur: implemented ping ponging #49252
Conversation
Here is the performance measurement here. GPU time doesn't seem much effected. We'll have to measure the memory usage:
|
Here the memory usage is much lower than before (644MB vs 914MB): ![]() |
4ae71cd
to
c372642
Compare
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.
LGTM. I haven't run this patch locally but how this implementation makes sense to me.
@@ -405,13 +405,12 @@ bool ContentContext::IsValid() const { | |||
return is_valid_; | |||
} | |||
|
|||
std::shared_ptr<Texture> ContentContext::MakeSubpass( | |||
fml::StatusOr<RenderTarget> ContentContext::MakeSubpass( |
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.
I see, this is to make just reusing the same RenderTarget easy in the blur. I think this is fine.
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.
Yea, I had to do RenderTarget instead of Texture because of MSAA.
|
||
if (!pass3_out.ok()) { | ||
return std::nullopt; | ||
} |
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.
Ok, so I believe all of this works out such that all three passes should always wind up attaching color textures of size subpass_size
.
Since this optimization is contingent on the sizes being the same in order to render correctly, could you add a DCHECK that verifies the color attachment of the three passes is subpass_size
?
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.
This changes the return type of MakeSubpass to a RenderTarget.
c372642
to
66f6766
Compare
auto label is removed for flutter/engine/49252, due to - The status or check suite Linux linux_unopt has failed. Please fix the issues identified (or deflake) before re-applying this label. |
…140818) flutter/engine@a06926d...9d89f87 2024-01-02 30870216+gaaclarke@users.noreply.github.com [Impeller] new blur: implemented ping ponging (flutter/engine#49252) 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 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
This will reuse the downsample texture for the blur pass.
issue: flutter/flutter#140189
Testing: This has golden image coverage for the refactoring. There is a slight performance difference which will show up in benchmarks. Ideally there would also be a memory test for the blur. I don't think there is one yet.
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.