Vulkan API support on the Hikey960 running Android O Preview


Vulkan is the next big thing in Graphics APIs. Wikipedia cites it as: “Vulkan is a low-overhead, cross-platform 3D graphics and compute API. Vulkan targets high-performance realtime 3D graphics applications such as video games and interactive media across all platforms. Compared with OpenGL and Direct3D 11 and like Direct3D 12 and Mantle, Vulkan can offer higher performance and more balanced CPU/GPU usage…“

In other words Vulkan not only aims to improve performance on the GPU side by enabling low level control, it also aims to improve support for multi-core cpu allowing developers to easily distribute compute load over multiple cores to improve performance. And with commercially available ARM CPUs easily having up to 10 cores, Vulkan will soon be the preferred API over opengl.

Google added native support for the Vulkan API and Libraries in AOSP starting with Android 7.0 Nougat. And since the HiKey960 runs Android O, It can support Vulkan on the software side, on the hardware side the Hikey960 has a Mali G71 MP8 for its GPU which definitely has support for the Vulkan API enabled by ARM.

How to get Vulkan API on the Hikey960?

As of now an official patch request has been made by me on android-review that enables support for the vulkan API on the hikey960.

Prefered Method (Not-available Yet): Download prebuilt AODP images from:

Alternate Method 1: Compile From Source As of now you will need to compile AOSP on you own to get vulkan working on your device. Once you have set up the build environment for hikey960 as directed here:

Make sure that vendor/linaro/hikey960/arm/ has the following lines:

    vendor/linaro/hikey960/arm/proprietary/lib64/ \
    vendor/linaro/hikey960/arm/proprietary/ \
    vendor/linaro/hikey960/arm/proprietary/ \

Continue to build aosp as instructed.

Alternate Method 2: Modify existing android build that do not have vulkan support Make sure you have the Hikey960 connected to a host machine using adb.

$ adb root
$ adb remount
$ adb shell cp system/lib64/egl/ system/vendor/lib64/hw/
$ adb shell cp system/lib/egl/ system/vendor/lib/hw/
$ adb shell
$ cat system/etc/permissions/android.hardware.vulkan.level.xml
<?xml version="1.0" encoding="utf-8"?>
    <feature name="android.hardware.vulkan.level" version="0" />
#ctrl+c to save and exit

$ cat system/etc/permissions/android.hardware.vulkan.version.xml
<?xml version="1.0" encoding="utf-8"?>
    <feature name="android.hardware.vulkan.version" version="4194307" />
#ctrl+c to save and exit
$ exit
$ adb reboot


Vulkan Demos By Sascha Willems: