LunarG® Vulkan™ SDK FAQ
What is the LunarG Vulkan SDK?
The LunarG® Vulkan™ SDK provides you with a variety of resources to aid in creating Vulkan applications. The SDK includes:
- Vulkan loader
- Validation layers
- Trace and replay tools
- SPIR-V™ tools
- Vulkan Runtime Installer
- Documentation, samples, and demos
- VIA (Vulkan Installation Analyzer)
- Additional layers such as screen shot, API_dump, FPS overlay monitor, and the Device Simulation Layer
Where can I find the SDK?
The LunarG Vulkan SDK is available on the LunarXchange portal.
What are the benefits of the SDK?
The SDK offers a number of advantages:
- Vulkan, by design, is a very low-level API that provides applications direct control over GPU acceleration with minimized CPU overhead and efficient multi-threaded performance. The SDK provides tools to help you develop to this lower level API.
- The SDK is available for Linux and Windows® operating systems. Because Vulkan is a direct competitor of Microsoft® DirectX12®, Microsoft will not offer Vulkan developer tools for Windows. The SDK provides comprehensive tools for both Linux and Windows operating systems.
- Vulkan is a cross-platform API that supports a range of devices including desktop, mobile, and console. The Vulkan loader and validation layers are canonical pieces that are critical in achieving this cross-platform compatibility. These components are open source, and you can choose to build them. To speed development efforts, the SDK includes the loader and layers already built for you.
- Because Vulkan is a very low-level API, a simple program is much longer to write compared to OpenGL. The included utilities and samples help you learn the process.
What are validation layers and how are they used?
Vulkan requires drivers to omit most traditional error checks; drivers assume that the application is using the driver correctly.
The validation layers are the key for identifying errors in using the API during development. The layers check for correct implementation of the Vulkan API and return any errors found.
You can enable validation layers during application development, and then disable them for production shipments.
Are there code samples for correctly using the Vulkan API?
Yes, examples demonstrating the use of the Vulkan API, with utilities that you can leverage and use, are located in the SDK. Also included with the SDK is a Vulkan Tutorial that is organized to walk you through the steps to create a simple Vulkan program. Each tutorial section corresponds directly to a sample program in the LunarG SDK samples progression and is designed to be read as you look at and experiment with real code from the progression.
What trace tools are available with the LunarG SDK?
You can capture a trace file of the Vulkan API calls and replay them using the trace tools. Commonly, application developers share application workloads with third parties, such as IHVs (Independent Hardware Vendors), who don’t have access to their application.
- The trace tool (vktrace) captures the Vulkan API activity in an application and stores it in a file.
- The replay tool (vkreplay) plays back the trace file, independent of the application.
As an example, this capability is useful for reporting a rendering problem to an IHV. The trace file reduces the need for the IHV to set up an environment to reproduce the problem.
What are the loader and loader installer package?
- Loader: Consistent loader behavior across platforms is key to Vulkan. The Khronos-branded loader binary and installation package is included in the LunarG Vulkan SDK. The loader discovers and manages the Vulkan devices/drivers and layers available to the application.
- Loader installer package: The SDK also includes an installation package for the loader binary, for those who want to use the installation package directly for installing a Vulkan loader on a system.
What operating systems are supported by the SDK?
Initially, supported OSes include Windows 7 (64 bit), Windows 8 (64 bit), Windows 10 (64 bit), the latest Ubuntu LTS releases and various other Linux distributions. For the specific distributions refer to the LunarG SDK documentation found on LunarXchange (https://vulkan.lunarg.com/)
What is SPIR-V™?
The Vulkan shader language is SPIR-V, which is a low-level binary intermediate representation (IR). The Vulkan API requires the SPIR-V format for all shaders.
SPIR-V splits the compiler chain, enabling high-level language front ends to emit programs in a standardized intermediate form to be ingested by Vulkan.
Eliminating the need for a built-in high-level language source compiler significantly reduces GPU driver complexity, enabling a diversity of language front ends.
Do I need to write shaders directly in SPIR-V?
No. You can use existing GLSL shaders with the included tool glslangValidator, which creates SPIR-V shaders from equivalent GLSL shaders. You can also use the glslangValidator to translate HLSL shaders to SPIR-V.
What other SPIR-V tools are included?
SPIR-V Disassembler and Assembler Tools
Disassembler spirv-dis converts SPIR-V shader into human-readable and parsable form to help with debugging. Assembler spirv-as takes edited, disassembled output and assembles it.
SPIR-V Remapper Tool
The spirv-remap tool enhances compression of SPIR-V binary files via entropy reduction, including optional stripping of debug information and dead functions. As an example, the tool is useful when games have large numbers of shaders and need smaller file sizes.
What is RenderDoc?
RenderDoc is a graphics debugging tool that’s included in the SDK. It allows you to capture a single frame of an application, then load that capture up in an analysis tool to inspect the API use and GPU work in detail. For more information, see the RenderDoc GitHub page.
What documentation is available?
Documentation for the LunarG SDK is available on LunarXchange. It includes:
- Getting started with the Vulkan SDK
- Vulkan tools framework (Loaders, Layers, Validation Layer Details)
- Advanced topics
- Vulkan docs (Spec, Man page, Samples)
- SDK Installers
What type of ongoing support does LunarG provide for the SDK?
LunarG provides ongoing maintenance for the loader and validation layers and ongoing development to produce samples and other tools and layers.
For SDK-related support from LunarG, submit issues on the LunarXchange portal.