This repository was archived by the owner on Feb 25, 2025. It is now read-only.
[Impeller] Provide fragment uniform data through varyings for solid color, glyph atlas, texture shaders.#43838
Merged
auto-submit[bot] merged 7 commits intoflutter:mainfrom Jul 20, 2023
Conversation
jonahwilliams
commented
Jul 20, 2023
| @@ -12,11 +12,11 @@ uniform f16sampler2D texture_sampler; | |||
| uniform FragInfo { | |||
| float16_t x_tile_mode; | |||
| float16_t y_tile_mode; | |||
Contributor
Author
There was a problem hiding this comment.
We don't used the tiled texture shader on vulkan, but we still need to move the alpha so that this can share the same vertex shader as texture.frag.
chinmaygarde
approved these changes
Jul 20, 2023
| #ifdef IMPELLER_TARGET_OPENGLES | ||
| #define IMPELLER_FLAT | ||
| #else | ||
| #define IMPELLER_FLAT flat |
Contributor
There was a problem hiding this comment.
We should call thin IMPELLER_MAYBE_FLAT. Right now, we only use flat as an optimization to reduce load on the varying unit. But someone might actually start using it in the future to disregard non-provoking vertices and will be confused as to why it doesn't work on OpenGL ES.
added 2 commits
July 20, 2023 13:02
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jul 20, 2023
… solid color, glyph atlas, texture shaders. (flutter/engine#43838)
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Jul 20, 2023
flutter/engine@9b2ebf2...ab7d424 2023-07-20 jonahwilliams@google.com [Impeller] Provide fragment uniform data through varyings for solid color, glyph atlas, texture shaders. (flutter/engine#43838) 2023-07-20 skia-flutter-autoroll@skia.org Roll ANGLE from a4c283be741f to f2e0f8a0b236 (2 revisions) (flutter/engine#43864) 2023-07-20 skia-flutter-autoroll@skia.org Roll Skia from 18e834916f47 to 100d0f858f02 (7 revisions) (flutter/engine#43863) 2023-07-20 skia-flutter-autoroll@skia.org Roll Fuchsia Mac SDK from SmAtKPfGzPllC9gfO... to -SaPL-46jpiYbnCAu... (flutter/engine#43862) Also rolling transitive DEPS: fuchsia/sdk/core/mac-amd64 from SmAtKPfGzPll to -SaPL-46jpiY 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 bdero@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
harryterkelsen
pushed a commit
to harryterkelsen/engine
that referenced
this pull request
Jul 20, 2023
…olor, glyph atlas, texture shaders. (flutter#43838) From experimentation, providing these values through varyings runs substantially faster on Pixel devices. Alternative solutions to use f16 or push constants did not improve things substantially. These subset of shaders are used very heavily and so they benefit from this change more substantially. I don't think this is applicable to all shaders as there is going to be an additional varying interpolation cost. See also: [go/impeller-slow-fragment-shader](http://goto.google.com/impeller-slow-fragment-shader)
gaaclarke
added a commit
to gaaclarke/engine
that referenced
this pull request
Jul 25, 2023
… solid color, glyph atlas, texture shaders. (flutter#43838)" This reverts commit ab7d424.
LouiseHsu
pushed a commit
to LouiseHsu/flutter
that referenced
this pull request
Jul 31, 2023
…1015) flutter/engine@9b2ebf2...ab7d424 2023-07-20 jonahwilliams@google.com [Impeller] Provide fragment uniform data through varyings for solid color, glyph atlas, texture shaders. (flutter/engine#43838) 2023-07-20 skia-flutter-autoroll@skia.org Roll ANGLE from a4c283be741f to f2e0f8a0b236 (2 revisions) (flutter/engine#43864) 2023-07-20 skia-flutter-autoroll@skia.org Roll Skia from 18e834916f47 to 100d0f858f02 (7 revisions) (flutter/engine#43863) 2023-07-20 skia-flutter-autoroll@skia.org Roll Fuchsia Mac SDK from SmAtKPfGzPllC9gfO... to -SaPL-46jpiYbnCAu... (flutter/engine#43862) Also rolling transitive DEPS: fuchsia/sdk/core/mac-amd64 from SmAtKPfGzPll to -SaPL-46jpiY 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 bdero@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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From experimentation, providing these values through varyings runs substantially faster on Pixel devices. Alternative solutions to use f16 or push constants did not improve things substantially.
These subset of shaders are used very heavily and so they benefit from this change more substantially. I don't think this is applicable to all shaders as there is going to be an additional varying interpolation cost.
See also: go/impeller-slow-fragment-shader