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

Conversation

@bdero
Copy link
Member

@bdero bdero commented Jul 18, 2023

Remove the color attachment completely in Metal and Vulkan clips.

When the color write mask is set to all false, Metal is smart about not executing the fragment shader at all, but some Vulkan and GL drivers may not be. GL requires binding shader objects to draw, and so a cap check is needed here.

In the future, we could add minimal no-op shaders to use with the GL clip pipeline to shave off a few flops on drivers that aren't smart about the color write mask.

@bdero bdero self-assigned this Jul 18, 2023
@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.

@bdero bdero changed the title [Impeller] Disable color attachment on clip pipelines [Impeller] Disable color attachment on clip pipelines for Metal & Vulkan. Jul 18, 2023
Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM

@bdero bdero merged commit 1a8edf0 into flutter:main Jul 19, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 19, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jul 19, 2023
yaakovschectman pushed a commit to yaakovschectman/flutter-engine that referenced this pull request Jul 19, 2023
…kan. (flutter#43781)

Remove the color attachment completely in Metal and Vulkan clips.

When the color write mask is set to all false, Metal is smart about not
executing the fragment shader at all, but some Vulkan and GL drivers may
not be. GL requires binding shader objects to draw, and so a cap check
is needed here.

In the future, we could add minimal no-op shaders to use with the GL
clip pipeline to shave off a few flops on drivers that aren't smart
about the color write mask.
@zanderso
Copy link
Member

@chinmaygarde
Copy link
Member

Looks good. It seems to be stable too.

harryterkelsen pushed a commit to harryterkelsen/engine that referenced this pull request Jul 20, 2023
…kan. (flutter#43781)

Remove the color attachment completely in Metal and Vulkan clips.

When the color write mask is set to all false, Metal is smart about not
executing the fragment shader at all, but some Vulkan and GL drivers may
not be. GL requires binding shader objects to draw, and so a cap check
is needed here.

In the future, we could add minimal no-op shaders to use with the GL
clip pipeline to shave off a few flops on drivers that aren't smart
about the color write mask.
bdero added a commit to bdero/flutter-engine that referenced this pull request Jul 24, 2023
LouiseHsu pushed a commit to LouiseHsu/flutter that referenced this pull request Jul 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants