Transaction elimination is a Mali technology that is used to avoid frame buffer write bandwidth for static regions of the framebuffer. It is more beneficial for games that contain many static opaque overlays.
You must understand the following concepts:
- Vulkan APIs.
- Image layouts.
Avoiding frame buffer write bandwidth in Vulkan
Transaction elimination is used for an image if:
- The sample count is 1.
- The mipmap level is 1.
- The image uses COLOR_ATTACHMENT_BIT.
- The image does not use TRANSIENT_ATTACHMENT_BIT.
- A single color attachment is being used. Does not apply to the Mali-G51 GPU, or later.
- The effective tile size is 16x16 pixels. Pixel data storage determines the effective tile size.
The difference between image layouts that are defined as either safe or unsafe
Transaction elimination is a rare case where the driver uses the image layout. Whenever the image transitions from a safe to an unsafe image layout, the driver invalidates the transaction elimination signature buffer.
Safe image layouts are defined as image layouts that are either read-only, or images where only fragment shading writes to. These layouts are:
All other layouts are considered unsafe as they allow writes to an image that is outside of the write path of the tile.
If the color attachment reference layout is different from the final layout, then the
signature buffer invalidation can happen as part of a
vkCmdPipelineBarrier(), vkCmdWaitEvents(), or
as part of a
Transitioning from an UNDEFINED layout preserves the memory content of an image. The signature buffer is not invalidated unless another triggering effect requires it.
How to optimize transaction elimination on Mali GPUs
Try using the following optimization steps:
- For color attachments, use the COLOR_ATTACHMENT_OPTIMAL image layout.
- To avoid unnecessary signature invalidation, use the safe image layouts for color attachments.
Transaction elimination steps to avoid
Do not transition color attachments from safe to unsafe, unless the algorithm requires it.
The negative impact of not using transaction elimination
The loss of transaction elimination increases external memory bandwidth for scenes with static regions across frames. In turn, reducing the performance on systems that have limited memory bandwidth.
Debugging transaction elimination
To determine if transaction elimination is triggered, make the GPU performance counters count the number of tile writers that have been killed.