Sign in with
Sign up | Sign in

AMD Mantle: A Graphics API Tested In Depth

AMD Mantle: A Graphics API Tested In Depth
By

AMD's Mantle is available to users of certain Radeon cards, as are the first few titles with corresponding API support. We gathered up a number of CPUs and graphics boards, fired up Battlefield 4 and Thief, and set off on a benchmarking odyssey.

AMD's Mantle API is a polarizing topic in the world of PC gaming. There are many opinions, lots of information, plenty of speculation, and a handful of known facts to sift through. We want to tell the whole story, and we want to do it right. Unfortunately, it's almost impossible to discuss this topic without resorting to industry jargon, so let's start at the very beginning and lay out some definitions, set the stage, identify where we were, and how we got here.

What is an API?

The acronym API stands for application programming interface. The key word here is interface. An API is designed to allow applications to interface, or communicate, with each other.

A great example of this is copy and paste functionality in Windows. When you copy a paragraph of text from your browser to the clipboard, and then paste that text into a word processor, you have applied the power of an API. The developers of your browser included support for the API's request (or call) to copy, while the programmers of the word processor included support for the API's call to paste. Those two programs communicate to each other via the API.

The advantage of an API is that software developers don't have to code specific support for every possible application. If it wasn't for APIs, all of the document editing software in the world would have to contain unique code to interface something like copy and paste functionality with every other document editing software in the world. That model would be impossible to maintain.

The downside? An API is not as efficient as coding specific support for direct communication between software. The price of convenience is increased utilization of hardware and processing resources. 

 OK, what is a graphics API?

Since an API exists to provide a communication interface between applications, a graphics API communicates between an application and a graphics card driver.

The name of the game here is compatibility. Instead of coding a game engine to support multiple paths to interface with specific graphics card drivers, game developers can concentrate on communication with the API instead. The API then calls the graphics driver, which implements its instructions to the graphics card. In this way, graphics APIs can be considered one of the abstraction layers between the OS and hardware.

If the purpose of a graphics API is simplicity and convenience, why is there more than one API?

OpenGL has its roots in SGI's proprietary Iris GL, which was released in the early 1980s. In a surprising move, the company handed it off as an open standard called OpenGL (Open Graphics Library) API. SGI's competitors were given access in exchange for sharing the burden of maintaining and updating the code.

Microsoft even had a seat on the OpenGL Architecture Review Board until 2003, when the company pulled support in favor of its proprietary DirectX API, which is now more prolific. Currently, DirectX is used in Windows and the Xboxes, so it's easy to justify choosing Microsoft's API from the standpoint of a developer who wants to get the most out of their available resources.

Having said that, John Carmack is a famous holdout who we've seen prove that OpenGL can still be used to run high-end PC games (like Rage). In addition, OpenGL is important because it can be used across platforms: Windows, Mac, and Linux. Android, Windows Phone, and the iPhone use OpenGL ES (Open GL for Embedded Systems). As gaming on mobile devices gains prominence, so does OpenGL.

What's wrong with DirectX 11 and OpenGL? Why does the world need another graphics API?

Two standards at odds are bad enough. It seems counter-intuitive to add another. So how do existing APIs fall short of developer expectations?

Both DirectX and OpenGL were created in the previous millennium. It was a time before multi-core CPUs in mainstream devices were possible. Recently, some developers have voiced concerns that they are bloated, prone to instability, and scale poorly (or not at all) on well-threaded platforms. In addition, no API is perfect. Have you ever had to update a graphics driver to get a game to work properly? Every time this happens, the graphics API has failed in its role as an abstraction layer.

On top of this, it was rumored that Microsoft considered halting DirectX development in 2013. In an interview with c't, AMD's Roy Taylor was quoted as saying, "A new DirectX has again and again refreshed the industry, new graphics cards need more processors and more RAM. But there is no DirectX 12 come. That's it. As far as we know, there are no plans for DirectX 12". In addition, a leaked Microsoft email said the cross-platform XNA Game Studio development platform is not in active development, and that DirectX is no longer evolving as a technology. Microsoft later retracted this and claimed it was a miscommunication, but with no published plans for DirectX 12, the developer community was getting antsy.

