Cross-platform 3D graphics and computing programming interface
This article is about the graphics software API. For other uses, see
Vulkan (disambiguation).
This article's
lead sectionmay be too short to adequately
summarize the key points. Please consider expanding the lead to
provide an accessible overview of all important aspects of the article.(August 2023)
Vulkan is a low-level, low-
overheadcross-platformAPI and open standard for
3D graphics and
computing.[15][16][17] It was intended to address the shortcomings of
OpenGL, and allow developers more control over the GPU. It is designed to support a wide variety of GPUs, CPUs and operating systems, it is also designed to work with modern multi-core CPUs.
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 was first announced by the non-profit
Khronos Group at
GDC 2015.[13][19][20] The Vulkan API was initially referred to as the "next generation
OpenGL initiative", or "OpenGL next"[21] by Khronos, but use of those names was discontinued when "Vulkan" was announced.[22]
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.[13]
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.[20] 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.
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.[28][29]
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.[30][31]
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.[32] 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.[31][17]
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.[33] No such functionality is exposed in OpenGL.
Explicit control over memory management and synchronization
Extensive error checking
Vulkan drivers do no error checking at runtime; there is a validation layer for developers
In 2016 NVIDIA stated that "OpenGL is still a great option for a lot of use cases, as it comes at a much lower complexity and maintenance burden than Vulkan, while in many cases still providing great overall performance."[35]
AMD states that "Vulkan supports close-to-metal control, enabling faster performance and better image quality across Windows 7, Windows 8.1, Windows 10, and Linux. No other graphics API offers the same powerful combination of OS compatibility, rendering features, and hardware efficiency."[36]
Versions
Vulkan 1.0
Vulkan 1.0 was released in February 2016.
Vulkan 1.1
At
SIGGRAPH 2016, Khronos announced that Vulkan would be getting support for automatic multi-GPU features, similar to what is offered by Direct3D 12.[37] Multi-GPU support included in-API removes the need for SLI or Crossfire which requires graphics cards to be of the same model. API multi-GPU instead allows the API to intelligently split the workload among two or more completely different GPUs.[38] For example, integrated GPUs included on the CPU can be used in conjunction with a high-end dedicated GPU for a slight performance boost.
On March 7, 2018, Vulkan 1.1 was released by the Khronos Group.[39] This first major update to the API standardized several extensions, such as multi-view, device groups, cross-process and cross-API sharing, advanced compute functionality, HLSL support, and YCbCr support.[40] At the same time, it also brought better compatibility with DirectX 12, explicit multi-GPU support,
ray tracing support,[41][42] and laid the groundwork for the next generation of GPUs.[43] Alongside Vulkan 1.1,
SPIR-V was updated to version 1.3.[40]
Vulkan 1.2
On January 15, 2020, Vulkan 1.2[44] was released by the Khronos Group.[45] This second major update to the API integrates 23 additional commonly-used proven Vulkan extensions into the base Vulkan standard. Some of the most important features are "timeline semaphores for easily managed synchronization", "a formal memory model to precisely define the semantics of synchronization and memory operations in different threads", and "descriptor indexing to enable reuse of descriptor layouts by multiple shaders". The additional features of Vulkan 1.2 improve its flexibility when it comes to implementing other graphics APIs on top of Vulkan, including "uniform buffer standard layout", "scalar block layout", and "separate stencil usage".[46]
Vulkan 1.3
On January 25, 2022, Vulkan 1.3 was released by the Khronos Group.[47] This third major update to the API integrates 23 additional commonly-used proven Vulkan extensions into the base Vulkan standard.[48] Vulkan 1.3 focuses on reducing fragmentation by making the new features not optional in order for a device to be considered Vulkan 1.3 capable.[47][49] The new features in Vulkan 1.3 include dynamic rendering, additional dynamic state, improved synchronization API, and device profiles.
Planned features
When releasing
OpenCL 2.2, the Khronos Group announced that OpenCL would converge where possible with Vulkan to enable OpenCL software deployment flexibility over both APIs.[50][51] This has been now demonstrated by Adobe's Premiere Rush using the clspv[52] open source compiler to compile significant amounts of OpenCL C kernel code to run on a Vulkan runtime for deployment on Android.[53]
The Khronos Group began a project to create a next generation graphics API in July 2014 with a kickoff meeting at
Valve.[54] At
SIGGRAPH 2014, the project was publicly announced with a call for participants.[13]
According to the US Patent and Trademark Office, the trademark for Vulkan was filed on February 19, 2015.[55]
Vulkan was formally named and announced at
Game Developers Conference 2015, although speculation and rumors centered around a new API existed beforehand and referred to it as "glNext".[56]
2015
In early 2015,
LunarG (funded by
Valve) developed and showcased a Linux driver for Intel which enabled Vulkan compatibility on the HD 4000 series integrated graphics, despite the open-source Mesa drivers not being fully compatible with OpenGL 4.0 until later that year.[57][58] There is still the possibility[59] of Sandy Bridge support, since it supports compute through Direct3D11.
On December 18, 2015, the Khronos Group announced that the 1.0 version of the Vulkan specification was nearly complete and would be released when conforming drivers were available.[20]
2016
The full Vulkan specification and the open-source Vulkan SDK were released on February 16, 2016.[1]
2018
On February 26, 2018, Khronos Group announced that the Vulkan API became available to all on
macOS and
iOS through the
MoltenVK library, which enables Vulkan to run on top of
Metal.[61] Other new developments were shown at
SIGGRAPH 2018.[62] Previously MoltenVK was a proprietary and commercially licensed solution, but
Valve made an arrangement with developer Brenwill Workshop Ltd to open-source MoltenVK under the Apache 2.0 license and as a result the library is now available
on GitHub.
Valve also announced that Dota 2 can as of February 26, 2018 run on
macOS using the Vulkan API, which is based on MoltenVK.[63]
2019
On February 25, 2019, the Vulkan Safety Critical (SC) Working Group was announced to bring Vulkan GPU acceleration to safety critical industries.[64]
Alongside the Vulkan 1.2 release, the Khronos Group posted a blog post which considered that HLSL support in Vulkan had reached "production ready" status, given the improvements in Microsoft's DXC compiler and Khronos's glslang compiler, and new features in Vulkan 1.2 which enhance HLSL support.[66]
On February 3, 2020, the Raspberry Pi Foundation announced that it was working on an open source Vulkan driver for their
Raspberry Pi, a popular single board computer.[67] On June 20, 2020, a graphics engineer revealed that he had created one after two years of work that was capable of running VkQuake3 at over 100FPS on the small computer.[68]
On March 17, 2020, Khronos Group released the
Ray Tracing extensions, based on
Nvidia's proprietary extension, with some major extensions and many minor changes, which in turn was based on Nvidia's
OptiX API.[69][70] On November 23, 2020, these Ray Tracing extensions were finalized.[71]
On November 24, 2020, Raspberry Pi Foundation announced that their driver for the
Raspberry Pi 4 is Vulkan 1.0 conformant.[72]
2022
On January 25, 2022, Vulkan 1.3 was released.
On March 1, 2022, Vulkan SC 1.0 was released, bringing Vulkan graphics and compute for the safety-critical industry while being based on the Vulkan 1.2 standard.[73]
On August 1, 2022, Raspberry Pi Foundation announced that their driver for the
Raspberry Pi 4 is Vulkan 1.2 conformant.[74]
On September 1, 2022, Mesh Shading for Vulkan was released.[75][76]
2024
Khronos Group announced the new Vulkan Roadmap 2024 on January 25, 2024.[77] Khronos Group announced the new
AV1 video decoding extension on February 1, 2024.[78]
Support across vendors
Initial specifications stated that Vulkan drivers can be implemented on any hardware that supports OpenGL ES 3.1 or OpenGL 4.x and up.[79] As Vulkan support requires new graphics drivers, this does not necessarily imply that every existing device that supports OpenGL ES 3.1 or OpenGL 4.x will have Vulkan drivers available.
Intel
As of March 2023, Intel has split Vulkan driver support on
Windows[80] and on
Linux.[81] All drivers are developed by Intel.
On Windows,
Skylake through
Ice Lake supports up to Vulkan 1.3,[82] with limited support after July 2022 as future updates will only cover security fixes.[80] Iris Xe and newer are fully supported as of March 2023.[83]
On Linux, as of March 2023 there is incomplete Vulkan support for
Haswell[84] with it not being Vulkan 1.0 compliant.[85] Apart from Haswell,
Ivy Bridge and
Broadwell are also supported by a legacy Vulkan driver in
Mesa called HASVK.[81] Skylake and newer being supported by a driver in Mesa called ANV.[81]
AMD
On Windows, Vulkan 1.2 is supported from
GCN 1.0 to
GCN 3.0,[86][87][88] with no further updates planned after June 2021.[89]GCN 4.0 and newer support Vulkan 1.3.[90]
On Linux there are various different Vulkan drivers with varying and overlapping hardware support. There is the open-source Vulkan driver called AMDVLK, developed by AMD which mirrors Windows support.[91] There is also the proprietary driver called AMDGPU-PRO which is not recommended to be used for most users as of March 2023.[92]
There is also the recommended driver called RADV in Mesa developed by Valve, Red Hat,[93] Google[94] and others. This driver as of March 2023 supports all GCN and
RDNA cards.[95] This RADV driver's support for GCN 1.0 through GCN 2.0 requires its experimental support in the
amdgpu kernel module to be enabled.[96]
NVIDIA
On Windows and Linux there is the NVIDIA developed Vulkan driver which supports Vulkan 1.2 on
Kepler cards[97] with no further updates planned after September 2021.[98]Maxwell and newer support Vulkan 1.3.[99]
NVK, an experimental, open source Vulkan driver for Linux based on
nouveau, was announced in October 2022.[100] It was merged into mainline
Mesa in August 2023.[101] The driver currently supports Vulkan 1.3[102]
As of June 2022, Apple devices do not provide native support for the Vulkan API.[109] Vulkan support is available via the open-source library
MoltenVK, which provides a Vulkan implementation on top of the
Metal graphics API provided on iOS and macOS devices, though it has some limitations in regards to certain advanced API features.[27]
In June 2022, version 1.3.217 of Vulkan added support for Metal objects, facilitating import and export between the two APIs.[110] In December 2022, Vulkan version 1.3.236 added small fixes for the interaction with Apple Metal.[111]
Backwards compatibility
Vulkan is not backwards compatible with
OpenGL,[112][17][note 1] although there are certain projects that implement OpenGL on top of Vulkan, such as Google's
ANGLE and
Mesa's Zink.[113]
Vulkan is also not compatible with other graphics APIs such as
Direct3D,
Metal, and
Mantle, however implementations of those APIs exist atop of Vulkan:
Direct3D has a number of implementations, namely
DXVK for Direct3D 9, 10, and 11, and
VKD3D-Proton for Direct3D 12 support. Other, older versions, of Direct3D may be available as third-party libraries, such as
D8VK for Direct3D 8.
Mantle has an in-development third-party implementation named
GRVK, to support older Mantle games.
Platform-specific graphics APIs implemented atop of Vulkan may also be able to run on alternative platforms. For example,
DXVK provides an alternative shared library intended to be used on
Linux natively (without the
Wine compatibility layer) to help with game porting.
^The process of setting up a graphics rendering pipeline doesn't differ drastically from OpenGL [ES] ones. E.g. shaders written in GLSL still can be reused: the source code can be compiled/translated by a standalone compiler into a new intermediate binary format called SPIR-V, which can then be consumed by the Vulkan API.
^"Vulkan Overview"(PDF). Khronos Group. June 2015.
Archived(PDF) from the original on December 8, 2015. Retrieved August 18, 2015. p. 19 "Vulkan Status"