Skip to content
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] leave glyph atlas in transfer dst to improve vulkan throughput. #52908

Merged
merged 4 commits into from
May 20, 2024

Conversation

jonahwilliams
Copy link
Member

On the vulkan backend everytime we blit a glyph we go shader read -> transfer dst -> shader read. This is pretty inefficient if we're appending many glyphs.

Poke a hole in the blitpass API so we can leave the glyph atlas in transfer_dst to reduce the number of layout transitions.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@jonahwilliams jonahwilliams force-pushed the batch_render_glyphs_sometimes branch from b167bca to c64d201 Compare May 17, 2024 19:31
@@ -96,6 +101,8 @@ class BlitPass {
/// command.
/// @param[in] slice For cubemap textures, the slice to write
/// data to.
/// @param[in] convert_to_read Whether to convert the texture to a shader
Copy link
Member

Choose a reason for hiding this comment

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

I suppose we can convert this to a UsageHints mask if we need to add more. How about set_read_usage_hint or something similar to indicate this is advisory?

Copy link
Member Author

Choose a reason for hiding this comment

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

The odd part is that this isn't advisory for Vulkan, you'll hit an error state if you bind the dest texture without this (assuming you opted out of shader read conversion).

We need a better system for determining layout transitions but I'm not sure what this is right now. Usage hints doesn't feel like the right approach since its a union of possible states and not the current state.

Copy link
Member

Choose a reason for hiding this comment

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

You mentioned tracking the layouts at the queue level per image once. That seems like a good idea. Have we documented it in an issue?

Copy link
Member Author

Choose a reason for hiding this comment

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

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label May 20, 2024
@auto-submit auto-submit bot merged commit 8eba63f into flutter:main May 20, 2024
29 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 20, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 20, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request May 20, 2024
…148722)

flutter/engine@a8fb9da...c2ef01f

2024-05-20 [email protected] Update file permissions for FlutterMacOS.framework (flutter/engine#52930)
2024-05-20 [email protected] [Impeller] leave glyph atlas in transfer dst to improve vulkan throughput. (flutter/engine#52908)
2024-05-20 [email protected] Roll Dart SDK from 54c384453207 to 08f4324c988b (1 revision) (flutter/engine#52931)

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] 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App e: impeller
Projects
None yet
2 participants