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

Conversation

jonahwilliams
Copy link
Contributor

Work towards flutter/flutter#123468

In order to support the usage of BufferView, I generalized the tracked buffer type from DeviceBuffer to Buffer. Should be mostly safe!

I confirmed that this runs correctly under moltenvk but I'm uncertain if there are additional ways to validate.

transition.src_stage = vk::PipelineStageFlagBits::eFragmentShader |
vk::PipelineStageFlagBits::eTransfer |
vk::PipelineStageFlagBits::eColorAttachmentOutput;
transition.dst_access = vk::AccessFlagBits::eShaderRead;
Copy link
Member

Choose a reason for hiding this comment

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

The mnemonic I use for transitions is "For this resource, all the commands before this may continue to src_access in src_stage and no commands after this proceed past dst_access in dst_stage.". I believe the src accesses here are right. You are waiting for any commands before this blit that write, transfer, specify this resource as color attachment as to finish. But, you are going to be using this as a blit source (I believe these are "transfers" in Vulkan parlance). So commands that read or transfer from it must wait.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, poop. Sorry, its the other way round. What I said was TextureToBuffer.

jonahwilliams added 2 commits May 3, 2023 13:10
Comment on lines +174 to +176
vk::AccessFlagBits::eShaderRead | vk::AccessFlagBits::eTransferWrite;
dst_tran.dst_stage = vk::PipelineStageFlagBits::eFragmentShader |
vk::PipelineStageFlagBits::eTransfer;
Copy link
Contributor Author

@jonahwilliams jonahwilliams May 3, 2023

Choose a reason for hiding this comment

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

Needed to update the dst access and stage to incude transfer.

@jonahwilliams jonahwilliams requested a review from chinmaygarde May 3, 2023 20:58
@jonahwilliams
Copy link
Contributor Author

@chinmaygarde PTAL

@chinmaygarde chinmaygarde changed the title [Impeller] add buffer to texture blit for Vulkan [Impeller] Add buffer to texture blit for Vulkan. May 21, 2023
@jonahwilliams jonahwilliams requested a review from dnfield June 6, 2023 18:55
Comment on lines 418 to 419
// TODO(jonahwilliams): remove ifdef once blit from buffer to texture
// is implemented on other platforms.
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove todo? There's no longer an ifdef.

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 7, 2023
@auto-submit auto-submit bot merged commit 1089ce6 into flutter:main Jun 7, 2023
@jonahwilliams jonahwilliams deleted the try_vulkan branch June 7, 2023 19:37
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 7, 2023
zanderso pushed a commit to flutter/flutter that referenced this pull request Jun 7, 2023
…128460)

flutter/engine@4f4486b...1089ce6

2023-06-07 [email protected] [Impeller] Add buffer to texture
blit for Vulkan. (flutter/engine#41706)
2023-06-07 [email protected] [macOS] Add platformview creation parameter
support (flutter/engine#42607)
2023-06-07 [email protected] [Impeller] Added
a switch to turn on vulkan (flutter/engine#42585)
2023-06-07 [email protected] Roll ANGLE from f8220fa3a729
to 15a29438b099 (1 revision) (flutter/engine#42627)
2023-06-07 [email protected] Bump Chrome version to 114 for
testing (flutter/engine#42623)
2023-06-07 [email protected] Roll Skia from d607cbb0db78 to
773765ca1dd2 (7 revisions) (flutter/engine#42624)
2023-06-07 [email protected] [Linux][a11y] implement
AtkText::get_text/string_at_offset() (flutter/engine#38144)
2023-06-07 [email protected] Roll ANGLE from 176989ad00cc
to f8220fa3a729 (1 revision) (flutter/engine#42621)
2023-06-07 [email protected] Roll Skia from ee90e9ae2e62 to
d607cbb0db78 (1 revision) (flutter/engine#42618)
2023-06-07 [email protected] Roll ANGLE from 1ad4ae4d63bf
to 176989ad00cc (1 revision) (flutter/engine#42617)
2023-06-07 [email protected] Revert "[Android] Return
keyboard pressed state" (flutter/engine#42616)
2023-06-07 [email protected] Roll Skia from bde894438f29 to
ee90e9ae2e62 (1 revision) (flutter/engine#42614)
2023-06-07 [email protected] Roll Fuchsia Linux SDK from
lpbkSRJBMkPs0FM7_... to sEHtHM1iFt79roP-x... (flutter/engine#42613)
2023-06-07 [email protected] Roll Skia from cd3e1665dcd1 to
bde894438f29 (1 revision) (flutter/engine#42612)
2023-06-07 [email protected] Roll ANGLE from 16841d6256da
to 1ad4ae4d63bf (1 revision) (flutter/engine#42611)
2023-06-07 [email protected] [Impeller] Reland 2: Add Impeller Metal
support in the embedder API (#42411) (flutter/engine#42597)
2023-06-07 [email protected] Roll Skia from a01f49f539ab to
cd3e1665dcd1 (1 revision) (flutter/engine#42610)
2023-06-07 [email protected] Roll Fuchsia Mac SDK from
atrYtfHWi2cmV9B_C... to ojwVlxZWrbsG4WGSE... (flutter/engine#42609)
2023-06-07 [email protected] Roll Skia from 521b8c4bb011 to
a01f49f539ab (4 revisions) (flutter/engine#42608)
2023-06-07 [email protected] Roll Skia from cef18d10b363 to
521b8c4bb011 (1 revision) (flutter/engine#42605)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from lpbkSRJBMkPs to sEHtHM1iFt79
  fuchsia/sdk/core/mac-amd64 from atrYtfHWi2cm to ojwVlxZWrbsG

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

Successfully merging this pull request may close these issues.

3 participants