2013-03-30 19:40:39 UTC
This is a technical document that describes the plan to enable OpenGL
ES hardware acceleration for some x86 GPUs which don't have native
Android support from the open source community or their vendors. It's
intended for the developers who want to contribute to this field.
There are several steps to enable GLES hardware acceleration on Android:
1. Linux kernel driver that supports 3D
2. Userspace GLES libraries for Android
3. Graphic HAL (the gralloc)
In Android arm world, these are almost provided by the chip vendors
(qcom, ti, nv, ...) in their BSP. Usually 1 and 3 are open sourced,
but 2 is almost proprietary and provided by the chip vendors in the
binary form. For Google Nexus series, Google allows the public to
download 2 from the web
http://code.google.com/intl/en/android/nexus/drivers.html so platform
developer can use them to create an Android image with hardware
acceleration for the Nexus products.
* The Current Status of Android-x86
Unfortunately in the Android-x86 world we are not that lucky. It's a
shame that no x86 vendor is willing to provide these things to help us
to enable GLES hardware acceleration on our x86 devices. It's on our
own to create them.
Currently we only support hardware acceleration for some Intel
integrated GPU and AMD Radeon based on
1. Kernel drivers: i915, radeon
2. GLES libraries: Mesa libraries (src: external/mesa, external/drm)
3. Graphic HAL: gralloc.drm (src: hardware/drm_gralloc)
Mesa (http://www.mesa3d.org/) is an open-source implementation of the
OpenGL specification - a system for rendering interactive 3D graphics.
It is usually used by X window system for the 3D hardware
acceleration. We have ported Mesa to Android to support hardware
acceleration on Android-x86. Most of the work was done by Chia-I Wu
(olv) since 2011-2012 and has merged to the Mesa upstream.
There are some Intel chip equipped with PowerVR engine by Imagination
Inc., say, Z5xx(GMA500), Z6xx(GMA600, SGX535), N2600, D2500 (Cedar
Trail, SGX545), Z2xxx (Clover Trail) . PowerVR is proprietary that
doesn't have open source implementation yet. GNU has highlighted it as
"New High Priority Project: PowerVR drivers"
However, so far the progress is very slow as I know. Those who are
interesting in the project may read its web:
Nvidia chip is supposed to be supported by Mesa using the nouveau
driver. However, the porting of nouveau to Android-x86 is not
finished. Currently no any Android-x86 developer has Nvidia device or
is interesting in the porting. Nor any vendor is willing to provide us
some devices for the development. In short, Nvidia hardware
acceleration is not supported by Android-x86.
* Hardware OpenGL ES Emulation
Hardware OpenGL ES emulation is a new feature of the Android SDK
emulator introduced by Google since JellyBean. The basic idea is to
allow the emulator (guest) to utilize the OpenGL hardware acceleration
abilities of the host OS (e.g., Linux/Windows/MacOS). The guest has
GLES emulation libraries that collect the sequence of EGL/GLES
function calls and translate then into a custom wire protocol stream
that is sent to the emulator program through a high-speed
communication channel called a "QEMU Pipe". For more details and its
design, read the documents in the android source tree:
In the original Google design, the guest and the host are different
OSes (Android vs Linux/Windows/MacOS). However, it's possible to
combine Android and the traditional Linux X window system into one
filesystem and use one kernel to run both of them. In other word, the
guest and the host are the same OS. We just need to replace "QEMU
Pipe" by a tcp or unix socket to do the communication. In this way the
hardware acceleration of Android (guest) is enabled via the X window
(host) OpenGL libraries.
* Tasks TODO
Using N2600 Cedar Trail platform as an example, the Meego project has
a hardware accelerated image for it:
-- PowerVR libs rpms
It's kernel based on 3.2 with Android patches are available in our git server:
git clone http://git.android-x86.org/kernel/cdv
Here are the steps to do:
- Port its cedarview_gfx module (PowerVR driver for Cedar Trail) to kernel 3.8.
- Combine a stripped Meego cedartrail filesystem with Android-x86
("stripped" means a minimal filesystem that can run accelerated X window)
- Modify the guest GLES emulation libraries to communicate with the
- Implement a host renderer which is an X application render the GL
commands from the guest
The most different part is the host renderer. However, we can refer
to the emulator code. Especially the renderer library is located under
If you have any question or suggestion to the plan, feel free to send
it to the android-x86 mailing list.