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

[Impeller] remove extra buffer usage in compute. #50415

Merged

Conversation

jonahwilliams
Copy link
Member

Previously we were not able to effectively reserve host buffer regions, as these would map to host only memory and later be converted to device memory. Now that the host buffer is always device memory, we don't need to create compute specific buffers for the point_field_geometry.

@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.

Comment on lines +161 to +162
BufferView geometry_buffer =
host_buffer.Emplace(nullptr, total * sizeof(Point), alignof(Point));
Copy link
Member Author

Choose a reason for hiding this comment

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

Emplace nullptr essentially reserves regions of the hostbuffer which can be bound as read/write for other stages. The safety of this is enforced via barrier we insert below.

@jonahwilliams jonahwilliams requested a review from bdero February 8, 2024 17:12
@johnmccutchan
Copy link
Contributor

test-exempt: performance

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!

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 8, 2024
@auto-submit auto-submit bot merged commit fb99a84 into flutter:main Feb 8, 2024
@jonahwilliams jonahwilliams deleted the remove_compute_extra_buffer branch February 8, 2024 17:24
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 8, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Feb 8, 2024
…143169)

flutter/engine@3fb60b8...fb99a84

2024-02-08 jonahwilliams@google.com [Impeller] remove extra buffer usage in compute. (flutter/engine#50415)

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 chinmaygarde@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://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 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants