Development Tools

The Vulkan ecosystem consists of many tools for development. This is not a full list and this is offered as a good starting point for many developers. Please continue to do your own research and search for other tools as the development ecosystem is much larger than what can reasonably fit on a single Markdown page.

Khronos hosts Vulkan Samples, a collection of code and tutorials that demonstrates API usage and explains the implementation of performance best practices.

LunarG is privately sponsored to develop and maintain Vulkan ecosystem components and is currently the curator for the Vulkan Loader and Vulkan Validation Layers Khronos Group repositories. In addition, LunarG delivers the Vulkan SDK and develops other key tools such as the Vulkan Configurator and GFXReconstruct.

Vulkan Layers

Layers are optional components that augment the Vulkan system. They can intercept, evaluate, and modify existing Vulkan functions on their way from the application down to the hardware. Layers are implemented as libraries that can be enabled and configured using Vulkan Configurator.

Khronos Layers

  • VK_LAYER_KHRONOS_validation, the Khronos Validation Layer. It is every developer’s first layer of defense when debugging their Vulkan application and this is the reason it is at the top of this list. Read the Validation Overview chapter for more details. The validation layer included multiple features:

    • Synchronization Validation: Identify resource access conflicts due to missing or incorrect synchronization operations between actions (Draw, Copy, Dispatch, Blit) reading or writing the same regions of memory.

    • GPU-Assisted Validation: Instrument shader code to perform run-time checks for error conditions produced during shader execution.

    • Shader printf: Debug shader code by “printing” any values of interest to the debug callback or stdout. Environment variables provide a fast path for enabling this feature without code changes.

    • Best Practices Warnings: Highlights potential performance issues, questionable usage patterns, common mistakes.

Vulkan SDK layers

Besides the Khronos Layers, the Vulkan SDK included additional useful platform independent layers.

  • VK_LAYER_LUNARG_api_dump, a layer to log Vulkan API calls. The API dump layer prints API calls, parameters, and values to the identified output stream.

  • VK_LAYER_LUNARG_gfxreconstruct, a layer for capturing frames created with Vulkan. This layer is a part of GFXReconstruct, a software for capturing and replaying Vulkan API calls. Full Android support is also available at https://github.com/LunarG/gfxreconstruct

  • VK_LAYER_LUNARG_device_simulation, a layer to test Vulkan applications portability. The device simulation layer can be used to test whether a Vulkan application would run on a Vulkan device with lower capabilities.

  • VK_LAYER_LUNARG_screenshot, a screenshot layer. Captures the rendered image of a Vulkan application to a viewable image.

  • VK_LAYER_LUNARG_monitor, a framerate monitor layer. Display the Vulkan application FPS in the window title bar to give a hint about the performance.

Vulkan Extension Layer

The Vulkan Extension Layer is a collection of layers that implement extensions that are not available everywhere. By default, these layers will disable themselves if the underlying driver provides the extension.

Vulkan Third-party layers

There are also other publicly available layers that can be used to help in development.

  • VK_LAYER_IMG_powervr_perf_doc, the PowerVR PerfDoc layer. Checks Vulkan applications for best practices on Imagination Technologies PowerVR devices.

  • VK_LAYER_adreno, the Vulkan Adreno Layer. Checks Vulkan applications for best practices on Qualcomm Adreno devices.

Debugging

Debugging something running on a GPU can be incredibly hard, luckily there are tools out there to help.

The following tools help debug crashes.

Shader Debugging

Debugging shaders requires specialized tools and techniques. For comprehensive guidance on shader debugging in Vulkan applications, including:

  • Shader debugging tools and their IDE integration

  • GPU-Assisted Validation for shader debugging

  • Shader printf techniques for both GLSL and HLSL

  • IDE-specific shader debugging configurations

  • Best practices for shader debugging workflows

See the Shader Debugging Integration section in the Development Environments & IDEs chapter.

Profiling

With anything related to a GPU it is best to not assume and profile when possible. Profiling tools can help identify performance bottlenecks, analyze GPU workloads, and optimize your Vulkan applications. For IDE-specific profiling integration, see the Development Environments & IDEs chapter.

Vendor-Specific Profiling Tools

AMD

  • AMD Radeon GPU Profiler (RGP) - Low-level performance analysis tool for AMD Radeon GPUs.

    • Provides detailed timing information for Vulkan API calls and GPU workloads

    • Visualizes the rendering pipeline and identifies bottlenecks

    • Supports hardware-based ray tracing analysis

    • Integrates with Visual Studio through the Radeon Developer Panel

NVIDIA

  • NVIDIA Nsight Graphics - Comprehensive graphics debugger and profiler for NVIDIA GPUs.

    • Provides frame debugging, GPU trace capture, and performance analysis

    • Supports Vulkan API debugging and optimization

    • Includes shader profiling and memory analysis

    • Integrates with Visual Studio and can be used standalone

ARM

  • Arm Streamline Performance Analyzer - Performance analysis tool for Arm-based devices.

    • Visualizes the performance of mobile games and applications

    • Provides CPU, GPU, and system-level performance metrics

    • Supports Vulkan workload analysis

    • Part of Arm Mobile Studio, which integrates with various IDEs

Imagination Technologies

  • PVRTune - Performance analysis tool for PowerVR GPUs.

    • Provides real-time hardware performance metrics

    • Supports Vulkan API tracing and analysis

    • Helps identify bottlenecks in PowerVR-based devices

    • Works with Android Studio for mobile development

Qualcomm

  • Qualcomm Snapdragon Profiler - Profiling tool targeting Adreno GPUs.

    • Provides detailed GPU metrics for Qualcomm Snapdragon devices

    • Supports Vulkan API trace capture and analysis

    • Includes shader profiling and optimization suggestions

    • Integrates with Android Studio for Android development

Platform-Specific Profiling Tools

Android

  • Android GPU Inspector (AGI) - Google’s profiler for the Android platform.

    • Provides Vulkan API tracing and GPU performance analysis

    • Supports system trace correlation with GPU workloads

    • Helps identify rendering bottlenecks on Android devices

    • Integrates with Android Studio

Cross-Platform Profiling Tools

  • OCAT (Open Capture and Analytics Tool) - FPS overlay and performance measurement tool.

    • Provides real-time FPS monitoring and performance metrics

    • Supports D3D11, D3D12, and Vulkan

    • Generates detailed performance reports

    • Works alongside any development environment

  • VKtracer - Cross-vendor and cross-platform Vulkan profiler.

    • Captures and analyzes Vulkan API calls

    • Works with all Vulkan-compatible GPUs

    • Provides timing information and bottleneck identification

    • Compatible with various development environments

  • GFXReconstruct - Frame capture and replay tool for Vulkan.

    • Captures Vulkan API calls for later analysis

    • Supports cross-platform capture and replay

    • Helps identify performance issues and bugs

    • Included in the Vulkan SDK and works with all major IDEs

Profiling Best Practices

When profiling Vulkan applications, consider the following best practices:

  1. Start with validation layers: Before profiling, ensure your application passes validation to avoid measuring performance of incorrect code.

  2. Profile on target hardware: Performance characteristics can vary significantly between different GPUs and platforms.

  3. Use vendor-specific tools for the most detailed insights on specific hardware.

  4. Combine CPU and GPU profiling to identify bottlenecks across the entire rendering pipeline.

  5. Profile regularly throughout development to catch performance regressions early.

For IDE-specific profiling workflows, refer to the relevant sections in the Development Environments & IDEs chapter.