AMD have had a busy few days, they have just announced their new range of GPU’s, including the R9 290x (which is a 5TFLOP monster), and have also let the world know about Mantle. AMD’s Mantle API is a newly developed, open API which in theory proves drastically improved performance over the more traditional standard API’s such as DirectX and OpenGL.
What is AMD Mantle
AMD’s New Mantle API has been specifically designed to take full advantage of the GCN (Graphic Core Next) technology from AMD. It can do so by being a far “lower level” API than say DirectX’s Direct3d. OpenGL and DX operate as a very high level, and don’t allow games developers to take full advantage of the unique architecture of the GPU. High level API’s suffer from numerous issues – including extremely high overheads compared to coding “to bare metal”. Mantle reduces the levels of abstractions between the code of the game and the hardware, and thus speeds up the performance of the title on the same hardware. To put it another way, games running on AMD’s Mantle API should be faster than if they were running on say OpenGL or DX.
Higher level API’s trade in their performance for something simple – ease of development. To put it simply, there is a wide range of PC hardware out there, and DX and OpenGL have been created to take advantage of a wide range of hardware. In doing so, they make the process of creating a title far easier, but it also means that PC versions of the titles will always perform worse than they should, because the hardware is simply not being used to its full potential.
High Level API’s and Overheads Aren’t a New Problem
Microsoft have been painfully aware of the limitations of DirectX for some time and have taken steps to reduce the problems. Some time ago, Microsoft introduced DX10 to the world in an effort to smooth over the performance pitfalls of the high CPU overhead. DX10 and DX11 have both made efforts to improve the CPU overhead, but it just hasn’t been enough. Right now, a high end GPU can process more draw calls than what the CPU can issue – in other words, the CPU is holding the GPU back.
To clarify, a Draw Call is one of the most important aspects of creating a 3d scene. The CPU issues a command to the GPU of what to draw, and must do soe for each unique item on screen. Think of it this way, in the current generation of Xbox 360 and Playstation 3 titles, there can be between 10,000 to 20,000 pieces of geometry in a single frame of animation. Consider that most games run a target of between 30 and 60FPS, and you can see how the numbers quickly start to add up.
One solution is to reduce the number of Draw Calls from the CPU, but this can lead to other issues – such as creating either less complex scenery or the alternative – reducing the amount of performance of your GPU. From games developers there are legions of threads, blogs and posts out there from developers wanting ideas to reduce the number or optimize the way Draw Calls are handled.
So this is why Mantle exists – AMD boasts Mantle can be up to 9 times as efficient when it comes to Draw Calls as DX11.
PC AMD Mantle and the Xbox One and Playstation 4.
If you’re a gamer, you’ll likely be familiar with the fact consoles do more with their hardware than what PC’s do of a similar spec. To put it another way, a Playstation 4 with it’s 1.84TFLOPS of power will produce better graphics than a PC with a similar spec. There’s a variety of different reasons for this – one of them is because of the architecture of consoles. The Playstation 4 was designed from the ground up to play games, but there are more reasons to it than just that. These include the fact it’s a fixed platform, along with more processes running in the background for a PC due to its far larger Operating System (OS). But – the major reason is that it allows developers to delve much deeper into the hardware – and get much more out of the performance than you would be able to if you were only running a high level API.
High and Low level API’s aren’t anything new on consoles – and both have equally important roles in games development for the systems. A console will have a shelf life of between 5 and 10 years. During this time, we’ve all noticed that the first generation of games in a console looks far “worse” than the last generation. Take titles on the Playstation 3 for example, a notoriously hard console to develop and program for. Due to the nature of the Playstation 3’s CPU (the Cell processor) developers needed to learn how to code to the SPE’s (Synergistic Processor Elements) – think of them as Vector helper processors, capable of SIMD (Single Instruction Multi Data). Developers aren’t born with this knowledge, and so will often start out by creating game titles in higher level API’s.
For some developers, who don’t need full performance out of the machine (for example, indie developers who have far simpler graphics and game engines) higher level API’s will be more than enough. But if you want to get every last bit of detail into a frame, if you want the best possible texture quality, model quality and the like then the only option is to go with a low level API. This will reduce CPU and memory overhead, along with providing the GPU better performance and enabling you to get the most out of the machines unique feature set.
With this in mind – Mantle has to have a two fold option. Low level access (or as low level as is possible in PC hardware anyway) and a higher level access to make things easier for developers to set things up. We of course already have a High Level Shader Language (HLSL) in the form of DirectX 11.2. Indeed AMD’s Mantle can even use the same language as DX11.2 to get developers up to scratch as quickly as possible. Interestingly enough, this is the same language and method that the Xbox One’s API was put together. There’a already rumors floating about that AMD have used the X1’s coding as a very large base for their PC based API.
To clarify though, this doesn’t mean that developers can simply say “well, let’s just code for Mantle then”. There’s multiple issues with that, including that any non GCN card simply would not be able to function, thus developers would eliminate large portions of their potential market.
Developers and their duties in this
In the end, developers must support AMD and their Mantle API technology. DICE have already pledged that in December, they will release a free patch for Battlefield 4 which will provide PC gamers the option to use Mantle in place of DX11.2. There are real, tangible benefits from Mantle – including much better performance, but in the end they need to convince developers to utilize the API or it would have all been for nothing. It’s likely we’ll see cross platform games as the first to support Mantle, and they’ll likely do the best job at using it to its fuller potential. But, to really take off and gain some clout in the PC market place, PC native games would also need to use it.
AMD are able to leverage their clout due to the fact that are so involved with the next generation of consoles (producing the APU’s for both the PS4 and X1). Games developers have for years and years complained about PC platforms being easy to develop for, but not easy to make the most out of. This means that the specs of the PC you need to run the title are higher than they should “need” to be, thus limiting your audience and the devs making less money. Not to mention, making the optimization time it takes on PC development – and the fact that ensuring smooth performance on a variety of hardware is next to impossible.
To program “Direct-to-Metal” developers would need to worry about a variety of different pieces of hardware. Sure, Mantle will help in GCN architectures – but what about older AMD technology. Or for that matter, Nvidia graphics cards, or Intel.
Nvidia could in theory use the Mantle API (as it is Open), but would likely require a lot of work on their part. It’s still too early to know just how successful they would be if they attempted this however.
Mantle and its potential problems
Back in the mid 90’s, there used to be a 3d chipset manufacture by the name of 3DFX. They eventually were bought out by Nvidia (who acquired them and incorporated their Anti-Aliasing and Anstropic Filtering technology, along with SLI, along with other technology). 3DFX always used to be known as the fasted – but part of that reason was their own API, known as Glide. I remember gamers who didn’t own 3DFX cards disliking glide – because it would mean that the Voodoo Chipsets which 3DFX created always got the best performance. Often times, the OpenGL or DX versions of the title would suffer from being poorly optimized too. The Glide rendering path had less bugs, better performance and a lot of titles (such as Quake) performed beautifully on the API.
Switch a Voodoo card out of Glide and make them use OpenGL and much of the performance advantage they enjoyed was quick to start disappearing. One of the reasons 3DFX ‘lost’ the GPU war was because developers became increasingly reluctant to support Glide. There were other issues too of course, such as lack of 32 bit color rendering. The problem is, many would agree that for a non Voodoo owner, Glide wasn’t ‘good’ for PC gaming. Developers and gamers will want to naturally be careful that Mantle doesn’t end up becoming another Glide.
There are still a lot of questions which haven’t been answered by AMD concerning Mantle. I’ve little doubt that this is a great power-play from AMD to start gaining some solid ground in the discrete GPU market. Is Mantle really as close to the Xbox One API as it appears, and if developers do use it – what type of real world benefits will we find? For example – on the same hardware at the same resolution, what type of FPS increase will we see? Will a game go from say 50FPS to 60? 50FPS to 80FPS? We won’t know these answers until AMD’s November Developer Summit, but meanwhile there is certainly a lot of food for thought.