The creation of a more efficient GPU interface
Up close with the Khronos Group’s Vulkan API
There’s a new graphics API in town, and its name is Vulkan. Formerly known as glNext, and coming from the Khronos Group, it’s the successor to the popular but ageing OpenGL, and the only current contender still flying the flag for crossplatform development in an era of platform-vendor-owned technologies like Microsoft DirectX and Apple’s Metal. Instead of focusing on proprietary systems, it’s engineered to be as close to the architecture of all modern GPUs as possible, enabling the most efficient ways to make use of them. Leading the way is the Imagination PowerVR Rogue series, with its proof-of-concept drivers for the new API demonstrating its power, and the potential for developers to harness it for games and applications on a wide range of mobile as well as desktop platforms.
For starters, Vulkan will provide many developers with a free boost with no additional effort required, thanks to engines handling the mechanical changes under the hood. Rendering isn’t simply faster, but more consistent across systems. With OpenGL, shader compilation, especially blending state, can cause shaders to be compiled even on the first draw call, producing different performance effects based on the underlying architecture. The result: unpredictability.
Vulkan avoids this problem by having as much as possible specified upfront, at the time of pipeline creation, rather than during rendering. This allows for better stability, fewer frame drops and hiccups, and, of course, more draw calls. The PowerVR Rogue GPUs are designed to showcase how much more can be done, with their tiled architecture going hand-inhand with Vulkan’s strengths. One of Vulkan’s key additions is its render pass, which gives applications control of uploads and resolves of their framebuffer, so bandwidth-heavy functions are done explicitly instead of the driver needing to guess. This reduced strain allows for both improved graphics and better battery life on mobile devices.
These features also make Vulkan intuitive to develop with, bringing an extra level of both consistency and predictability across the rendering system. In OpenGL, it’s difficult to know whether or not an operation would change a particular global state; there is no global state in Vulkan, helping developers to more intuitively know what is happening. In addition, it gives much more control over elements such as memory allocation. With Vulkan, every application knows exactly what and how much it’s using, no longer having to blindly guess how to rebalance resources when faced with a generic ‘out of memory’ error.
Vulkan isn’t simply about GPUs; it’s focused on squeezing the best performance out of the entire architecture. Idle cores can be pressed into service, with rendering commands created across the CPU. No extra work or locking is required, potentially helping a game such as Minecraft, which has to edit its render commands on the fly (whenever a user destroys a block), or future apps such as CAD tools and GPS mapping software.
The Vulkan driver, too, does its part for the system. Its tight architecture and lean design keeps things simple, allowing for both more stability and greater efficiency than OpenGL – a boon for hardware manufacturers as well as software developers. Even in an early state, Imagination’s drivers are showing stable performance and frame rate thanks to Vulkan. An early conversion of an older OpenGL ES demo set in a library already features less than half of the CPU usage of its original implementation, and results in a far more consistent load on the system – a slightly bumpy line compared to the original’s hills and valleys. Even better performance is expected as development continues.
Vulkan allows for better stability, fewer frame drops and hiccups, and, of course, more draw calls