Vulkan is a low-overhead, cross-platform API and open standard for 3D graphics and computing. It was originally developed as Mantle by AMD, but was later given to Khronos Group. It was intended to address the shortcomings of OpenGL, and allow developers more control over the GPU.

Overview

Vulkan targets high-performance real-time 3D-graphics applications, such as video games and interactive media, and highly parallelized computing. Vulkan is intended to offer higher performance and more efficient CPU and GPU usage compared to the older OpenGL and Direct3D 11 APIs. It does so by providing a considerably lower-level API for the application than the older APIs that more closely resembles how modern GPUs work.

Vulkan

Vulkan is comparable to Apple's Metal API and Microsoft's Direct3D 12, and is harder to use than the higher-level OpenGL and Direct3D 11 APIs. In addition to its lower CPU usage, Vulkan is designed to allow developers to better distribute work among multiple CPU cores.

Vulkan

Vulkan was first announced by the non-profit Khronos Group at GDC 2015. The Vulkan API was initially referred to as the "next generation OpenGL initiative", or "OpenGL next" by Khronos, but use of those names was discontinued when "Vulkan" was announced.

Vulkan

Vulkan is derived from and built upon components of AMD's Mantle API, which was donated by AMD to Khronos with the intent of giving Khronos a foundation on which to begin developing a low-level API that they could standardize across the industry.

Features

Vulkan is intended to provide a variety of advantages over other APIs as well as its predecessor, OpenGL. Vulkan offers lower overhead, more direct control over the GPU, and lower CPU usage. The overall concept and feature set of Vulkan is similar to concepts seen in Mantle and later adopted by Microsoft with Direct3D 12 and Apple with Metal.

Intended advantages of Vulkan over previous-generation APIs include the following:

Unified API

Vulkan provides a single API for both desktop and mobile graphics devices, whereas previously these were split between OpenGL and OpenGL ES respectively.

Cross platform

Vulkan is available on multiple modern operating systems. Like OpenGL, and in contrast to Direct3D 12, the Vulkan API is not locked to a single OS or device form factor. Vulkan runs natively on Android, Linux, BSD Unix, QNX, Haiku, Nintendo Switch, Raspberry Pi, Stadia, Fuchsia, Tizen, and Windows 7, 8, 10, and 11. MoltenVK provides freely-licensed third-party support for macOS, iOS and tvOS by wrapping over Apple's Metal API.

Lower CPU usage

Vulkan reduces load on CPUs through the use of batching and other low-level optimizations, therefore reducing CPU workloads and leaving the CPU free to do more computation or rendering than would otherwise be possible.

Multi-threading friendly design

Direct3D 11 and OpenGL 4 were initially designed for use with single-core CPUs and only received augmentation to be executed on multi-cores. Even when application developers use the augmentations, these APIs regularly do not scale well on multi-cores. Vulkan offers improved scalability on multi-core CPUs due to the modernized threading architecture.

Pre-compiled shaders

OpenGL uses the high-level language GLSL for writing shaders, which forces each OpenGL driver to implement its own compiler for GLSL. This then executes at application runtime to translate the program's shaders into the GPU's machine code. In contrast, Vulkan drivers are supposed to ingest shaders already translated into an intermediate binary format called SPIR-V (Standard Portable Intermediate Representation), analogous to the binary format that HLSL shaders are compiled into in Direct3D. By allowing shader pre-compilation, application initialization speed is improved and a larger variety of shaders can be used per scene. A Vulkan driver only needs to perform GPU specific optimization and code generation, resulting in easier driver maintenance, and potentially smaller driver packages. The developers of applications now can also more easily obfuscate proprietary shader code, due to shaders not being stored directly as source code, however tools are provided that can decompile SPIR-V to human-readable high-level code.

Others

Vulkan provides unified management of compute kernels and graphical shaders, eliminating the need to use a separate compute API in conjunction with a graphics API. Ray tracing is provided in a set of cross-vendor extensions, which together are analogous to the OptiX and DirectX Raytracing APIs. No such functionality is exposed in OpenGL.