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

[Impeller] re-enable buffer to texture blit Vulkan. #43129

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

jonahwilliams
Copy link
Member

I was missing the VMA flush.

Because skia is writing directly to the exposed ptr, we don't go through the OnSetContents which makes a flush call. Add a flush API and implement it for Vk DeviceBuffers.

@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 Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on 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 +513 to +515
if (buffer_.has_value()) {
buffer_.value()->Flush();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the right time to flush?

Why not flush it explicitly in the blit pass where it's getting used?

Copy link
Member Author

Choose a reason for hiding this comment

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

we only need to flush here because we've written directly to the ptr due to the skia interop. Adding the flush anywhere else would cause extra work, as if the buffer was populated with setcontents that would be redundant

Copy link
Contributor

Choose a reason for hiding this comment

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

I misread which class this was in. LGTM.

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 23, 2023
@auto-submit auto-submit bot merged commit 34f9837 into flutter:main Jun 23, 2023
@jonahwilliams jonahwilliams deleted the reuse_staging_buffers branch June 23, 2023 16:28
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 23, 2023
fluttermirroringbot pushed a commit to flutter/flutter that referenced this pull request Jun 23, 2023
…129440)

flutter/engine@cd30a48...060cd9c

2023-06-23 chillers@google.com [impeller] Explicitly cast enum class to int before passing it to a formatted string (flutter/engine#43139)
2023-06-23 54558023+keyonghan@users.noreply.github.com Add osx_sdk context to mac_clang_tidy (flutter/engine#43115)
2023-06-23 jonahwilliams@google.com [Impeller] re-enable buffer to texture blit Vulkan. (flutter/engine#43129)

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 jsimmons@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://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
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 needs tests
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants