How to Get the Most Out of the Vulkan API on Android
The Vulkan API brings cutting-edge technologies like ray-tracing and better graphics performance to desktops, consoles, and mobile platforms. Note this page assumes basic Vulkan API knowledge.
Vulkan API Resources for Arm GPUs
Refresh on Vulkan basics, understand your GPU’s configuration, and get tips for best practice API implementation. Use the 'Android Game Development Extension (AGDE)' for Visual Studio to add Android as a target platform in your existing Visual C++ game projects.
- The complete developer guide on how best to use Vulkan API and OpenGL ES for Android mobile on Arm.
Arm GPU Datatsheet and Performance Counters
- Summary of Arm GPU performance counters to monitor application GPU activity for performance optimization.
- Learning Path tutorial on how to query the configuration details of an Arm Mali or Arm Immortalis GPU.
- It covers in depth Arm GPUs and Vulkan on Android mobile
Video on the History of Vulkan
- Broad overview of the Vulkan API, with its history and comparison to OpenGL. A 45-minute video.
Real-world Code Examples
Follow the tutorials to learn how to use specific Vulkan features.
- GitHub repository containing performance samples and code examples from which to start your development.
- A tutorial with sample code that shows how a Vulkan application can control the compression of images.
- Get started and learn how to enable Arm Fixed Rate Compression (AFRC) to improve performance.
- Tutorial sample code on how to use deferred shading with the Vulkan API. A 14-minute read.
- A practical sample explaining async compute to efficiently utilize hardware resources available on a modern GPU. A 10-minute read.
Also check our Android R Vulkan Extensions on Mobile: Timeline Semaphores, Descriptor Indexing and Buffer Device Address.
FAQs on Bug-fixing
Have questions? Check out these FAQs for helpful information when working with Vulkan on Arm GPUs.
A1: A Vulkan application might trigger an out of memory (OOM) condition on Mali GPUs. It results in a DEVICE_LOST error, even if the API usage is correct. Read more here
A2: This extension adds a mechanism to provide feedback to an application about whether the subpasses specified on render pass creation are merged by the implementation. Read more here
A3: This extension introduces a new command which allows developers to query for additional information on GPU faults that may have caused device loss, and to generate binary crash dumps. Read more here
A4: This extension enables applications to track the binding of the GPU virtual address space regions, and to associate those regions with Vulkan objects. Read more here
A5: When you set up your render passes in Vulkan you have to set load and store operations upfront, because it allows for some special optimizations in tile-based GPUs. Read more here
A6: Surface rotation, when you worked with VUlkan, you must take extra care to avoid performance implications. To understand why, we need to start by understanding how display processors work on mobile. Read more here
A7: An application using Vulkan will have to implement a system to manage descriptor sets. The most straightforward and flexible approach is to re-create them for each frame but doing this when targeting mobile platforms can be inefficient and problematic. Read more here
A8: Immortalis-G715 adds support for ray-tracing via the VK_KHR_ray_query extension. All current Immortalis GPUs are guaranteed to support ray-tracing.
A9: VK_EXT_descriptor_indexing is supported on all Valhall and 5th Gen GPUs. Read more here
It includes: transitioning the swapchain image on acquisition, implicit image transitions via inital Layout / finalLayout, Debugging a DEVICE_LOST, meaning of srcAccessMask =0, Usage of a single image in multiple frames and Using multiple queues. Read more here
It includes: changing a buffer’s contents dynamically, allocating and mapping memory for a buffer, understanding barrier scope, number of descriptor pools, synchronizing texture transfers, meaning of signalling a fence, struct alignment for uniform buffers and push constants, crashes with no backtrace on Android and shader variants. Read more here
Accelerate Your Projects With the Arm Developer Community
The Arm Developer Program connects a global community of developers with expert insights, cutting-edge tools, and exclusive resources. Join to explore the latest trends, get early access to software and demos, attend expert-led sessions, and collaborate with peers solving real-world challenges.