8.1.1 Overview of the Generic Graphics Accelerator
This section describes the components of the Generic Graphics Accelerator, and how they perform hardware acceleration and graphics integration for Android targets.
Hardware acceleration for Android targets
The Generic Graphics Accelerator maps graphics APIs on an Android target to the graphics APIs on the host. The host renders the Android images with these APIs through its own GPU.
The target graphics APIs can be OpenGL ES or Vulkan and the host graphics APIs
can be OpenGL or Vulkan.
The following figure shows the hardware rendering process:
8-1 Graphics APIs mapping between the target and host
Signals in this figure are:
- 1 is the SWI signal.
- 2 is the CADIMemRead signal from the Sidechannel Plugin to read from memory in
the target into the write buffer.
- 3 is the CADIMemWrite signal from the Sidechannel Plugin to write to memory in
the target from the read buffer.
- The buffer inside the target covers both the usual buffer to implement
graphics APIs, and the frame buffer as the rendering target.
Components in this figure are:
- Shim Layer
- Plays the role of the GPU driver. Implements the OpenGL ES or Vulkan APIs
used by the application running on the target, and communicates with the
Sidechannel Plugin. The Shim Layer is implemented by the Shim library.
- Sidechannel Plugin
- Provides a communication channel for messages and data passed between the
target and host.
- The application that calls OpenGL ES or Vulkan APIs on the target is in a
different address space from the graphics APIs running on the host. The
Sidechannel Plugin communicates between these different address spaces.
Bridges the communication between the Sidechannel Plugin and the graphics
The Generic Graphics
Accelerator comprises the Shim Layer and the Reconciler.
- Arm® Mali™ OpenGL ES Emulator
- Simulates the OpenGL ES APIs by using the OpenGL APIs of the graphics card
on the host. This emulator is used only with OpenGL ES APIs.
The workflow in this figure is:
- An application running on the Fast Models target makes an OpenGL ES or a
Vulkan API call.
- The Shim Layer receives this call and informs the Sidechannel Plugin
that it needs to send data to the host.
- The Shim Layer writes the data into the Write Buffer inside the
Sidechannel Plugin when a software interrupt is invoked in the Fast Model.
- The Reconciler wakes up after the data writing completes.
- For an OpenGL ES API call, the Reconciler passes the data to the Arm
ES Emulator on the host and waits until the call is completed.
For a Vulkan API
call, the Reconciler passes the data to the host graphics driver and waits until
the call is completed.
- The Reconciler writes the output back to the Read Buffer of the
- The Shim Layer sends another software interrupt to read the data
from the Read Buffer when the application needs the data returned from the API.
- The Sidechannel Plugin reads the data from the read buffer and
returns directly from the interrupt.
- The application continues to run on the target.
Graphics integration for Android targets
The Generic Graphics Accelerator supports the integration of the Android target graphics software stack with the Arm® Mali™ GPU register models, Mali-G71, Mali-G72, and Mali-G51.
The integration work flow is:
- On the target, the application APIs (OpenGL ES and EGL) interact with both
the shim libraries and the Mali graphics
Shim libraries pass the API data to the Generic Graphics
Accelerator on the host. Then, the Generic Graphics
Accelerator works with the host GPU and Mali OpenGL
ES Emulator to render this data using the host GPU.
Images are saved in the Generic Graphics
In parallel with rendering on the host, on the target, the Mali driver
executes APIs and passes commands, addresses, and the other settings to the GPU
- When the model receives the start command from the driver, it sends the
rendering-related destination addresses, MMU settings, and other data to the
- On receiving this data, the Generic Graphics
Accelerator combines it with the stored rendering images, and outputs the
combined result to the memory model on the target.
- The Generic Graphics
Accelerator reports to the target GPU that it has completed
- The target GPU reports to the driver that rendering is complete.
8-2 Graphics integration with the GPU register model