To help us provide you with free impartial advice, we may earn a commission if you buy through links on our site. Learn more

AMD Mantle – How the new API gets more from your graphics card

AMD's Mantle could mark a huge shift in how games are programmed for the PC

AMD is no stranger to computer graphics, but this year the company is pushing software as much as the hardware it runs on. Mantle is a new graphics graphics application programming interface (API) which promises to let games use processors and graphics cards more efficiently, meaning more frames per second for gamers and an easier job for programmers.

But how exactly does Mantle work, and does it have what it takes to revolutionise PC gaming? We’ve taken a close look at the technology to find out.

APIs EXPLAINED

Currently there are two main graphics APIs; Direct3D and OpenGL. They are both known as “high level” APIs, in that they use layers of hardware abstraction to work across a large selection of devices. Hardware abstraction is essentially a set of software routines that emulate device-specific features, giving programs access to hardware resources even though they weren’t written explicitly for them.

However, because high-level APIs only speak to hardware through multiple layers of hardware abstraction, they come with a performance penalty. For games and graphics cards, this manifests itself as the number of individual draw calls the application sends to the GPU to render an object. A single frame could be made up of over 100 draw calls, which each takes time to submit. The number of draw calls a high-end graphics card is able to process is much higher than the number a processor can submit, even if the CPU is also a top-end part.

Mantle is the opposite; it is a “low-level” API that is written for specific hardware, namely AMD graphics cards using the Graphics Core Next architecture. Because the program knows what commands the GPU will recognise, it bypasses the need for extra code, drivers or programming between software and hardware. This helps to eliminate processor bottlenecks, gives direct access to GPU memory, and speeds up draw calls by as much as 9 times per second compared to a traditional API like Direct3D.

THE CONSOLE CONNECTION

Low-level graphics APIs are nothing new, but are more commonly used in games consoles where the internal hardware is a constant. With PCs, there are hundreds of possible combinations of processors, graphics cards and other hardware, as well as variations with operating systems and other software drivers, meaning low-level APIs have been restricted to specific applications or games explicitly coded for certain devices.

Mantle has a shot at success where other projects have stalled, however, because AMD is in the excellent position of having its graphics hardware in both major next-generation games consoles. The PS4 and Xbox One both use Graphics Core Next architecture, for which AMD has already created low-level APIs for developers to use. To be able to port code directly to the PC would make releasing cross-platform titles far more straightforward, and according to AMD this is something developers have been asking for.

Although AMD denies Mantle is an exact duplicate of the low-level API used by Microsoft in the Xbox One, it is undoubtedly similar; if developers can get their titles onto the PC quickly and with minimal extra effort, it could finally put an end to shoddy PC ports.

PERFORMANCE POTENTIAL

In practice, Mantle can have startling results. Currently the only Mantle-compatible game commercially available is EA’s Battlefield 4, but this gives a good indication of what to expect if other developers begin to support it. With a top-end Radeon R9 290X, Battlefield 4 sees a massive 40% improvement in frame rates when paired with a processor that would otherwise not be able to provide enough draw calls per second to the GPU.

AMD Mantle Graph

There are fewer benefits when the same GPU is paired with a more powerful processor. An Intel Core i7-4670K is significantly faster than AMD’s A10 7700K and therefore able to deliver more draw calls per second, mitigating the effects of the Mantle API. There are still benefits over Direct3D, although they aren’t quite as impressive. Arguably not many people are going to pair a graphics card which costs £420 with a mid-range CPU, either, so it’s good to see mid-range cards like the Radeon R9 270 and R7 260x receive modest gains of between 5 and 10%.

AMD Mantle Graph 2

Mantle isn’t a magic bullet, though. Depending on your graphics card and processor, you could actually see a reduction in performance: on our Intel Core i5-2500k and a Radeon HD 7850, Battlefield 4 frame rates dropped by as much as 30%. This is because AMD has yet to optimise the drivers to support specific cards, so until it does, Mantle is very much a work in progress that will only benefit certain hardware.

THE NAME OF THE GAME

So far, only a handful of major developers have pledged to support Mantle. EA was the first, having integrated the API into its Frostbite 3 engine for Battlefield 4, but Square-Enix, Rebellion Developments and Chris Roberts are also on board with Thief, Sniper Elite 3 and Star Citizen respectively. EA’s upcoming Plants vs Zombies: Garden Warfare uses the same game engine as Battlefield 4, so will include Mantle support “out of the box”.

Battlefield 4

If you want to see Mantle in action today, Battlefield 4 is your best bet

Oxide Games is also developing a game engine, currently known as Nitrous, specifically for Mantle. The first Nitrous-powered program is Star Swarm, a free to play demo available through Steam which shows exactly what Mantle is capable of. As long as you have a compatible graphics card, performance gains vary from 5% to as much as 40% versus Direct3D.

A further 15 titles are reportedly in development, although the companies behind them have yet to come forward – perhaps we’ll hear more in June, when the E3 games show begins.

THE ROAD TO SUCCESS

Mantle is exciting for gamers (free extra performance) and developers (easier to code for), but it is by no means a guaranteed success. Most importantly it needs developer support, as if no-one is using Mantle it will fall by the wayside – after all, when was the last time you played a game with Sound Blaster X-Fi support? Hopefully the fact that it will make developers’ lives easier will give it some early traction, although we’ll have to wait for the next set of Mantle-ready games to arrive to see whether other companies sit up and take notice.

To officially be an API, AMD will have to make the specification public. At the time of writing it has yet to do so, but if the company wants Mantle to succeed it will eventually have to open it up to the competition; namely Intel and nVidia. It will also have to make it cross-platform in order to work with Valve’s SteamOS, which runs on a customised version of Linux rather than Windows.

Read more

In-Depth