AMD's Mantle API: how it works and why PC developers will adopt it | PCGamesN

The 10 best World War 2 PC games

Enforcer: Police Crime Action is a full-blooded police simulator. Yet it’s hilarious

Assassin’s Creed Unity trailer shows off Nvidia Gameworks enhancements

Battlefield 4

AMD's Mantle API: how it works and why PC developers will adopt it

A red and black AMD Radeon video card against a white field.

Look, this is just a video card. It's tangentially related to Mantle. So imagine this card high-fiving with its API buddy.

Since the fall, we’ve heard some eyebrow-raising claims about Mantle, AMD’s new API (application programming interface). The numbers being tossed around in terms of performance-gain seem almost hard to believe, with Battlefield 4 running up to 45% faster via Mantle over DirectX.

It seems too good to be true, so we talked with AMD’s Robert Hallock. He explained how AMD have been able to achieve these kind of results with their API, and why he thinks it has such a strong case for being adopted as a standard. If he’s right, Mantle could spell huge changes for how games are made, and what kind of performance PC gamers can expect from their own machines.

Right now, when you are playing a modern PC game, DirectX is working behind the scenes to coordinate your game and the PC hardware running it, especially your graphics card and CPU.

“When you put an object on the screen for the player, that is a draw call,” Hallock explains. “That GPU talks to the CPU and says, ‘Hey, this thing has to go on screen.’ Current APIs are very limited in the number of calls they can make per frame. Each frame requires several thousand draw calls. Now, in a best case scenario, today’s APIs get you three to five thousand draw calls. That’s how many objects appear on screen.

“Mantle kicks that limit up to 80 thousand or 90 thousand. That is an absolutely massive increase in the number of objects the GPU can handle. Of course, when you increase that limit, that doesn’t mean devs are going to put more objects on screen. But they can improve the performance of draw calls that they are making.”

There are two major factors behind that increase. The first is that DirectX (and OpenGL) have their roots in an era when multi-core processors weren’t even on anyone’s radar. As a result, Hallock says, they don’t have the best approach to multithreading. Though there’s more performance to be had, “there’s a point where the [current] APIs are unable to satisfy the requests.” Mantle was built with the modern hardware environment in mind.

The second factor is Mantle’s own programming language. “[These performance gains] are a result of the the lower API overhead. At a fundamental level, Mantle’s code is executed in a language that’s much similar to the way our GPU architectures natively speak. Every architecture has its own native dialect of graphics core architecture.”

Hallock continues, “Reducing that overhead improves performance, allows you to do more, eliminates hardware downtime. We could alleviate or address those instances and allow the GPU to work faster and more efficiently.”

While Mantle offers tremendous gains in theory, they don’t mean anything unless it gets adopted by developers who have many, many years of history, experience, and fluency in DirectX. Hallock understands this, and knows Mantle is not a guaranteed success by any means.

A Battlefield 4 screenshot.

“No doubt that adoption is Mantle’s biggest hurdle. Our biggest hope is that Mantle becomes adopted as an industry standard, or the fact that it exists and presents an observably better model — that provides inspiration for new products. So either we become the standard and benefit the industry, or something like Mantle becomes the standard, and either way, PC gamers benefit,” he says.

But he thinks AMD have a good case for being adopted. For one thing, Mantle was built partially in response to developer needs and requests. DICE in particular, Hallock says, wanted to have an API for PC development that was as efficient as the stuff they were working with on consoles.

Because if you think about it, it’s kind of amazing that consoles work at all, isn’t it? As a collection of hardware components, the Xbox 360 was never all that impressive and it should have been obsolete years ago. Yet it was able to keep running the same games as a PC (albeit with increasingly dubious performance as the years went on).

“They have a fixed hardware platform, so you have one set of hardware that can be found on every model of that console,” Hallock points out. “That lets a game developer, like Mantle, to go very close to the GPU and write code that is very close to what the GPU is expecting. So you can extract a lot of performance out of the console because of that environment. And that is something you couldn’t do on PCs until Mantle because every PC is different.”