AMD claims to have been driven to the creation of a new API that would address those issues at the behest of developers disenchanted with the state of DirectX and OpenGL. In addition, because AMD APUs and GPUs drive the Xbox One, PlayStation 4, and many PCs, the company is in a unique position to offer an API that could potentially be leveraged across multiple platforms.

How does Mantle supposedly improve compared to OpenGL and DirectX?

Mantle is associated with the phrases "low-level" and "closer to the metal". But what does that actually mean? In simple terms, the answer is minimalism. It's smaller, simpler, and consequently faster than DirectX 11 and OpenGL. AMD's new API purportedly makes fewer assumptions about how developers want to render a given scene. This puts more control of resources in the developer's hands, instead of the API's, allowing for better optimization.

In this light, Mantle has the potential to be more efficient. In addition, Mantle is able to execute fully-parallel draw submissions in order to divvy up workloads to multiple CPU execution units. If the API is able to effectively utilize more processing resources, slower CPUs with multiple execution units may be less of a bottleneck.

Put simply, AMD claims that Mantle has the potential to increase performance on systems with slower multi-core host processors. Where the CPU is not a bottleneck, Mantle might even lower GPU power consumption.  

AMD claims to be a big supporter of open source. Is Mantle an open source API?

Mantle is not open source, nor does AMD claim that it will ever be open source in the future. The company does say that it will make the Mantle SDK available to anyone by the end of 2014 with no license fee or restrictions once the closed beta program is complete, though.

To clarify, access to the SDK isn't the same as open source. But it does mean that, in theory, Nvidia and Intel could write a Mantle-compatible driver. Realistically, I think this is unlikely. But I'll save my analysis of the situation for our conclusion. The point is, AMD wants to keep control of Mantle to optimize it for the GCN architecture and allow for fast developer adoption of new hardware features, which isn't practical for generic APIs like DirectX and OpenGL.

Alright, I think I have a handle on the basics of Mantle. What now?

Well, we want to put Mantle to the test and see exactly what it can do. While AMD promises that a number of developers are working on Mantle support for upcoming titles like Civilization: Beyond Earth, Star Citizen, and Dragon Age: Inquisition, at the time of writing, there are only three games on the market that currently support AMD's API: Battlefield 4, Thief, and Plants vs. Zombies: Garden Warfare. Since Plants vs. Zombies: Garden Warfare does not have Mantle benchmark functionality available, and it uses the same Frostbite engine that powers Battlefield 4, we'll concentrate on the first two Mantle-enabled titles.

