Glorious New API FAQ!

SOFTWARE

2016 has been an exciting year for gaming technology. New GPUs, exciting games, the big entry of somewhat mainstream VR and last, but definitely not least – the entrance of new, low level APIs in games!

Now that sounds very exciting and all  but it has caused some confusion among gamers. This article aims to explain in a simple manner what all the fuss is about and the challenges that await.

So what’s an API, anyways?

Application programming interface (API) is quite the mouthful. An easy way to think about it is as a sort of inherent toolset that a game (or program) can always rely on and execute efficiently. Things like hardware tessellation and contact hardening shadows, for example, are generally part of the DirectX 12 API and OpenGL 4+.

Now don’t think that just because a game uses, say, DirectX 9 (a fairly old API), it has to look and run in a certain manner and that some features from other, more advanced APIs are completely off-limits—it doesn’t work like that. The fact is, developers and driver teams have worked miracles in the past.

Finally, it is also quite backwards compatible. Your brand new Nitro RX 480 may be an excellent DX12 and Vulkan GPU, but it CAN run older titles as well! Fire up some very old DirectX8 or OpenGL 2.1 title and the card will probably provide a perfectly fine user experience (software or game bugs notwithstanding).

So what have we used up until now?

Generally most consoles use their own, custom API. Throughout history, some PC have also used older or special APIs, but generally these days most games of all genres and budgets use Microsoft’s DirectX 10 (DX10), DirectX11 (DX11) and the free OpenGL.

Obviously those APIs have advanced in time. For example, under equal visual quality and effects, DirectX11 can offer up to 30% higher performance than DirectX 10. OpenGL has had many iterations to improve the tools and performance. Developers have become extremely adept at squeezing performance from these APIs as they have had to use them for a very long time.

Why the change if it ain’t broke?

Truth be told, squeezing great performance out of these now old APIs is getting hard. Sure, some developers have poured lots of money and time into boosting optimization and making sure their new games run well, but whilst miracles have happened, the proverbial wall is ever closer.

So what does DX12 and Vulkan bring to the table?
DirectX12 (Microsoft)  and Vulkan (Khronos group) allow developers to make their games run “closer” to the metal in a sense, bypassing some inherent API overhead (this is why they’re called low level) and more evenly distributing the workload of a scene across both the GPU and CPU.

The idea is not to make better looking games but utilize the massively powerful CPUs and GPUs we already have to their full extent. In theory, doing so can bring massive increases in performance for systems both mighty and weak, as well as lessen the toll demanding scenes may take on your hardware making minimum framerates more consistent.

OK then, so what’s the catch?

All cutting edge technology has a certain adjustment period, and low level APIs are no different. Developers may have lots of DX11 and 10 experience, but this new piece of tech represents a paradigm shift for game development.

One inherent and major disadvantage, though, is that these new toolsets put almost all the power and responsibility into the hands of the developers. With older APIs, AMD and Nvidia (and Intel technically as well) could do a LOT to a game’s performance within their own drivers. That is why sometimes games seemingly start running a lot faster after a driver update or two; and even some visual bugs and issues may get fixes driver side. With the new, low-level technology though, whilst GPU makers still may fix issues or improve performance, it will be to a very minor extent. This means that developers have to do almost all of the heavy lifting if they want to be rewarded with great performance!

So that is why sometimes DX12 games may run worse than DX11 titles?

In a nutshell, yes. That is a major part of why certain games see a regression. Now make no mistake, developers will get better at using this new technology over time, so things will get better for everyone. Experience, especially on these harder but more rewarding pieces of technology, is worth its weight in gold.

With that being said, developers that are experienced with older APIs or are just unsure of their ability to handle DX12 and Vulkan should stick to said older APIs. Not all games will need such low-level optimizations, and drivers from GPU developers AMD and Nvidia can and will help these developers. The old APIs can still easily coexist with the newer ones and do really well.

Which games will benefit the most from such technology?

That is a hard question. The truth is, every single genre of games will benefit from a well-implemented DX12 or Vulkan path. From arcade platformers to grand strategy titles, everyone could reap performance enhancements.

However, it will be titles with huge amounts of complex draw calls, AI and physics that will benefit the most. Witcher 3’s Novigrad, for example, runs quite well on DX11. CD Projekt Red did a great job… but it definitely would run even better on a low level API, utilize its CPU resources for all the NPC simulations a lot better and have better GPU utilization to boot!

Strategy and Tactics titles may also see huge performance uplifts! The sheer amount of animations and objects on screen can stagger performance even on extremely high-end systems, so developers of such titles should definitely look into new APIs.

Which games make good use of this new fancy tech?

There isn’t as yet a whole lot of examples to choose from, but a few have already seen massive benefits. On the DirectX 12 side, we have both Ashes of the Singularity and Total War Warhammer making good progress patch after patch. The new Hitman title has had some issues, but it too does quite OK with the new APIs.


Vulkan has so far seen fewer titles, but it is also maturing. Currently id software’s excellent DOOM is probably the best implementation: It looks amazing and runs like a dream!

Of course as time goes on, more and more games would be added to both lists.

Why do some GPUs and CPUs see bigger uplifts?

The truth is that GPU manufacturers make very different architectures with different strengths and weaknesses. Sometimes, certain resources may be a bit underutilized on older APIs, so a new, better one can extract more performance from the hardware. This is completely normal; GPU architecture is extremely complex, with lots of “moving” parts, so the bottlenecks will always be different and even differ from game to game!

Also certain architectures may just be made to scale better on these new APIs. Asynchronous compute (Async for short), for example, allows AMD GPUs to utilize their normally huge arrays and pipelines more efficiently, and therefore extract better performance. Coupled with pre-emption and load balancing (things Nvidia and AMD can both do right now), we gamers are seeing noticeable uplifts.

Of course, with that being said, Async or pre-emption are not the only features of DirectX12 and Vulkan. Other things like Shader Intrinsics, lower CPU Overhead, hugely higher draw calls and more balanced drivers as well as removed layers are generally the biggest improvements behind any AMD or Nvidia uplift in performance. The inclusion of Async on top is just tasty icing on the cake, but developers should try to extract the maximum performance possible for all hardware!

What else can these APIs offer?

Unfortunately, all the tech on offer stands firmly in developer’s hands. The ability to use GPUs from both manufacturers (for example… both Nvidia and AMD working together without fault!) is very exciting. Better overall multi-GPU support is another resounding success.

As the technology matures and more developers gain experience, we may get to see more and more tricks. For us PC gamers, exciting times are ahead indeed!

Nikolai Petkov
Nikolai Plamenov Petkov is a young 24-year-old gamer (and student) from Bulgaria. Nikolai is one of the winners of the SAPPHIRE Nation's Editors' Casting contest.

JOIN THE NATION

SIGN UP
JoinSapphireYoutube_logo

COMMENTS