Now here’s something Hallock didn’t get into, but is almost certainly going to be a major factor behind adoption of Mantle: AMD’s hardware is already inside both the major next-gen consoles. That fixed hardware environment on PS4 and Xbox One is an AMD environment, so it’s not hard to see how suddenly working with an AMD API could suddenly be very appealing.

Hallock admitted, “The clever thing about Mantle is that it’s very similar to the types of code these game developers are already creating for consoles, so the process of porting is quite simple for them.”

That’s crucial, because we all saw with the PS3 and cell processing what happens when developers have to work with an unfamiliar and unusual architecture. DirectX isn’t just familiar, it was also designed to speak a language close to what programmers already knew and used. Mantle will have to become a similarly comfortable environment to succeed, and since it is speaking a language closer to what the GPU uses, it may not be as easy as DirectX is. Those problems go away, however, if developers are working with Mantle so much that they become fluent in it.

The nice thing about Mantle is it doesn’t rip-up their current work. Hallock explains, “We’ve designed Mantle to be compatible with DirectX Hight Level Shader Language. So that DirectX code that people are already writing is already compatible with Mantle. I would never dare claim that DirectX is going away. It’s not something that we hope to replace. It’s an important, powerful, great API.”

Mantle is still making its way to market as AMD continue developing it and opening it to developers. But people running AMD cards can get a taste of what Mantle can do later this month, when Battlefield 4 updates with Mantle support. It will be an interesting first test of what Mantle can really offer players.

“I see two big things going for Mantle, “Hallocks says. “If anything else, these two things will drive adoption. One, game developers really, really like Mantle. All the game developers currently using Mantle have come to us have come to us to request it. They are excited about using it. And point number two is that gamers will see the performance benefits and really, really want to get their hands on it. And that addresses both sides of the game development continuum. ‘Push-in’ from the game developers and ‘pull-out’ from the consumer side.”

Login or Register
2
+2
-0
ThePoark's picture
14

So, is Mantle proprietary AMD tech that won't be open to nVidia users? What is AMD's angle? Are they really trying to benefit the industry, or just trying to pigeonhole people into buying AMD cards? I don't know that segmenting the PC gaming community, further than it already is, is best for the industry. (I'm not being crass; I'm genuinely wondering how open and compatible this tech will be for third-parties.)

2
+2
-0
avatar
5

While I am not sure if there has been any new revelations on this front, when Mantle was announced it was reported that it was open. Nvidia and Intel can support the API if they choose to. The API itself is still an abstraction, there is no technical reason Nvidia can't support it, it just depends on AMD allowing them to and rumor is they are allowing it. Honestly if Mantle truly does provide the performance increase AMD claims, Nvidia wont have much choice. They will have to support it to remain competitive.

1
+1
-0
primal's picture
1

it is open to everyone but because it only supports AMD's GCN architecture atm it doesnt work on anything else. I would imagine if nvidia started using it theyd adopt it for there Maxwell architecture and beyond. So nvidia would need to add its own code for the maxwell architecture to get the most out of it. It would make sense for them to add kepler architecture to

1
+1
-0
avatar
3

Mantle is a low level API, not a bare metal API. The magic dosent happen at such a low level that NV or Intel can't tie into it fairly easily. Of course Mantle will have bits that take advantage of AMD's hardware such as hUMA.

Nvidia need to make their own drivers to tie into the Mantle API and take advantage of it. NV can gain the same low level access and freedom from IPC and dedicated GPU threads. Hell NV could do whatever they want with it. NV cards have cuda cores that can be divied up the same way as AMD's compute cores.

NV is the only company at fault if they don't jump on the Mantle bandwagon. If I was in charge of NV I would have traded tech for AMD's help in making mantle for NV ASAP instead of sitting on the fence while AMD gains a huge lead in mantle.

If AMD get a few more engines and developers NV is really going to be in panic mode since it has put in zero work in adopting Mantle. I can only hope deep in NV skunkworks it has some people writing a mantle driver.

1
+1
-0
Windows 98®'s picture
1

