Vulkan

Android supports Vulkan, a low-overhead, cross-platform API for high-performance 3D graphics. Like OpenGL ES (GLES), Vulkan provides tools for creating high-quality, real-time graphics in apps. Advantages of using Vulkan include reductions in CPU overhead and support for the SPIR-V Binary Intermediate language.

System on chip vendors (SoCs) such as GPU independent hardware vendors (IHVs) can write Vulkan drivers for Android. OEMs need to integrate these drivers for specific devices. For details on how a Vulkan driver interacts with the system, how GPU-specific tools should be installed, and Android-specific requirements, see Implementing Vulkan.

Application developers use Vulkan to create apps that execute commands on the GPU with significantly reduced overhead. Vulkan also provides a more direct mapping to the capabilities found in current graphics hardware compared to EGL and GLES, minimizing opportunities for driver bugs and reducing developer testing time.

For general information on Vulkan, refer to the Vulkan Overview or see the list of Resources.

Vulkan components

Vulkan support includes the following components.

Vulkan
components

Figure 1. Vulkan components

Component name Provider Description
Vulkan Validation Layers Android (in the NDK) Libraries used during the development of Vulkan apps to find errors in an app's use of the Vulkan API. After API usage errors are found, these libraries should be removed.
Vulkan Runtime Android A native library, libvulkan.so, that provides a native Vulkan API.

Most of Vulkan Runtime's functionality is implemented by a driver provided by the GPU vendor. Vulkan Runtime wraps the driver, provides API interception capabilities (for debugging and other developer tools), and manages the interaction between the driver and the platform dependencies.
Vulkan Driver SoC Maps the Vulkan API onto hardware-specific GPU commands and interactions with the kernel graphics driver.

Modified components

BufferQueue and Gralloc support Vulkan:

  • BufferQueue. Additional enum values and methods in BufferQueue and the ANativeWindow interface enable Vulkan Runtime to connect to BufferQueue through ANativeWindow.
  • Gralloc. An optional interface lets Gralloc discover whether a given format can be used for a particular producer/consumer combination without allocating a buffer.

For details on these components, see BufferQueue and gralloc. For details on ANativeWindow, see EGLSurfaces and OpenGL ES).

Resources

Use the following resources to learn more about Vulkan:

  • Vulkan Loader (libvulkan.so) at platform/frameworks/native/vulkan. Contains Android's Vulkan loader, as well as some Vulkan-related tools useful to platform developers.
  • Implementing Vulkan. Intended for GPU IHVs writing Vulkan drivers for Android and OEMs integrating those drivers for specific devices. It describes how a Vulkan driver interacts with the system, how GPU-specific tools should be installed, and Android-specific implementation requirements.
  • Vulkan Graphics API Guide. Includes information on getting started with using Vulkan in Android apps, Android's Vulkan design guidelines platform, using Vulkan's shader compilers, and using validation layers to help ensure stability in apps using Vulkan.
  • Vulkan News. Covers events, patches, tutorials, and more Vulkan-related news articles.