Overview: Vulkan API

Jack Francis Dalton
6 min readMay 2, 2018

--

Throughout 2016 you may have heard the term ‘Vulkan’ thrown around. Perhaps you heard the term when news broke, that the anticipated reboot of Doom would be supporting “the Vulkan API”. Alternatively, the Android enthusiasts among you may have heard the announcement at Google I/O, that the latest version of Android (7.0: Nougat) would be offering Vulkan support. If you are reading this article, it is probably still unclear to you… What exactly is Vulkan? Vulkan, released in February 2016 by the Khronos group (a 3rd party group featuring names like AMD, Valve, and Nvidia), is a low-level multi-platform graphics API. Based on AMD’s Mantle API, It is the successor to OpenGL, and a competitor to both Microsoft’s DirectX 12 API, and Apple’s Metal API. Great… So what does all of that mean?

Well for starters, let’s clarify just what an “application programming interface” (API) is. An API is formally defined as :

“a set of functions and procedures that allow the creation of applications which access the features or data of an operating system, application, or other service”

A popular analogy for describing this, is to compare an API to a restaurant waiter. A waiter offers customers a menu to choose from, and then relays orders to the kitchen, later returning the requested dishes to the respective customers. In software terms, an API offers developers a selection of functions to call, and then appropriately handles any requests made by the developers software. As such, API’s often take the form of code libraries that handle common tasks, and as such are considered by many to be the building blocks of modern development. Vulkan is an example of an API that handles graphics rendering.

So that’s APIs, but in this context what do we mean by “low-level”? Specifically, A low-level API refers to an API with fewer levels of abstraction between the developer and the hardware. Returning to our restaurant analogy, a low-level API is comparable to being able to specify : the individual ingredients of your meal, how each ingredient is cooked, and then being able to tell the chef your order directly. This offers advantages in specificity, and reduces overhead as you communication is more direct, and detailed. In particular Vulkan (along with its competitors) excel at using multi-core machines through use of multi-threading. Technology that was previously under optimised due to the popularity of high-level APIs that predate the popularity of parallelism.

In general this is all considered to be beneficial, however it is important to notice that low-level APIs open up possibilities for previously non-existent problems. A big part of this is the shift of responsibility from the API to the developer. This make development increasingly complex; as more to-the-metal details need to be considered. On top of that, it also creates the potential for unskilled developers to make lower quality, less stable software as they have more access, and fewer restrictions. In this sense it is best to describe Vulkan as an API that enables better performance, but does not guarantee it.

Vulkan API vs OpenGL : https://www.hardwareunboxed.com/doom-vulkan-vs-opengl-benchmark-the-tide-turning-in-amds-favour/

Finally, and frequently cited as the most appealing feature of Vulkan, is its multi-platform support. A multi-platform API is as it sounds, is an API that is supported across multiple platforms. As of writing Vulkan currently supports Windows, Linux, Tizen, and Android, across a multitude of hardware architectures (Nvidia and AMD GPU’s included) . This is a unique selling point for Vulkan as its major competitor DirectX 12 is only supported on XboxOne and Windows 10+, and Apple’s Metal is only supported on IOS and OSX. As Vulkan is an open specification it is also leaves open the possibility for others to adopt the API in the future. DirectX 12 and Metal however, will likely remain exclusive to their respective owner companies.

The important question for Vulkan is, “will it adopted by the industry, or will it be left in the dust”? This is a complex question for a few reasons, and truthfully can only be answered with time. That said we can certainly speculate based on the current situation. For starters, it is noteworthy that Vulkan has some decent backing from Valve (the company behind the gaming platform Steam). Part of the reason for this is that Valve has invested heavily in SteamOS and Steam Machines. These products are relevant as SteamOS is based off of Linux, an operating system that currently fails to support the majority of PC games. An industry transition to Vulkan would remove the limitations of Linux as a supported gaming operating system, and in doing so greatly expand the library offered by Steam machines. In turn this would allow Steam Machines to better compete in the console market. Vulkan and Steam machines share a symbiotic relationship. For Steam machines to better compete, Vulkan will have to take off. For Vulkan to better compete, Steam machines will have to take off.

The second trick in Vulkan’s pocket is the growing Android gaming market. Although this is a separate demographic to the major console market, the appeal of being able to port Android games to the PC, and PC games to Android is something that should not be underestimated. In part because of the growing size of the market, but also due to the growing capabilities smart phones offer as a gaming platform. On top of all of that, consider: the popularisation of VR on both PC and smartphones, rumours of an Android desktop operating system, and a slew of android powered consoles, it seems fair to say that the gap between PC gaming and Android gaming is thinning. As that gap thins, the advantages of Vulkan can be exploited.

Now all of these points are well and good, but there are major roadblocks that Vulkan will have to overcome. In my opinion one of the biggest detractors to Vulkan momentum is Apple’s decision to not support Vulkan on IOS or OSX. It had been speculated that Apple would support the platform to improve its limited game library, however the company announced at 2015’s WWDC that they would be using their own low-level API named Metal, and would not be supporting Vulkan or later versions of OpenGL. As a result of this, the hope that Vulkan could become the prominent graphics API on the three of the major computer operating systems (Windows, Mac and Linux) is dashed. Apple has released MoltenVK (a combination of Metal and Vulkan) in compensation for this, however without Apple backing Vulkan as a primary API, it does little to change things.

Ultimately it will be up to the game development studios, and game engine developers to decide Vulkan’s fate. Fortunately the latter of the two is already hard at work, with both the Source engine (Valve) and the Unreal engine (Epic Games) already supporting Vulkan, and Unity announcing their plans for Vulkan support in 2017. Development studios on the other hand will be more of an uphill battle. In part due to the one year head start DirectX 12 has had on Vulkan, and in part due to developer API preference. As a result of this DirectX 12 also offers a larger game library. Victory for DirectX 12 will result in improvements in effective graphics hardware use, but in an industry dominated by Microsoft and Windows. I however, am pulling for Vulkan in this fight, as it has the potential to shift the market towards a diverse multi-platform, multi operating system landscape. A landscape that from my perspective benefits the consumer most of all.

--

--