Vulkan (API)
Vulkan is a low-overhead, cross-platform 3D graphics and computing API. Vulkan targets high-performance realtime 3D graphics applications such as video games and interactive media across all platforms. Compared to OpenGL and Direct3D 11, and like Direct3D 12 and Metal, Vulkan is intended to offer higher performance and more balanced CPU/GPU usage. Other major differences from Direct3D 11 and OpenGL are Vulkan being a considerably lower-level API and offering parallel tasking. In addition to its lower CPU usage, Vulkan is also able to better distribute work among multiple CPU cores.
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 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 Mantle later adopted by Microsoft with Direct3D 12 and Apple with Metal.Intended advantages of Vulkan over previous-generation APIs include:
- A single API for both desktop and mobile graphics devices, whereas previously these were split between OpenGL and OpenGL ES respectively.
- Availability on multiple modern operating systems in contrast to Direct3D 12; like OpenGL, the Vulkan API is not locked to a single OS or device form factor. As of release, Vulkan runs on Android, Linux, Tizen, Windows 7, Windows 8, and Windows 10
- Reduced driver overhead, reducing CPU workloads.
- Reduced load on CPUs through the use of batching, leaving the CPU free to do more computation or rendering than otherwise.
- Better scaling on multi-core CPUs. 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, the API regularly does not scale well on multi-cores.
- OpenGL uses the high-level language GLSL for writing shaders which forces each OpenGL driver to implement its own compiler for GLSL that executes at application runtime to translate the program's shaders into the GPU's machine code. Instead, Vulkan drivers are supposed to ingest shaders already translated into an intermediate binary format called SPIR-V, 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 do GPU specific optimization and code generation, resulting in easier driver maintenance, and eventually smaller driver packages.
- Unified management of compute kernels and graphical shaders, eliminating the need to use a separate compute API in conjunction with a graphics API.
OpenGL | Vulkan |
One single global state machine | Object-based with no global state |
State is tied to a single context | All state concepts are localized to a command buffer |
Operations can only be executed sequentially | Multi-threaded programming is possible |
GPU memory and synchronization are usually hidden | 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 |
NVIDIA notes 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.
AMD says 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.
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. 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. 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. 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. At the same time, it also brought better compatibility with DirectX 12, explicit multi-GPU support, ray tracing support, and laid the groundwork for the next generation of GPUs. Alongside Vulkan 1.1, SPIR-V was updated to version 1.3.
Vulkan 1.2
On January 15, 2020, Vulkan 1.2 was released by the Khronos Group. 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".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. This has been now demonstrated by Adobe's Premiere Rush using the clspv open source compiler to compile significant amounts of OpenCL C kernel code to run on a Vulkan runtime for deployment on Android.History
The Khronos Group began a project to create a next generation graphics API in July 2014 with a kickoff meeting at Valve. At SIGGRAPH 2014, the project was publicly announced with a call for participants.According to the US Patent and Trademark Office, the trademark for Vulkan was filed on February 19, 2015.
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".
2015
In early 2015, LunarG 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. There is still the possibility of Sandy Bridge support, since it supports compute through Direct3D11.On August 10, 2015, Google announced that future versions of Android would support Vulkan. Android 7.x "Nougat" launched support for Vulkan on August 22, 2016. Android 8.0 "Oreo" has full support.
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.
2016
The specification and the open-source Vulkan SDK were released on February 16, 2016.2018
MoltenVK
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. Other new developments were shown at SIGGRAPH 2018. 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 . Valve also announced that Dota 2 can as of 26 February 2018 run on macOS using the Vulkan API, which is based on MoltenVK.V-EZ
On March 26, 2018, Khronos Group and GPUOpen announced project V-EZ. Short for "Easy Mode", it aims to reduce the complexity of the IDE syntax within the Vulkan API by implementing an additional library within the base SDK. In August 2018, AMD made the library open source.GLOVE: OpenGL ES over Vulkan
Another middleware that allows legacy OpenGL ES applications to run on top of Vulkan was open-sourced by Think Silicon in August 2018. This software allows thinner Vulkan drivers to be used in the system instead of multiple OpenGL ES and Vulkan drivers. In addition with MoltenVK, GLOVE allows to use OpenGL ES on macOS/iOS devices. The ANGLE project has a similar goal.Vulkan 1.1
On March 7, 2018, Vulkan 1.1 was released.2019
Vulkan SC
On Feb 25, 2019, the Vulkan Safety Critical Working Group was announced to bring Vulkan GPU acceleration to safety critical industries.Stadia
Google's Stadia streaming cloud gaming service uses Vulkan on Linux based servers with AMD GPUs.2020
Vulkan 1.2
On January 15, 2020, Vulkan 1.2 was released.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.
Raspberry Pi Vulkan Driver
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. 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.Real-time ray tracing
On March 17, 2020, Khronos Group released the Ray Tracing extensions by adopting previously existing Nvidia implementation with some minor changes.Software that supports Vulkan
Games
Game console emulators
- Beetle/Mednafen PSX, Libretro port of Mednafen PlayStation
- Cemu
- Dolphin
- Libretro port of Mupen64Plus
- RPCS3
- ParaLLEl-RDP
- PPSSPP
- Xenia
- Yuzu
Game engines
- NAOS Engine – Guild Software added Vulkan support to their proprietary MMORPG engine in January 2018, eventually releasing it into Vendetta Online in September of that year.
- Source 2 – In March 2015, Valve announced the Source 2 engine, the successor engine to the original Source engine, would support Vulkan.
- Serious Engine 4 – In February 2016, Croteam announced that they were supporting Vulkan in their Serious Engine.
- Unreal Engine 4 – In February 2016, Epic Games announced Unreal Engine 4 support for Vulkan at Samsung's Galaxy S7 Unpacked event.
- RAGE Rockstar Advanced Game Engine - fully supports Vulkan in addition to DirectX12
- Torque 3D – In April 2016, the developers community announced they will include Vulkan support.
- id Tech 3 – unofficial Vulkan support was added in May 2017.
- id Tech 4 – unofficial Vulkan support was added in August 2017.
- id Tech 6 – Vulkan support was added in July, 2016.
- id Tech 7 – uses Vulkan on PC exclusively.
- Stride – Vulkan support was added in July 2016 while the engine was known as Xenko.
- Unity – The engine has support for Vulkan since version 5.6.
- CryEngine – Support for Vulkan was added in the 5.4 release.
- Intrinsic – A free and open-source cross-platform game engine that supports Vulkan.
- Abyss Engine – In May 2017, Deep Silver FISHLABS released Galaxy on Fire 3 on Android with Vulkan support.
- Banshee 3D – A free and open-source cross-platform game engine that supports Vulkan.
- Godot – a 2D and 3D, cross-platform, free and open-source game engine. In late February 2018, the developers announced that they will shift their focus from solely using OpenGL ES 3 to target all platforms, to instead using a combination of OpenGL ES 2 and Vulkan.
- Flax Engine – Vulkan support was added in April 2019.
- Apex Game Engine which was used in Rage 2 uses Vulkan for rendering.
- Messiah Game Engine – NetEase Games collaborated with Qualcomm to optimise their Messiah Game Engine for Vulkan
- X-Plane 11 - Vulkan/Metal is supported in the new 11.50 update
Rendering engines
- UX3D Engine – Vulkan support was added in September 2017.
Development tools
- Diligent Engine – graphics API abstraction library, supports Vulkan, DirectX 11/12, Metal, OpenGL and OpenGL ES
- gfx-rs – graphics/compute abstraction library in Rust, supports Vulkan, DirectX 11/12, Metal, OpenGL and OpenGL ES.
- GPU PerfStudio 3.6 supports Vulkan on Linux and Windows.
- GTK Scene Graph Kit, released in March 2017 as part of GTK+ 3.90, has a Vulkan rendering path.
- RenderDoc has support for Vulkan, since it was added on February 10, 2016.
Wrapper libraries
- Anvil – reduces the amount of time to write a working Vulkan application from scratch. Part of GPUOpen.
- Ashes – wrapper library that let you write a Vulkan application using either Vulkan, OpenGL or DirectX as backend. Still in development.
- DXVK — A translation layer from Direct3D 9, 10 and 11 to Vulkan.
- GLOVE – "OpenGL ES Over Vulkan", it acts as an intermediate layer between an OpenGL ES and Vulkan.
- MoltenVK – allows Vulkan applications to run on top of Metal on Apple's macOS and iOS operating systems.
- V-EZ – "Easy Mode" for Vulkan, intended to alleviate the complexity of using the Vulkan. Part of GPUOpen.
- Vulkano – wrapper for the Rust programming language.
- PasVulkan – wrapper for the Object Pascal programming language.
- NVK – Node.js based Vulkan wrapper for the JavaScript programming language.
- Zink – an OpenGL implementation on top of Vulkan via Mesa Gallium
OS components
Compatibility
Initial specifications stated that Vulkan will work on hardware that currently supports OpenGL ES 3.1 or OpenGL 4.x and up. 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.Vulkan 1.1 with higher efforts is supported by the newer lines in Hardware like Intel Skylake and higher, AMD GCN 3rd and higher, Nvidia Kepler and higher.
AMD, Arm, Imagination Technologies, Intel, Nvidia and Qualcomm supports actual hardware since second half of 2018 Vulkan 1.1 with own drivers.
Mesa 18.1 supports with RADV and ANVIL driver AMD and Intel hardware. Actual state in Mesa 3D of RADV and ANVIL see Mesamatrix.
Android 7.0 Nougat supports Vulkan 1.0. The software was released in August 2016. Vulkan 1.1 is supported in Android 9.0 Pie. Vulkan 1.1 support is mandatory for 64-bit devices running Android 10.
Vulkan support for iOS and macOS has not been announced by Apple, but an open-source library exists which provides a Vulkan implementation that runs on top of Metal on iOS and macOS devices.