Display 107 Comments.
  • 0 Hide
    Amdlova , July 16, 2014 12:44 AM
    memory problems... so my 260x with 1gb will sufferrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
  • 10 Hide
    Memnarchon , July 16, 2014 1:07 AM
    Mantle is not glide. 3DFX had 85% of the GPU share when they had glide so it was easier for developers to use the glide (AMD has 35% right now).
    But Mantle did something really good for gamers. Till now Microsoft with no competition didn't gave too much attention in performance optimising the DirectX. They gave Microsoft a reason to improve DirectX (so they will bring DX12) in the way mantle works. This benefits all the gamers.
    Unfortunately I have a feeling that Microsoft will give DirectX12 only with Windows9 (due to kernel limitations at their pockets).
    If this will be true then Mantle might have more life than most users expected to (since it wil take time for windows 9 to rule the market share)...
  • -4 Hide
    ZolaIII , July 16, 2014 1:07 AM
    Next Open GL specification is almost redy & will be announced next month in (ironically) Vancouver Canada. Naturally it will be available on all platforms (that want to integrate OGL) & it will be addressing lover overheads. As gaming market is getting more fragmented it's getting natural to develop for api that can run on all platforms.
  • 9 Hide
    tomfreak , July 16, 2014 2:18 AM
    Is the battlefield 4 tested in multi-player?

    [Answer By Cleeve:]

    It was tested in single player, as its easier to get consistent results. We're trying to eliminate variables except the graphics engine as much as possible.
  • -3 Hide
    chaosmassive , July 16, 2014 2:51 AM
    "AMD Mantle: AMD's PhysX "

    please do a research what is Mantle before post
    it seems you don't understand what are you writing about.

    [Answer by Cleeve:]

    I think the problem may be that you don't understand the context of the answer, which does not equate Mantle with PhysX on a technical level.

    We equate Mantle with PhysX in the sense that it's a value-add that assists in a limited number of games. Its not a universal advantage.
  • 0 Hide
    ta152h , July 16, 2014 4:47 AM
    As a programmer of 30 years, that's arguably the worst description of an API I have heard.

    An API is a set of commands, with required parameters, a software package presents to another application that wishes to use its services. It's essentially the language to use the services it provides.

    Mantle isn't just an API. It's an abstraction layer that makes it unnecessary for the developer to write directly to the hardware, which is tedious, time-consuming and extremely difficult to do on a large product. The API is what Mantle accepts to tell it what to do, and what the programmer must learn to use it, but it is NOT all Mantle is. It's just how to talk to it.

    A pure API would be something someone demented would write, because it would mean you could issue commands to do nothing. I'm guessing Apple is patenting this technology now.

    [Answer by Cleeve]

    I'm sorry you feel that way. I don't agree as I feel it's a useful high-level primer for folks who haven't been programming for 30 years, but you're certainly entitled to your opinion. :) 
  • -4 Hide
    elbert , July 16, 2014 4:54 AM
    On page 4 its clear mantle doesn't work well with Intel's Hyper-Threading but what about Intel's 6 core CPU's? Does mantle give an Intel 6 core a bigger advantage in games that dx? I wouldn't throw mantle under the bus just due to its unoptimized for Hyper-Threading. Please add an Intel's 6 core to these tests.
  • 0 Hide
    SteelCity1981 , July 16, 2014 5:55 AM
    I can see intel supporting mantle in its future gpu hardware. I mean just recently intel asked amd for its mantles api specs. So intel using mantle in the future is much more plausible then Nvidia using mantle.
  • 2 Hide
    K-beam , July 16, 2014 6:55 AM
    Mantle can actually become quite relevant in any next-gen ultra-portable x86 APUs that AMD come up with. Especially useful if coupled with proper integration with Steam-OS.
  • 6 Hide
    cypeq , July 16, 2014 7:07 AM
    How I see line graph with 15 positions.



    (Image viewable on Forum here:) 
    http://www.tomshardware.com/forum/id-2221312/amd-mantle-graphics-api-tested-depth.html#13731289
  • 1 Hide
    serendipiti , July 16, 2014 7:10 AM
    Nice analysis.

    Probably there wasn't a DirectX 12 on the works because of maturity (what else add to DirectX that it pays for?) and Mantle showed the way.

    I don't like the comparation to PhysX (because of what has finally become) and the fact that Mantle won´t bring new features to games.

    It is Mantle here to stay, probably, sadly, not. Its success as an universal graphics API is complicated:
    if it was on time for PS4, XBox One (M$...) and Linux / Valve Steam OS and above all: Mobile devices (ARM...), if it could get NVidia involved also, perhaps Mantle would gain enough momentum to become an accepted universal standard.

    The other battle field is on the developer front: get major 3D Engines to support a Mantle code path (and what are the costs related to maintaining that code path from a developer standpoint).

    ta512, as deep as a naming convention discussion can go, what AMD is doing is an API which implements a Hardware Abstraction Layer for the graphics cards of any hardware vendor (AMD, NVidia, Intel). What have tested here is the AMD own implementation of that API made to run on AMD hardware.

    What is open source is the API, not the AMD own implementation.

    This Is like discussing if ARM it is a processor or an instruction set... and what / where the difference is.

    In a case scenario where you have BattleField 4 running on an i7 with an NVidia card with a Mantle enabled driver (let's suppose Nvidia gets on the Mantle train) the only thing AMD would have done would be decide how the game will talk to the graphics card, but neither the game, the driver, the graphics card, none of these would be AMD's work,,,

    Cheers
  • 4 Hide
    cleeve , July 16, 2014 7:12 AM
    Quote:
    How I see line graph with 15 positions.


    Urmehghurd, I LOLed. Nice one.

    Yeah, this is a little ugly. Note that I made the mantle results thicker so it'd be slightly easier to pick out the Mantle trends, but yeah. Would be a little easier to pinpoint specific cards with less data.
  • 0 Hide
    guskline , July 16, 2014 7:19 AM
    Very interesting article. I have a Sapphire R9 290 Tri-X in my FX8350 rig and BF4 has slightly faster fps in Mantle than in DirectX
  • 3 Hide
    Alethinos , July 16, 2014 7:21 AM
    Is it just me, or is that last Frame Time Variance graph on the 8th page labeled wrong? I wouldn't think frame time variance would be displayed in frames per second, and if it was, the majority of the items on the chart would (hopefully) not be between 0-10 if "higher is better".

    Maybe I misunderstand what the chart is trying to show.

    [Answer by Cleeve:]

    Doh! You're quite right, I'll get that fixed.
  • 1 Hide
    ddpruitt , July 16, 2014 7:25 AM
    I think Tom's doesn't really understand the difference between the OS API and a regular API. The entire first page muddies the discussion. Mantle isn't an API it's the low level driver behind the API, and that can be made as lean or as bloated as possible with no changes to the API itself. As an example Android uses the Java API but it's a completely different implementation than what you would see on an EA game.

    I'm also concerned that Battlefield was used as a benchmark. Although I understand that the available benches are limited by those that support Mantle Battlefield is notoriously difficult to get consistent results with, I would consider the differences well within experimental error and therefore unreliable.
  • 3 Hide
    Onus , July 16, 2014 7:30 AM
    Quote:
    Alright, I think I have a handle on the basics of Mantle. What now?

    For the sake of professional image, please remember that Alright is Alwrong. All right?
    [/nazi]
    To the meat of the article, it does look like Mantle will help some of AMD's weaker CPUs some of the time, but if that isn't what you have, Mantle does not make a large enough difference to influence buying decisions (sort of like PhysX; in only a few cases does it really matter). If your system is one of those cases, it is a pretty substantial difference, but for many people it won't be.

  • 1 Hide
    cleeve , July 16, 2014 7:34 AM
    Quote:
    I think Tom's doesn't really understand the difference between the OS API and a regular API. The entire first page muddies the discussion. Mantle isn't an API it's the low level driver behind the API


    I'm not sure I read you here. There's a Mantle API and a Mantle driver, these are separate entities.

    I've been at briefings and talked to developers, and it's been made very clear that Mantle is a graphics API, which requires a Mantle-compatible driver to work with specific hardware.

    Quote:
    I'm also concerned that Battlefield was used as a benchmark. Although I understand that the available benches are limited by those that support Mantle Battlefield is notoriously difficult to get consistent results with, I would consider the differences well within experimental error and therefore unreliable.


    I'll have to disagree on this one. We have a BF4 test run that has been extremely reliable and repeatable for us, usually with less than 1.5 FPS difference in three runs.

    When there's an issue found in data, it's easy to assume its the test. Sometimes it's what you're testing, though. We can't ignore issues out of convenience.

  • 3 Hide
    Yuka , July 16, 2014 7:53 AM
    You guys need to test MP... I know its hard and blah blah, but you can just add error margin to results and just describe the differences if you guys notice any.

    You guys are testing a grippy car in just a drag race. That's unfair. You need to add cornering as well.

    Cheers!
Display more comments
React To This Article