Mar 31, 2016
Qualcomm products mentioned within this post are offered by Qualcomm Technologies, Inc. and/or its subsidiaries.
Have you been following the Vulkan graphics and compute API? Shortly after it was made available, we posted about the explicit control Vulkan gives developers over graphics acceleration and the benefits of the Vulkan open standard. Also Qualcomm Technologies Inc. and the engineers at Epic Games have demonstrated the power of Vulkan on mobile with Protostar, a graphics-intensive app demonstrating the potential of Epic’s Unreal Engine 4 and the Vulkan API on the Snapdragon™ 820 with the Adreno™ GPU 530.
Now that you’ve gotten a glimpse of the 3D experiences you can build around Vulkan and the Snapdragon/Adreno combination, we’re going to roll out tools you can use. In this post, I’ll describe the new, Vulkan-oriented features available to you in the Adreno SDK and the Snapdragon Profiler.
We’ve updated the Adreno SDK with a directory containing sample Vulkan graphics laid out as Android Studio projects. You’ll also find a document called “Getting started with the Vulkan Graphics API” that walks you through the process of loading samples into your development environment.
Here are a few of the samples we’ve included to get you started:
The triangle is a self-contained example for setting up a basic device state and drawing a triangle with vertex colors. You can see all of the code in the sample.cpp and sample.h files.
The cube example shows how to set up state to render a rotating, textured cube with Vulkan.
The imageeffects example shows how to set up multiple pipelines for operating different shaders. It also shows how to manage Descriptor Sets when working with dynamic uniforms and image samplers.
The tutcornelllights shows simple point lighting in a Cornell box scene. We’ve provided a tutorial in which the lights are implemented using a fragment shader that iteratively adds brightness and diffuse coloring, depending on light positions and colors in world space.
The Adreno SDK for Vulkan contains more sample files and documentation to get you started.
Snapdragon Profiler has always depicted how your apps execute and perform on devices powered by the Snapdragon processor. Now, to ease the learning curve of working with Vulkan, Snapdragon Profiler also shows how your apps take advantage of this powerful, low-level graphics API on the Qualcomm Adreno GPU.
You can select a layout for quick access to all views relevant to Vulkan. After you’ve selected your Vulkan application in the process list, a category of Vulkan metrics appears in the tree view underneath the process list. Rendering stages and API Trace are two of the metrics you can capture and display in Snapdragon Profiler.
Rendering stages displays timing information about the processing done on the GPU for each surface rendered. Seeing it depicted in Snapdragon Profiler helps you understand how the GPU is executing your commands and gives you valuable information you can use to optimize your app. Most important, it shows whether your app is making unintended, GPU-intensive graphics memory (GMEM) loads.
Whenever there’s a Vulkan API call to submit a command buffer, API Trace tracks the execution of the command buffer through the GPU and gathers GPU timing information. The trace helps you understand how the call was executed on the CPU. The combined information on CPU and GPU timing provides insight into call ordering and is especially useful if you’re debugging difficult-to-spot threading issues.
Our Vulkan sample code for Adreno is available and the Snapdragon Profiler is ready. What are you waiting for?
- Grab the Adreno GPU SDK for Vulkan and the Snapdragon Profiler.
- We’ve put together a video on capturing Vulkan applications with Snapdragon Profiler. Have a look at it for some of the finer points of seeing how your Vulkan apps run on the Adreno GPU.
- You can start by using these tools on devices like the Samsung Galaxy S7 and the 820 Mobile Development Platform (MDP).
And stay tuned for an upcoming post about shifting graphics from OpenGL ES to Vulkan.