You copied the Doc URL to your clipboard.

Minimize precision

Mali GPUs have full support for reduced precision in the shader core register file and arithmetic units. Also, reducing precision on inputs and outputs saves data bandwidth. Using 16-bit precision is normally sufficient for computer graphics, especially for fragment shading when computing an output color.


You must understand the following concepts:

  • Different precision types, including lowp and mediump.
  • Maintaining correct values through calculations involving reduced precision variables and temporaries.

Marking variables and temporaries

Both ESSL and Vulkan GLSL support marking variables and temporaries to use reduced precision level with mediump. There is no benefit to using lowp for Mali GPUs as it is functionally identical to mediump.

How to optimize the use of minimized precision on Mali GPUs

Try using the following optimization steps:

  • Use mediump when the resulting precision is acceptable.
  • Use mediump for inputs, outputs, variables, and samplers where possible.
  • For angles use a range of -PI to +PI, rather than 0 to 2PI. Doing so gains extra precision for mediump values as you make use of the floating-point sign bit.

Things to avoid when optimizing your use of minimized precision on Mali GPUs

Do not test the correctness of mediump precision on desktop GPUs. Desktop GPUs ignore mediump and process it as highp. There is no difference in function or performance, so the test is worthless.

The negative impact of not using minimized precision correctly on Mali GPUs

If you choose to use full FP32 precision, performance and power efficiency can be negatively impacted.

How to debug precision-related performance issues on Mali GPUs

Try forcing mediump for everything except for the contributors to gl_Position, and then compare the performance difference afterwards.