- Introduction
- Samples
- General information
- Setup
- Build
- Usage
- Tests
- License
- Contributions
- Related resources
The Vulkan Samples is collection of resources to help you develop optimized Vulkan applications.
If you are new to Vulkan the API samples are the right place to start. Additionally you may find the following links useful:
Performance samples show the recommended best practice together with real-time profiling information. They are more advanced but also contain a detailed tutorial with more in-detail explanations.
- Create a collection of resources that demonstrate best-practice recommendations in Vulkan
- Create tutorials that explain the implementation of best-practices and include performance analysis guides
- Create a framework that can be used as reference material and also as a sandbox for advanced experimentation with Vulkan
- Project Basics
- Vulkan Essentials
- Misc
Clone the repo with submodules using the following command:
git clone --recurse-submodules https://github.com/KhronosGroup/Vulkan-Samples.git
cd Vulkan-Samples
Follow build instructions for your platform below.
- Windows - Build Guide
- Linux - Build Guide
- macOS - Build Guide
- Android - Build Guide
The following shows some example command line usage on how to configure and run the Vulkan Samples.
# For the entire usage use
vulkan_samples --help
# For subcommand usage use
vulkan_samples <sub_command> --help
# Run Swapchain Images sample
vulkan_samples sample swapchain_images
# Run AFBC sample in benchmark mode for 5000 frames
vulkan_samples sample afbc --benchmark --stop-after-frame 5000
# Run bonza test offscreen
vulkan_samples test bonza --headless
# Run all the performance samples for 10 seconds in each configuration
vulkan_samples batch --category performance --duration 10
# Run Swapchain Images sample on an Android device
adb shell am start-activity -n com.khronos.vulkan_samples/com.khronos.vulkan_samples.SampleLauncherActivity -es "cmd" "sample swapchain_images"
- System Test - Usage Guide
- Generate Sample - Usage Guide
See LICENSE.
This project has some third-party dependencies, each of which may have independent licensing:
- astc-encoder: ASTC Evaluation Codec
- CTPL: Thread Pool Library
- docopt: A C++11 port of the Python argument parsing library
- glfw: A multi-platform library for OpenGL, OpenGL ES, Vulkan, window and input
- glm: OpenGL Mathematics
- glslang: Shader front end and validator
- dear imgui: Immediate Mode Graphical User Interface
- HWCPipe: Interface to mobile Hardware Counters
- KTX-Software: Khronos Texture Library and Tools
- spdlog: Fast C++ logging library
- SPIRV-Cross: Parses and converts SPIR-V to other shader languages
- stb: Single-file public domain (or MIT licensed) libraries
- tinygltf: Header only C++11 glTF 2.0 file parser
- nlohmann json: C++ JSON Library (included by tinygltf)
- vma: Vulkan Memory Allocator
- volk: Meta loader for Vulkan API
- vulkan: Sources for the formal documentation of the Vulkan API
This project uses assets from vulkan-samples-assets. Each one has its own license.
Vulkan is a registered trademark of the Khronos Group Inc.
Donated to Khronos by Arm, with further contributions by Sascha Willems and Adam Sawicki. See CONTRIBUTORS for the full contributor list.
Also see CONTRIBUTING for contribution guidelines.
- Mali GPU Best Practices: A document with recommendations for efficient API usage
- PerfDoc: A Vulkan layer which aims to validate applications against Mali GPU Best Practices