-
What's Vulkan
Vulkan is an API(Application Programming Interface) for graphics and compute hardware.
To theprogrammer, Vulkan is a set of commands that allow the specification of shader programs or shaders, kernels, data used by kernels or shaders, and statecontrolling aspects of Vulkan outside of shader execution. Typically, the datarepresents geometry in two or three dimensions and texture images, while theshaders and kernels control the processing of the data, rasterization of thegeometry, and the lighting and shading of fragments generated by rasterization, resulting in therendering of geometry into the framebuffer.
To the implementor,Vulkan is a set of commands that allow the construction and submission ofcommand buffers to a device. Modern devices accelerate virtually all Vulkanoperations, storing data and framebuffer images in high-speed memory andexecuting shaders in dedicated GPU processing resources.
Spec:
https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#introduction-whatis
- Why Vulkan?
Vulkan is a low-overhead, cross-platform 3D graphics and compute API. Vulkan targets high-performance realtime 3D graphics applicationssuch as video games and interactive media across all platforms.
Comparedwith OpenGL and Direct3D 11 andlike Direct3D 12 and Mantle, Vulkan canoffer higher performance and more balanced CPU/GPU usage.Other major differences from Direct3D (priorto version 12) and OpenGL are Vulkan being a considerably lower level API andoffering parallel tasking.
- Vulkan API is well suited for high-end graphics cards as well as for graphics hardware on mobile devices.
- In contrast to Direct3D 12, Vulkan is available on multiple modern operating systems.
- Reduced driver overhead, reducing CPU workloads.
- Reduced load on CPUs through the use of batching.
- Better scaling on multi-core CPUs.
- By allowing shader pre-compilation in form of SPIR-V (Standard Portable Intermediate Representation), application initialization speed is improved and a larger variety of shaders can be used per scene.
- Unified management of compute kernels and graphical shaders
OpenGL | Vulkan[27] |
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 |