Material Shader Statistics With Adreno Offline Compiler
Updated: Dec 26, 2024
Right now, you can view the cost of materials with Platform Stats in Material Editor by specifying Mali Offline Compiler as shown in “
UE Material Editor UI”. This enhancement is to support Adreno Offline Compiler (AOC) which provides more shader statstics for Adreno GPU.
At this moment, only Android Vulkan shaders stats are supported by AOC. Please refer to the OfflineCompiler.html in the AOC installation folder about further AOC details.
Note: This feature is available in the Meta GitHub fork for UE4.27 and UE5, and in Epic’s Marketplace for UE5.5 and later.
Steps to view shader stats with AOC:
- Go to Edit>Editor Preferences in the menu bar, and open the Material Editor in the dialog, choose AOC as the below image.
- GPU Target: This is for AOC only (not supported by Mali Offline Compiler). The default target is specified in OfflineCompiler.html.
- Save Compiler Stats Files: Enabling this will save all shader stats and their corresponding spv files in case of Vulkan shaders to *Engine\Shaders* folder. Note that this will consume your local space quickly.
Make sure Platform Stats is enabled on the toolbar. Then, go to Platform Stats window at the bottom to select Settings > Android > Android Vulkan and unselect other shader types because they are not supported well.
It might take a short compilation time before you see the shader stats as the below image. Hooving your mouse on the shader instruction number will show you the whole shader stats. Each devs might be interested in different stats. To understand more about the meaning of these stats, please refer to OfflineCompiler.html.
You could click the CopyStats button to copy stats of all shaders, and then paste them to somewhere else. And you could always go to Engine\Shaders** folder to retrieve all stats files if you enabled **Save Compiler Stats Files.