[Music]
In the latest version of Mobile Studio,
we’ve enhanced Mali Offline Compiler reports
to give you better visibility of the expected performance
of your shader programs
on any of the available Mali GPU targets.
We’ve added support for the latest Mali GPUs,
based on Arm’s newest GPU architecture, Valhall.
The number of work registers reported is now accurate.
Previously, this number would only report 32 or 64.
Now you can see the exact number in use,
to help you decide whether you need to reduce register pressure.
For Valhall and Bifrost GPUs,
we can see whether any variables are spilled to stack memory,
and how many bytes per thread are spilled.
Ideally, you should reduce the precision of computation, to increase efficiency.
Here, you can see the percentage of arithmetic operations
that are performed at 16-bit precision or lower.
Arithmetic cost for Valhall-based GPUs is now shown
broken down by FMA, CVT and SFU pipelines.
All Valhall GPUs implement two parallel processing engines,
each containing their own set of arithmetic pipelines.
Data presented in the report is normalized based on the number of engines in the design,
to give an overall cost for the targeted shader core, not just for a single engine.
The shader properties section gives information about the shader's use of language features
that can impact the performance of shader execution.
This shows if there was any computation that depends only on literal constants or uniform values,
and therefore produces the same result for every thread in a draw call or compute dispatch.
The Mali driver can optimize this away, but it still has a cost,
so where possible, you should move this kind of computation into application logic on the CPU.
This shows if this shader has side-effects that are visible in memory,
outside of the fixed graphics pipeline.
They can be caused by writes into shader storage buffers,
stores into images, or use of atomics.
This shows if the fragment shader has a coverage mask
that can be changed by shader execution, for example, by using a discard statement
Shaders with modifiable coverage must use a late ZS update,
which reduces efficiency of early ZS testing for later fragments at the same coordinate.
This shows if the fragment shader contains logic that forces a late ZS test.
This disables the use of early ZS testing and hidden surface removal,
which can be a significant efficiency loss.
This shows if a fragment shader contains logic that programmatically reads from the color buffer.
Shaders that read from the color buffer in this way are treated as transparent,
and can not be used as hidden-surface removal occluders.
Mali GPUs in the Bifrost and Valhall families use index-driven vertex shading (IDVS)
which compiles vertex shaders into two binaries,
A position shader, which computes only position and is executed for every indexed vertex,
and a varying shader, which computes the remaining non-position vertex attribute outputs,
and is only executed for vertices that are part of a visible primitive that survives culling.
For vertex shaders, Mali Offline Compiler reports separate performance tables
for position and varying shader variants.
Finally, in this release, you can now export Mali Offline Compiler reports
as machine-readable JSON files, so that you can build your own dashboard
to monitor shader performance over time.
For more videos in this series, and for more information about Arm Mobile Studio,
visit the Arm developer website.
[Music]