-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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] Reduce render-pass overhead when using wide gamut (iOS) #131567
Comments
The amount of work required to calculate the blurs doesn't depend on the sigma value. Check out edit: Maybe the dart sigma value is used to calculate the blur radius? |
The sigma (as specified in |
Thanks, that makes more sense. I didn't know we don't have a separate knob for radius at the dart level. |
This is related to making all blurs faster and just happens to show up more urgently when wide-gamut is enabled. That work is tracked in #131580. Closing as duplicate. |
@chinmaygarde, the |
Ah, my bad. That makes sense. Can we reword this to describe the action-item instead of the symptom? |
@knopp I'm not getting similar numbers to you, can you post your full trace for this application? |
Attached are traces for current main with wide gamut enabled and disabled. Tomorrow I'll try to publish a branch with MSAA backdrop disabled and appropriate. This is on iPhone 13 Pro. |
@jonahwilliams, I was playing with this and it seems initially I missed that for MSAA backdrop removal to perform better, it is also necessary to reuse textures. Without reusing textures removing MSAA backdrop performs much worse. no-msaa-backdrop-reuse-textures dart_devtools_2023-08-15_01_11_41.977.json.zip Here is my branch I tested this with: https://github.com/knopp/engine/commits/remove_msaa_backdrop |
FWIW we've started recylcing render target textures after flutter/engine#44527 Very simple herustics, but seem to get a good hit rate locally. |
As discovered by @knopp in flutter/flutter#131567 (comment), this is actually reducing performance substantially when there are multiple blurs. In the case of flutter/flutter#132735 , removing this capbility improves GPU performance from 400ms per frame to ~100 ms per frame. Fixes flutter/flutter#131567 (comment) ----- Â | Macrobench | Example App -- | -- | -- TOT | 250 | 450 W/Out OnScreen | 203-187 | 125-109 W/Out Onscreen and Resolve | 203 | 125
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 |
Consider the following example:
code
screenshot
It has 6 blur backdrops with sigma=1 (to focus on render pass overhead and not blur filter performance).
This is the performance on A15 (iPhone 13 Pro) with wide gamut disabled:
and wide gamut enabled:
I tried couple of things to figure out why the regression is so large:
I noticed that there is quite a lot of texture allocation per frame. Caching textures improved the frame time by around 1-1.5ms.
Biggest bottleneck by far seems to be the blits for
MSAA backdrop
. They take around 80% of frame time.Disabling
MSAA backdrop
(reverting back toLoadAction::kLoad
+StoreAction::kStoreAndMultisampleResolve
/kMultisampleResolve
) seems to improve the performance considerably:cc @gaaclarke, @bdero, @jonahwilliams
The text was updated successfully, but these errors were encountered: