-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/engine
#55856Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Fluttere: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Description
Impeller's assumedly staggered vertex layout beautifully mixes with the ImpellerC's generated headers to offer predictable and easy to use default vertex binding behavior that fits the bill for most use cases. However, there are times where taking full control of the vertex layout can offer performance benefits.
Examples:
- Structure of arrays: For
VerticesGeometry, theDisplayListvertices are given in an SOA structure, so we're forced to unnecessarily convert the data into a staggered form on the CPU before uploading to the GPU. - Binding vertices across multiple buffers: In [Impeller] Reduce overhead of rectangle and oval drawing with a shape buffer. #116165, being able to bind two buffers (one with only vertex positions and another with other attributes like position and color) would allow easy reuse of position buffers for common shapes regardless of the color source.
- Industry standard formats: Impeller is slated to help a lot of people do great things, some of which I believe will involve consuming industry standard 3D geometry intended for efficient runtime consumption by renderers. Vertex attributes for 3D models are often stored in an SOA format which can be uploaded directly to the GPU without conversion given the ability to control the vertex layout at runtime. Some formats, such as GLTF, even offer arbitrary vertex layout customization. Without control over the vertex layout, renderers build on Impeller that consume these standards will be forced to convert the geometry to a staggered form with a specific attribute ordering prior to GPU upload.
A good design for vertex layout customization would implicitly address #102778.
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Fluttere: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team