I'm sure someone has already told you, but mantle is open source. No idea can use it if they want

-1
+1
-2
tonez82's picture
2

Do you not realize that Nvidia's PhysX is proprietary? Nvidia pays game developers to use their proprietary extensions. If anything it seems like Nvidia is trying to hurt the industry. Why don't you know this? Are you really a gamer or just an ignorant lamer?

I'll go with your lame

1
+1
-0
Shriven's picture
1661

I dont trust AMD. This is DirectX 2.

-1
+1
-2
tonez82's picture
2

Good, keep overspending on Intel & Nvidia parts.... they love ignorant shoppers!!!

Alienware - Game VictoriousNvidia Shield - Titanfall
The Trial of Battlefield 4

Battlefield 4

The Trial of Battlefield 4

DICE open up Battlefield 4 PC test servers to premium console players

DICE open up Battlefield 4 PC test servers to premium console players

Judge dismisses securities fraud suit against EA; executives were just being optimistic

Judge dismisses securities fraud suit against EA; executives were just being optimistic

Battlefield 4: Final Stand now available on Community Test Environment

Battlefield 4: Final Stand now available on Community Test Environment

DICE:

DICE: "we lost player trust" because of Battlefield 4 launch

The big, fat Battlefield 4 Premium Edition is only a fortnight away

The big, fat Battlefield 4 Premium Edition is only a fortnight away

Some things Battlefield 4 has taught me about war

Battlefield 4

Some things Battlefield 4 has taught me about war

Before the Fall Patch: long-awaited Battlefield 4 fixes due today on Origin

Before the Fall Patch: long-awaited Battlefield 4 fixes due today on Origin

Battlefield 4

Battlefield 4 "Autumn Patch" sheds all the bugs; further improves netcode

Battlefield 4: Final Stand evokes memories of Battlefield 2142

Battlefield 4: Final Stand evokes memories of Battlefield 2142

Battlefield 4's September patch to emulate Battlefield 3's soldier movement

Battlefield 4's September patch to emulate Battlefield 3's soldier movement

War is cheap in Battlefield 4: it's free for a week and on sale

War is cheap in Battlefield 4: it's free for a week and on sale

The Battlefield 4 launch is just another high profile cock up

Battlefield 4

The Battlefield 4 launch is just another high profile cock up

EA hire eBay exec as their new CTO to help improve their games

EA hire eBay exec as their new CTO to help improve their games "as live services"

Watch 30 seconds of Battlefield 4: Dragon's Teeth before its Premium launch tomorrow

Watch 30 seconds of Battlefield 4: Dragon's Teeth before its Premium launch tomorrow

Battlefield 4: Dragon's Teeth is definitely coming out on July 15th; no take backs this time

Battlefield 4: Dragon's Teeth is definitely coming out on July 15th; no take backs this time

Battlefield 4 PC patch sees off Battle Pickup exploit, debugs Commander mode on mobile

Battlefield 4 PC patch sees off Battle Pickup exploit, debugs Commander mode on mobile

DICE celebrated Independence Day with an explosive Battlefield 4 easter egg

DICE celebrated Independence Day with an explosive Battlefield 4 easter egg

Battlefield 4: Everything We Know

Battlefield 4

Battlefield 4: Everything We Know

Battlefield 4: Dragon's Teeth due out on July 15th according to EA Origin Twitter account gaffe

Battlefield 4: Dragon's Teeth due out on July 15th according to EA Origin Twitter account gaffe

Battlefield 4 patch will put an end to adamantium shield

Battlefield 4 patch will put an end to adamantium shield

EA admits incorrect PunkBuster bans on innocent Battlefield players

EA admits incorrect PunkBuster bans on innocent Battlefield players

Battlefield 4: Dragon's Teeth adds a floating restaurant and a vanishing lake

Battlefield 4: Dragon's Teeth adds a floating restaurant and a vanishing lake

Battlefield 4's launch was a disaster because it was ambitious, says EA boss

Battlefield 4's launch was a disaster because it was ambitious, says EA boss