You copied the Doc URL to your clipboard.


The Mali Offline Compiler is a command line tool that compiles vertex, fragment, compute, geometry, tessellation control, and tessellation evaluation shaders written in the OpenGL® ES Shading Language (ESSL), or kernels written in OpenCL™ C, or Vulkan® SPIR-V binary modules and prints information about the compiled code. Shaders can be used in the OpenGL ES 2.0, 3.0, 3.1, and 3.2 APIs, and kernels can be used in the OpenCL 1.1, and 1.2 APIs. SPIR-V modules can be used in the Vulkan 1.0 API.

Vertex, fragment, compute, geometry, tessellation control, and tessellation evaluation shaders can be compiled into binary shaders that you can link and run on a Mali GPU.

The resulting binary file must be moved to the target platform, read in by the application, and given as parameter in a call to the appropriate OpenGL ES function.

You can use the Mali Offline Compiler to:

  • Pre-compile shaders into binary code that you can distribute with your application. The binary code is then passed to the OpenGL ES API as an alternative to shader source code. Binary shaders reduce the time it takes to load a shader load time.
  • Assist software development, by checking that shaders compile properly without having to pass them through an OpenGL ES application.
  • Optimize your shaders by collecting feedback about the number of cycles each execution of the shader takes when you run it on the GPU.
  • Ship your application with pre-compiled binary shaders instead of the OpenGL ESSL source code that is required if you use the on-target compiler.
  • Using the Mali Offline Compiler is optional.
  • Because a particular binary shader can only be used on one type of GPU, using compiled shaders reduces portability.
  • If you require portability, you can use the on-target Compiler which enables the OpenGL ES drivers to compile OpenGL ESSL shader code or Vulkan SPIR-V binary code dynamically when application runs on a target platform.
  • Binary output is currently not available for OpenCL kernels. For OpenCL, the Mali Offline Compiler can only be used to test the validity of OpenCL kernels and to view information about the compiled code.
Was this page helpful? Yes No