Skip to content

[Impeller] Follow CmdPool best practices from ARM documentation. #133198

@jonahwilliams

Description

@jonahwilliams

note: edited by @matanlurey.

@jonahwilliams:

Today we reset individual cmd buffers, but that can be really slow. We should follow the best practices in https://arm-software.github.io/vulkan_best_practice_for_mobile_developers/samples/performance/command_buffer_usage/command_buffer_usage_tutorial.html and create 1 cmd pool per thread/per frame. Once the pool usage is complete (via fence waiter), we can reset and recycle.

CMD buffer reset accounts for most of cmd pool creation time right now:

image


To reproduce this:

# Don't use a unopt build, as we will be profiling C++ code.
cd $ENGINE
./flutter/tools/gn --android --android-cpu=arm64 --enable-vulkan --no-stripped --no-lto

# "fl" is a local flutter tool, i.e. $FRAMEWORK
fl run --local-engine=$ENGINE/out/android_debug_arm64 --local-engine-host=host_debug_unopt_arm64

dev/integration_tests/flutter_gallery/android/app/build.gradle in the android { ... } section:

+    packagingOptions{
+        doNotStrip "**/*.so"
+    }

dev/integration_tests/flutter_gallery/android/app/src/main/AndroidManifest.xml:

+        <meta-data
+            android:name="io.flutter.embedding.android.EnableImpeller"
+            android:value="true" />

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work liste: impellerImpeller rendering backend issues and features requeststeam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions