8.1.2 Technical implementation
The Generic Graphics Accelerator uses the ARM® Mali™ OpenGL ES Emulator to map OpenGL ES API calls in the target to the OpenGL implementation of the graphics card on the host.
The following figure shows how the mapping is implemented:
Figure 8-1 Generic Graphics
In this figure:
- 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 Generic Graphics
Accelerator comprises the Shim Layer and the Reconciler.
The major components in this figure are:
- Shim Layer
- Plays the role of the GPU driver. Implements the OpenGL ES API 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 APIs on the target is in a different
address space from the OpenGL ES Emulator running on the host. The Sidechannel
Plugin communicates between these different address spaces.
- Bridges the communication between the Sidechannel Plugin and the OpenGL ES
- ARM Mali OpenGL ES Emulator
- Simulates the OpenGL ES APIs by using the OpenGL APIs of the graphics card
on the host.
In Figure 8-1 Generic Graphics
Accelerator design, the buffer
inside the target covers both the usual buffer to implement OpenGL ES APIs and the frame
buffer as the rendering target.
The basic workflow is as follows:
- An application running on the Fast Models target makes an OpenGL ES API
- The Shim Layer receives the OpenGL ES API 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 buffer writing is complete.
- The Reconciler passes the data to the ARM Mali Open GL ES Emulator on the
host and waits until the API call is completed.
- The Reconciler writes the output back to the Read Buffer of the Sidechannel
- 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.