-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] use spec constant for gaussian shader, rename, and reuse vertex sources. #52361
Conversation
| TextureFillStrictSrcFragmentShader>; | ||
| using TiledTexturePipeline = | ||
| RenderPipelineHandle<TextureUvFillVertexShader, | ||
| TiledTextureFillFragmentShader>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes here is the gaussian, morph, and border mask filters all have identical vertex stages so they can share them now.
Likewise, vertices_uber and porter duff have identical vertex stages.
Also we don't need two gaussians, only ever need one.
gaaclarke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything thing looks good. I think now that we have this setup as an example it will hopefully reduce future pipeline bloat.
We should keep the kernel.glsl filename though to promote shader resuse. Renaming all of the typedefs Kernel->Gaussian sounds good to me though.
| #include <impeller/gaussian.glsl> | ||
| #include <impeller/texture.glsl> | ||
| #include <impeller/types.glsl> | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should keep the name of this file as kernel.glsl since our goal is to minimize the number of shaders and this shader isn't specific to gaussian blur.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd argue we could pursue that if we have a use for that, but until then YAGNI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's nothing to pursue, it's already in a good state, just undo the changes =) Had we named our shaders based on what they do versus what they are used for in the past we may not have had to do all this cleanup now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its only used for a gaussian blur, the name is more correct
…nd reuse vertex sources. (flutter/engine#52361)
…nd reuse vertex sources. (flutter/engine#52361)
…147336) flutter/engine@b5d5832...b30c0a7 2024-04-24 15619084+vashworth@users.noreply.github.com Remove UIAccessibilityTraitKeyboardKey to fix touch typing (flutter/engine#52333) 2024-04-24 bdero@google.com [Impeller] Remove libtess2 from libflutter. (flutter/engine#52357) 2024-04-24 skia-flutter-autoroll@skia.org Roll Skia from 510b6766d907 to afcc1db27593 (2 revisions) (flutter/engine#52367) 2024-04-24 yjbanov@google.com [web:tests] switch to new HTML DOM matcher (flutter/engine#52354) 2024-04-24 jonahwilliams@google.com [Impeller] use spec constant for gaussian shader, rename, and reuse vertex sources. (flutter/engine#52361) 2024-04-24 jonahwilliams@google.com [Impeller] delete points compute shader. (flutter/engine#52346) 2024-04-24 byoungchan.lee@gmx.com [darwin] Update pixel format handling in FlutterTexture (flutter/engine#52326) 2024-04-24 jonahwilliams@google.com [Impeller] make drawAtlas always use porterduff or vertices_uber shader (flutter/engine#52348) 2024-04-24 magder@google.com Migrate ios_surface files to ARC (flutter/engine#52139) 2024-04-24 skia-flutter-autoroll@skia.org Roll Dart SDK from f470eaaf6e6d to 38c43a01a51e (1 revision) (flutter/engine#52365) 2024-04-24 skia-flutter-autoroll@skia.org Roll Skia from b5dd23bd29df to 510b6766d907 (16 revisions) (flutter/engine#52364) 2024-04-24 jason-simmons@users.noreply.github.com Fix some warnings reported by recent versions of clang-tidy (flutter/engine#52349) 2024-04-24 skia-flutter-autoroll@skia.org Roll Skia from e15464e6e982 to b5dd23bd29df (1 revision) (flutter/engine#52353) 2024-04-24 skia-flutter-autoroll@skia.org Roll Dart SDK from 5227dc5103f6 to f470eaaf6e6d (1 revision) (flutter/engine#52359) 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 jimgraham@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://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Reduces shader count slightly, and reduces duplication of source code for vertex stages that are identical.
Part of flutter/flutter#143540