STEP 1: ANDROID BEST PRACTICES

Vulkan API Resources for Arm GPUs

Refresh on Vulkan basics, understand your GPU’s configuration, and get tips for best practice API implementation.

 

Arm GPU Best Practices Guide

  • 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.

Find My GPU Configuration

  • Learning Path tutorial on how to query the configuration details of an Arm Mali or Arm Immortalis GPU.

Khronos Vulkan API resources

  • 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.
STEP 2: TUTORIALS WITH CODE

Real-world Code Examples

Follow the tutorials to learn how to use specific Vulkan features.

 

Examples Using Vulkan

  • GitHub repository containing performance samples and code examples from which to start your development.

Image Compression Control

  • 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.

Deferred Shading on Mobile

  • Tutorial sample code on how to use deferred shading with the Vulkan API. A 14-minute read.

Asynchronous Compute

  • 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.

STEP 3: FAQs

FAQs on Bug-fixing

Have questions? Check out these FAQs for helpful information when working with Vulkan on Arm GPUs.

 

 

Q1: What are the common reasons to hit device lost?
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
Q2: What is the ‘sub-pass merging feedback’ Vulkan extension?
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
Q3: What is the ‘control sub-pass function’ Vulkan extension?
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
Q4: How can I use the debugging extension for Vulkan?
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
Q5: How can I pick up the most efficient load-store operations?
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
Q6: How can I efficiently use Surface Rotation with Vulkan on mobile?
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
Q7: How to implement descriptor and buffer management with Vulkan?
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
Vulkan Mobile Best Practises: FAQs – summary Part-1 blog
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
Vulkan Moble Best Practises: FAQs – summary Part-2 blog
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

Join the Arm Developer Program

 

Arm Developer Program logo

 

Join the Arm Developer Program to build your future on Arm. Get fresh insights directly from Arm experts,
connect with like-minded peers for advice, or build on your expertise and become an Arm Ambassador.

Join Now
Arm Developer Program

Community Support

Learn from the Community

Talk directly to Arm Experts like Jose Emuilio Munoz Lopez and the broader Arm community in the Graphics and Gaming Forums today.

Jose Emilio Munoz Lopez

An Arm Expert in the Vulkan API, Jose has been working with Vulkan for the past five years. He has helped multiple Android game developers achieve the best visual fidelity at maximum performance.

Tell Us What We Are Missing

Think we are missing some resources? Have some examples to share from your experience? Let us know directly via the link below.