Skip to content

Conversation

@jonahwilliams
Copy link
Contributor

@jonahwilliams jonahwilliams commented Mar 19, 2025

Work towards #162033

  • barriers for render pass are not correct, but only causes a problem on powervr/imagination. Added new external subpass dependencies that have better descriptions for what they do. We now use the subpass to transition images that are sampled to the final shaderReadOnlylayout, while keeping swapchain images in eGeneral.

  • missing cache for render pass objects when using non-msaa passes. This mostly impacts powervr hardware because render pass construction is much slower there.

@github-actions github-actions bot added engine flutter/engine related. See also e: labels. e: impeller Impeller rendering backend issues and features requests labels Mar 19, 2025
@jonahwilliams
Copy link
Contributor Author

This should also impact the gaussian blur backdrop benchmark, since I switched those surfaces to be non-MSAA

@jonahwilliams jonahwilliams requested a review from gaaclarke March 19, 2025 19:20
Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

Looks good modulo one missing assert in the test and we can drop the cyclomatic complexity by removing the "bool is_swapchain" arguments from methods.

EXPECT_NE(texture_vk.GetCachedRenderPass(), nullptr);

render_pass->EncodeCommands();
GetContext()->GetCommandQueue()->Submit({buffer});
Copy link
Member

Choose a reason for hiding this comment

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

Assert the return result for Submit is a success. Maybe we should have [[nodiscard]] for that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Comment on lines 78 to +82
SharedHandleVK<vk::RenderPass> RenderPassVK::CreateVKRenderPass(
const ContextVK& context,
const SharedHandleVK<vk::RenderPass>& recycled_renderpass,
const std::shared_ptr<CommandBufferVK>& command_buffer) const {
const std::shared_ptr<CommandBufferVK>& command_buffer,
bool is_swapchain) const {
Copy link
Member

Choose a reason for hiding this comment

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

Instead of passing in a bool can you just have CreateVKRenderPass() and CreateSwapchainVKRenderPass()?

StoreAction store_action,
vk::ImageLayout current_layout) {
vk::ImageLayout current_layout,
bool is_swapchain) {
Copy link
Member

Choose a reason for hiding this comment

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

Instead of passing in a bool, why not pass in vk::ImageLayout final_layout?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We still need the logic in the render_pass_builder because the MSAA texture and resolve always need separate layouts. I'd rather leave this determination in the render_pass_builder

@jonahwilliams jonahwilliams requested a review from gaaclarke March 19, 2025 21:53
Copy link
Member

@gaaclarke gaaclarke 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 Mar 19, 2025
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 19, 2025
@auto-submit
Copy link
Contributor

auto-submit bot commented Mar 19, 2025

autosubmit label was removed for flutter/flutter/165497, because - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 19, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Mar 19, 2025
Merged via the queue into flutter:master with commit 125a2b7 Mar 20, 2025
175 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 25, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 25, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 27, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 28, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 28, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 28, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 28, 2025
github-merge-queue bot pushed a commit that referenced this pull request Mar 28, 2025
Not to be landed until #165497
lands.

We don't both to parse the model number until CXT and DXT as all prior
models shouldn't be used.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 29, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 29, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 30, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 30, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 1, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 1, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 1, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 1, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 21, 2025
zhangyuang pushed a commit to zhangyuang/flutter-fork that referenced this pull request Jun 9, 2025
…ed on non-MSAA. (flutter#165497)

Work towards flutter#162033

- barriers for render pass are not correct, but only causes a problem on
powervr/imagination. Added new external subpass dependencies that have
better descriptions for what they do. We now use the subpass to
transition images that are sampled to the final shaderReadOnlylayout,
while keeping swapchain images in eGeneral.

- missing cache for render pass objects when using non-msaa passes. This
mostly impacts powervr hardware because render pass construction is much
slower there.
zhangyuang pushed a commit to zhangyuang/flutter-fork that referenced this pull request Jun 9, 2025
Not to be landed until flutter#165497
lands.

We don't both to parse the model number until CXT and DXT as all prior
models shouldn't be used.
romanejaquez pushed a commit to romanejaquez/flutter that referenced this pull request Aug 14, 2025
…ed on non-MSAA. (flutter#165497)

Work towards flutter#162033

- barriers for render pass are not correct, but only causes a problem on
powervr/imagination. Added new external subpass dependencies that have
better descriptions for what they do. We now use the subpass to
transition images that are sampled to the final shaderReadOnlylayout,
while keeping swapchain images in eGeneral.

- missing cache for render pass objects when using non-msaa passes. This
mostly impacts powervr hardware because render pass construction is much
slower there.
romanejaquez pushed a commit to romanejaquez/flutter that referenced this pull request Aug 14, 2025
Not to be landed until flutter#165497
lands.

We don't both to parse the model number until CXT and DXT as all prior
models shouldn't be used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e: impeller Impeller rendering backend issues and features requests engine flutter/engine related. See also e: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants