Khronos Group Launches Vulkan 1.2

Back in 2016, the DOOM reboot was shocking people with just how optimized the game was when using the Vulkan API instead of the older but more prevalent OpenGL API. Vulkan was turning RX 480s into GTX 1070s for free thanks to its ability to use more modern features found in the Polaris architecture, features that weren’t seeing much use in games that used the older DX11 API. Since then, though, Vulkan has been out of the limelight, probably because it hasn’t caught on quite as quickly as many were hoping.

Last week, however, Khronos Group reached out to me and I got to talk with its President, Neil Trevett (who is also an Nvidia VP). He got me up to speed on what Khronos Group has been doing since 2016, and what is changing today with the launch of Vulkan 1.2.

What is Vulkan?

First, however, some of you might not know what Vulkan is, even if you’ve heard of it. Vulkan is a low level API, meaning it’s operating pretty close to the hardware (in this case, GPUs). Think of how drivers act as sort of an intermediary between your GPU and the rest of your PC; Vulkan is on a similar level. Vulkan does not replace drivers, but it does make large, complex drivers less necessary.

First introduced in early 2016, it became well known for powering the DOOM reboot later that year because AMD GPUs got a huge performance boost when Vulkan was enabled. But Vulkan isn’t just about utilizing modern features to get more performance, it’s about portability and compatibility as well. Vulkan is designed to be operable on as many platforms as possible. For gaming, this means a developer could make a PC game using Vulkan and then port it over to a console without having to start from scratch. Vulkan essentially makes development easier.

Who is using Vulkan?

Tons of companies, services, users, etc are using Vulkan. All the major PC/desktop/laptop operating systems (Windows, Linux, and MacOS) have at least one Vulkan application, Android and iOS have Vulkan compatibility, Vulkan is used in cloud computing and gaming, and it’s even on Nintendo Switch in certain titles. Vulkan is almost everywhere, thanks to the support it gets from GPU vendors such as AMD, Intel, Nvidia, Imagination Technologies (which powers some Apple hardware), ARM, and more. Khronos Group is also parterned with over 100 other companies from all over the world supporting Vulkan and Khronos as a whole. These include Microsoft, Apple, Unity, Amazon, and Texas Instruments, just to name a few.

Unfortunately, Vulkan does need to have the support of the platform owner in order to be used, as Trevett explained to me; it isn’t on Xbox or Playstation because Microsoft and Sony don’t support the API. But, if a vendor wants to start supporting Vulkan, it shouldn’t require a new platform or a serious rework, because the whole point of Vulkan is easy portability from one platform to the next.

When it comes to gaming (which isn’t the only use for Vulkan but is certainly one of the most important), there are just a handful of games that utilize the API; do keep in mind that Vulkan hasn’t even been around for 4 years yet. Some of the most celebrated and recent PC games are using Vulkan: Read Dead Redemption 2, Rage 2, No Man’s Sky, and Total War Three Kingdoms (on Linux) all use Vulkan. DOOM Eternal will also be using Vulkan when it comes out. Additionally, all Stadia games use Vulkan, which is important for getting Vulkan into the mainstream. Some may point out that Stadia isn’t the most successful gaming platform, but it’s undeniable that Google choosing Vulkan is proof that Vulkan is appealing for developing a new platform that needs ported games. Additionally, some mobile games are also using Vulkan, such as Fortnite and Roblox. Though Vulkan is still a minority for gaming, it is (perhaps quietly) gaining traction.

What are the benefits of Vulkan?

Portability, performance, and independence are the key benefits of using Vulkan. As I said before, Vulkan has great momentum on multiple platforms, especially thanks to its portability, and that’s thanks to a few key features. First, Vulkan is built to share common instructions and other materials used in more widespread APIs, making ports much easier to make. Additionally, much of the software Vulkan is based on is open source. Open source, of course, is a great boon for compatibility because it’s not vendor or platform locked. Combined, this allows for interesting projects such as Valve’s Proton. With Proton, over 6500 Steam games are confirmed to work on Linux even if there is no official support, alongside an additional 10000 or more games that might work to a certain degree. Prior to Proton, Steam had less than 6000 Linux games that could natively run on Linux, and keep in mind that Valve has been trying to push native Linux games for almost a decade by now. In less than 2 years, Proton got more games running on Linux with the kind of performance and stability you would expect from a native port, not to mention thousands more titles that have some degree of compatibility.

One of the reasons why this works is because developers can put a layer of Vulkan on top of an API as a sort of intermediary. This works with OpenGL, DX9, DX11, DX12, and Metal (which is Apple’s API). Khronos Group is still working on support for this function, but layering is an interesting option for devs who don’t necessarily want to make full port to Vulkan, and for devs that actually want to add Vulkan for additional functionality that might not be related to portability.

When it comes to Windows gaming, Khronos Group has been focusing on compatibility with Microsoft’s own low level API, DirectX12. Though Vulkan and DX12 might look like competiting APIs, they’re actually beneficial for each other thanks to the common adoption of High Level Shader Language (or HLSL). HLSL is a shading language used for DirextX and has been for some time. After finishing the coding for the shaders in HLSL, devs use the Direct X Compiler (or DXC) to compile the frontend and then the backend, and this is necessary to continue the development process. In order to shorten the amount of time spent on ports, Vulkan has increased compatibility with HLSL. Basically, the frontend of Vulkan and DX12 applications are identical. Both start with HLSL, and during compiling using the now open source DXC, developers will choose if they want SPIR-V (for Vulkan) or DXIL (for DX12). The backend is still different, so a port will have to rework that portion, but having the frontend require no extra work whatsoever is great for development, especially in a time where developers are putting more of a focus on the frontend rather than the backend.

Performance is also seeing consistent improvements with Vulkan. Much of this is thanks to compatibility being more native, which reduces code rewrites and other time consuming ventures, but another important factor is Vulkan’s additional extensions and features. When it comes to GPUs, Vulkan enables native multi GPU, optional instructions that utilize new hardware features such as asynchronous compute, and decreasing GPU driver overhead, an issue that has been infamous on AMD GPU drivers. During our talk, I asked Trevett if more compute oriented architectures such as GCN and Turing had an advantage over more gaming focused architectures like Navi and Pascal, but he assured me that Vulkan was an “equal opportunity” API; so, it’s not that Vulkan favors architectures with more computational power, but architectures with more and especially modern features. We also discussed multi GPU, which was still in everyone’s minds back in 2016, but has since died out more or less. Trevett wasn’t sure exactly why (complex development leading to a lack of driver support seems to be a major reason), but we agreed that more native API support probably would have kept multi GPU setups relevant; hopefully, there’s still another opportunity to tap into multi GPU since it works so well on Vulkan.

CPUs are also benefiting from Vulkan thanks to improved multi threading. In the past, in most DirectX 11 (or DX11) and older games, most functions would happen on a single thread with just a few other threads doing support functions. While this was fine for a long time, the industry is moving forward and programs that just utilize 4 threads aren’t enough anymore, especially given the advent of fast, highly threaded mainstream CPUs from both Intel and AMD (especially AMD). Good multi threading means functions can be executed at the same time, or multiple threads can work on several functions that are supposed to come in a certain order. Think of a process that requires function A, then B, then C to be executed in that order; if three threads are working on A, B, and C individually, all at the same time, instead of one thread working on all of them sequentially, the total amount of time spent is much lower. More threads helping to execute more functions means less time wasted on waiting for these functions to go through.

Finally, Vulkan brings independence to developers. Closed source and vendor specific APIs like DirectX can be a big issue because they’re focused solely on whatever platform they were designed for. They might not even be focused on good performance, let alone letting developers port their work over to other platforms. Though Vulkan does require devs to pay closer attention to the hardware they’re working with and to take up some of the functions typically handled by drivers, the effort is certainly worth it when considering what Vulkan does for portability and performance.

What does Vulkan 1.2 bring to the table?

Finally, let’s talk about the new features launching today alongside the new version of Vulkan. Without getting too technical, these features are:

  • “Improved performance, enhanced visual quality and easier development”
  • Timeline Semaphore (improved sync between host, devices, and threads)
  • Better HLSL compatibility
  • Improved API layering support for streamlining ports
  • 23 extensions introduced after version 1.1 launched are included in the core of version 1.2, several of which take advantage of new architectural features

Vulkan 1.2 mostly brings optimizations and enhancements to the features I covered previously. So, we can expect more Proton games to become more playable, more DX12 games to get a Vulkan option, more Vulkan games to get better performance, more developers to get involved in Vulkan in general, and so on. Additionally, many of the 1.1 extensions included in the core of 1.2 are dedicated to taking advantage of new hardware features. There is also the new timeline semaphore, which Khronos Group has an in depth technical article for.

Vulkan’s newest update is focused on polishing and enhancing the existing experience. When you consider that there are still thousands of games that aren’t quite playable on Proton, for example, it really makes sense that Khronos Group is prioritizing improvements on the technologies that already exist rather than introducing even more new features. But if you were hoping for big new things coming to Vulkan, you won’t have to look for long.

What’s in the future for Vulkan?

Of course, Vulkan 1.2 is going to get extensions of its own, and the main ones to look out for are machine learning, ray tracing, and variable rate shading, all of which have been getting recent attention, especially with the advent of RTX, which incorporates machine learning and ray tracing. Contrary to many of the complaints about RTX, its biggest issue isn’t performance (which is presently a hardware matter), but compatibility with games. With native Vulkan support, more games should be able to support ray tracing; ray tracing is cool and it is the future of gaming, we just need to be patient for the hardware and the software to get better. Variable rate shading is also currently supported by Nvidia as well as Intel; hopefully AMD gets on board this year with its upcoming RDNA2 GPUs.

So, between now and the time Vulkan 1.3 launches, we can expect more exciting extensions and updates to keep things fresh. Ray tracing is easily the most anticipated feature given that Nvidia and AMD are about to launch brand new GPUs with ray tracing support. From Nvidia, we can probably expect much higher ray tracing performance. From AMD, we can at least expect there to be ray tracing, but how good the performance will be is a mystery. With Vulkan supported ray tracing, perhaps we’ll see a much quicker rate of adoption for ray tracing than RTX has shown so far.

In conclusion, Vulkan 1.2 brings some much appreciate polish to an already robust API, and although the gaming industry’s adoption of new, low level APIs is still a work in progress, Vulkan 1.2 should be accelerating the process. Let’s hope to see more games using Vulkan, more games ported using Vulkan, and more Vulkan in general.

Liked it? Take a second to support Matthew Connatser on Patreon!
Become a patron at Patreon!