-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] only use porter duff or vertices.uber for drawVertices. #52345
[Impeller] only use porter duff or vertices.uber for drawVertices. #52345
Conversation
if (texture) { | ||
FS::BindTextureSamplerDst(pass, texture, dst_sampler); | ||
} else { | ||
// We need to bind something so validation layers doesn't complain. |
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.
The validation layers must be satisfied.
@@ -629,22 +646,6 @@ void ContentContext::InitializeCommonlyUsedShadersIfNeeded() const { | |||
options.stencil_mode = stencil_mode; | |||
CreateIfNeeded(clip_pipelines_, options); | |||
} | |||
|
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 don't need the bootstrap texture anymore since the empty texture warms the same shader cache but is actually useful.
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.
Done
…er (#52348) The drawAtlas component of #52345 . DrawAtlas did not have the same advanced blend/overlapping issues as draw vertices because of the sorting and generation of the sub-atlas, but given that the vertices uber shader exists we can just use that instead. Will eventually allow deleting the other drawVertices special case shaders.
PTAL @chinmaygarde / @bdero |
} else { | ||
texture = texture_; | ||
} | ||
} |
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.
Nit: If the texture is nullptr here, set it to the empty texture right away so you don't have to do all the null checks later? Stuff like the size, y scale coord, etc. will just work without additional checks.
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.
Ahh good idea 👍
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.
Done
@@ -715,6 +715,10 @@ class ContentContext { | |||
return GetPipeline(vertices_uber_shader_, opts); | |||
} | |||
|
|||
// An empty 1x1 texture for binding drawVertices/drawAtlas or other cases |
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.
Specify that its a 1x1 black transparent texture so callers can reason about potential issues with sampling and mixing from this empty texture.
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.
Done
…gine into remove_rest_of_vertices
auto label is removed for flutter/engine/52345, due to Pull request flutter/engine/52345 is not in a mergeable state. |
…147348) flutter/engine@b30c0a7...f48f3b6 2024-04-24 [email protected] [Impeller] only use porter duff or vertices.uber for drawVertices. (flutter/engine#52345) 2024-04-24 [email protected] Roll Fuchsia Linux SDK from le_-uFgRD5DjvvqgL... to PJBX8xxRnd5vCFnQM... (flutter/engine#52376) 2024-04-24 [email protected] [Impeller] Remove additional shader bootstrap. (flutter/engine#52368) 2024-04-24 [email protected] Remove TODO I will never do: `runIfNot` is deprecated. (flutter/engine#52308) 2024-04-24 [email protected] Roll Dart SDK from 38c43a01a51e to 9a0f141e9a67 (1 revision) (flutter/engine#52373) 2024-04-24 [email protected] [Impeller] Cleanup legacy StencilModes and document overdraw prevention. (flutter/engine#52372) 2024-04-24 [email protected] Roll Skia from afcc1db27593 to 864f6d868ec0 (1 revision) (flutter/engine#52371) 2024-04-24 [email protected] Move zlib to //flutter/third_party (flutter/engine#52366) Also rolling transitive DEPS: fuchsia/sdk/core/linux-amd64 from le_-uFgRD5Dj to PJBX8xxRnd5v 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://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
Once #52348 and #52345 land we can delete this shader Part of flutter/flutter#143540
Simplifcation that will allow us to remove the special case position_color.vert and vertices.frag shaders, not done here because drawAtlas also needs to be updated. This also fixes sparkle-party like rendering bugs where we incorrectly relied on a color filter.
The problem with doing advanced blends between the vertices with a color filters was three fold:
Below is an example of the incorrect rendering caused by overlapping vertices on the sparkle party app.
Skia (Advanced blend)
Impeller (ToT)
Impeller w/ patch
Fixes flutter/flutter#131345