-
Notifications
You must be signed in to change notification settings - Fork 6k
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] Add UV compute shader. #42192
Conversation
DeviceBufferDescriptor buffer_desc; | ||
buffer_desc.size = total * sizeof(Point); | ||
buffer_desc.storage_mode = StorageMode::kDevicePrivate; | ||
|
||
auto geometry_buffer = renderer.GetContext() |
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.
Small discovery, if I use buffers allocated from the compute passes transients buffer, then the second compute pass doesn't correctly synchronize on the completion on the first. I suspect metal is tracking buffer inputs/outputs to do automatic fences and the singular buffer defeats that detection.
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include <impeller/texture.glsl> |
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.
This isn't specific to draw points and can be used with any of our geometries.
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. |
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.
Flutter: The fastest way to draw points anywhere?
This makes me think I should start looking at getting compute going on Vulkan next.
LGTM
…127364) flutter/engine@a342a91...2a325ee 2023-05-22 skia-flutter-autoroll@skia.org Roll Dart SDK from b3e1eeda4918 to 1ca8f8368ecc (5 revisions) (flutter/engine#42224) 2023-05-22 jason-simmons@users.noreply.github.com [Impeller] Return image decoder error messages to the Dart API (flutter/engine#42175) 2023-05-22 5236035+fzyzcjy@users.noreply.github.com Again a two-word super tiny typo (flutter/engine#42181) 2023-05-22 ychris@google.com Reland "[ios_platform_view] only recycle maskView when the view is applying mutators #41573" (flutter/engine#42115) 2023-05-22 jason-simmons@users.noreply.github.com [Impeller] Use untransformed text bounds to calculate the size of ColorSourceTextContents (flutter/engine#42142) 2023-05-22 jonahwilliams@google.com [Impeller] Add UV compute shader. (flutter/engine#42192) 2023-05-22 jonahwilliams@google.com [Impeller] remove final cmd buffer waitUntilScheduled on physical iOS (flutter/engine#42160) 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://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
…sions) (#127369) Manual roll requested by zra@google.com flutter/engine@a342a91...2586cbe 2023-05-23 zanderso@users.noreply.github.com Revert "[ios_platform_view] only recycle maskView when the view is applying mutators #41573" (flutter/engine#42231) 2023-05-23 skia-flutter-autoroll@skia.org Roll Skia from ac87929b3d2e to 6a57876d0e44 (2 revisions) (flutter/engine#42230) 2023-05-23 skia-flutter-autoroll@skia.org Roll Fuchsia Mac SDK from QAwORJOkyNl4J3x4Y... to DzmjiSg6XC0JUfbKP... (flutter/engine#42227) 2023-05-23 skia-flutter-autoroll@skia.org Manual roll Dart SDK from b3e1eeda4918 to 1ca8f8368ecc (5 revisions) (flutter/engine#42229) 2023-05-23 skia-flutter-autoroll@skia.org Roll Skia from d448fe07ea46 to ac87929b3d2e (8 revisions) (flutter/engine#42226) 2023-05-23 dnfield@google.com Make FML_LOG safe from static initialization (flutter/engine#42219) 2023-05-23 uysalere@gmail.com [fuchsia] Bind ChildViewWatcher on platform thread (flutter/engine#42222) 2023-05-22 skia-flutter-autoroll@skia.org Roll Dart SDK from b3e1eeda4918 to 1ca8f8368ecc (5 revisions) (flutter/engine#42224) 2023-05-22 jason-simmons@users.noreply.github.com [Impeller] Return image decoder error messages to the Dart API (flutter/engine#42175) 2023-05-22 5236035+fzyzcjy@users.noreply.github.com Again a two-word super tiny typo (flutter/engine#42181) 2023-05-22 ychris@google.com Reland "[ios_platform_view] only recycle maskView when the view is applying mutators #41573" (flutter/engine#42115) 2023-05-22 jason-simmons@users.noreply.github.com [Impeller] Use untransformed text bounds to calculate the size of ColorSourceTextContents (flutter/engine#42142) 2023-05-22 jonahwilliams@google.com [Impeller] Add UV compute shader. (flutter/engine#42192) 2023-05-22 jonahwilliams@google.com [Impeller] remove final cmd buffer waitUntilScheduled on physical iOS (flutter/engine#42160) Also rolling transitive DEPS: fuchsia/sdk/core/mac-amd64 from QAwORJOkyNl4 to DzmjiSg6XC0J 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://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
…lutter#127364) flutter/engine@a342a91...2a325ee 2023-05-22 skia-flutter-autoroll@skia.org Roll Dart SDK from b3e1eeda4918 to 1ca8f8368ecc (5 revisions) (flutter/engine#42224) 2023-05-22 jason-simmons@users.noreply.github.com [Impeller] Return image decoder error messages to the Dart API (flutter/engine#42175) 2023-05-22 5236035+fzyzcjy@users.noreply.github.com Again a two-word super tiny typo (flutter/engine#42181) 2023-05-22 ychris@google.com Reland "[ios_platform_view] only recycle maskView when the view is applying mutators flutter#41573" (flutter/engine#42115) 2023-05-22 jason-simmons@users.noreply.github.com [Impeller] Use untransformed text bounds to calculate the size of ColorSourceTextContents (flutter/engine#42142) 2023-05-22 jonahwilliams@google.com [Impeller] Add UV compute shader. (flutter/engine#42192) 2023-05-22 jonahwilliams@google.com [Impeller] remove final cmd buffer waitUntilScheduled on physical iOS (flutter/engine#42160) 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://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
…sions) (flutter#127369) Manual roll requested by zra@google.com flutter/engine@a342a91...2586cbe 2023-05-23 zanderso@users.noreply.github.com Revert "[ios_platform_view] only recycle maskView when the view is applying mutators flutter#41573" (flutter/engine#42231) 2023-05-23 skia-flutter-autoroll@skia.org Roll Skia from ac87929b3d2e to 6a57876d0e44 (2 revisions) (flutter/engine#42230) 2023-05-23 skia-flutter-autoroll@skia.org Roll Fuchsia Mac SDK from QAwORJOkyNl4J3x4Y... to DzmjiSg6XC0JUfbKP... (flutter/engine#42227) 2023-05-23 skia-flutter-autoroll@skia.org Manual roll Dart SDK from b3e1eeda4918 to 1ca8f8368ecc (5 revisions) (flutter/engine#42229) 2023-05-23 skia-flutter-autoroll@skia.org Roll Skia from d448fe07ea46 to ac87929b3d2e (8 revisions) (flutter/engine#42226) 2023-05-23 dnfield@google.com Make FML_LOG safe from static initialization (flutter/engine#42219) 2023-05-23 uysalere@gmail.com [fuchsia] Bind ChildViewWatcher on platform thread (flutter/engine#42222) 2023-05-22 skia-flutter-autoroll@skia.org Roll Dart SDK from b3e1eeda4918 to 1ca8f8368ecc (5 revisions) (flutter/engine#42224) 2023-05-22 jason-simmons@users.noreply.github.com [Impeller] Return image decoder error messages to the Dart API (flutter/engine#42175) 2023-05-22 5236035+fzyzcjy@users.noreply.github.com Again a two-word super tiny typo (flutter/engine#42181) 2023-05-22 ychris@google.com Reland "[ios_platform_view] only recycle maskView when the view is applying mutators flutter#41573" (flutter/engine#42115) 2023-05-22 jason-simmons@users.noreply.github.com [Impeller] Use untransformed text bounds to calculate the size of ColorSourceTextContents (flutter/engine#42142) 2023-05-22 jonahwilliams@google.com [Impeller] Add UV compute shader. (flutter/engine#42192) 2023-05-22 jonahwilliams@google.com [Impeller] remove final cmd buffer waitUntilScheduled on physical iOS (flutter/engine#42160) Also rolling transitive DEPS: fuchsia/sdk/core/mac-amd64 from QAwORJOkyNl4 to DzmjiSg6XC0J 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://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
Adds a compute shader that computes the UV mapping for an arbitrary geometry. Use it with drawPoints since I didn't realize it was possible to use an image shader with this 😆 .