AMD’s GPU14 public presentation had one big surprise at the end called Mantle, and it will change gaming. Mantle is one of those shots across the bow of the industry, the biggest industry upheaval in a decade.
Mantle is easiest to describe as a graphics API similar to OpenGL or DirectX but without the overhead. Both OGL and DX have evolved as a hardware abstraction to make life easier for programmers. As you might expect the easier something is, the more that is done for you under the hood. This usually means a lot of overhead that a programmer doesn’t see or need to see, it should just work and in most cases it just does. The down side of this ease is the overhead it imposes on the hardware and the flexibility you lose by being forced to essentially use only what is offered in the form presented.
DirectX is Windows only and that means you have all the Windows overhead and layers and layers of cruft that date back to the 1980s to parse every time something happens. To call Windows a bloated pig is being overly kind, it quite simply forces so much overhead on a user that Microsoft can’t be competitive in the mobile space. On a full size PC this overhead still exists but is minimized by brute force and throwing hardware at the problem. For things other than games or mobile this approach works just fine, but game performance suffers as a result.
There is a reason a 7+ year old console can do the things it does while a PC with better hardware struggles to do the same job, overhead. Console programmers can and often do write directly to the hardware to get the speed they do out of ancient transistors. DirectX and OpenGL don’t allow this and Windows in particular really hides the hardware from the user for “security” reasons. Please note that I do see the irony in that statement. Windows hides the stuff game devs need to use to get more performance and extracts a performance toll to do so.
The up side to this abstraction is that one can write to the APIs and know it will work on any underlying hardware that gets the Microsoft Seal of Fealty. Once again that is the theory, we won’t point out things like Windows 95->98, 98->2000, XP->Vista, 7->8, or any of the others that broke damn near everything. One problem is that if you write to DirectX you are stuck on Windows. The API is about as portable as a medium-sized skyscraper, plus Microsoft’s lawyers will sue you in to oblivion if you even try to use a little red wagon to help you along.
In summary the existing solutions are easy to use but slow, inflexible, and in DirectX’s case, completely not portable. With the rise of middleware and fully license-able game engines like Unreal Engine it is almost always cheaper and easier to buy a better low-level solution to your needs than it is to make it yourself. All the parts that were abstracted away by DirectX and OpenGL are done by extremely optimized middleware and engines, they do better than you can possibly hope to do for less money and time.
The current state of the industry means that DirectX and OpenGL bring you more or less nothing but overhead and lock in with DirectX. So why bother? There is no other choice really, if you are on Windows or XBox you have to use DirectX, Microsoft has hamstrung OpenGL to prevent portability. Playstation, Wii, and everything mobile are all OpenGL, something that has overhead but is only really portable to non-Microsoft platforms. If you want low overhead for performance and flexibility there is no option.
OK, there was no option until AMD and Dice announced Mantle at GPU 14 last week. Mantle is a low-level API that Dice is using for the Frostbite 3 engine that will debut in Battlefield 4. There were two slides presented publicly about Mantle with only a few tidbits in them. Luckily there was more than enough to get a feel for the tectonic changes this will bring to the industry. Take a look.
The first layer of mantle is thin
Note that the first slide describes Mantle as a lightweight API that is compatible with HLSL, the High Level Shader Language that DirectX currently uses. This means the hand-coded shaders that essentially run on the GPU itself will still work with Mantle, not a surprise considering they are effectively on the drivers and/or hardware directly. This is a big deal because all the hand-optimized loops that have been poured over for years should just work, asking devs to recode the hard stuff is something between an uphill battle and a losing proposition.
The next Mantle layer is powerful
This slide is much more interesting. If you had been thinking that the overhead that we were harping on about earlier is not a big deal, Mantle allowing 9x the draw calls of OpenGL and DirectX is anything but trivial. GPUs have been advancing at <50% a year lately, how many generations would it take to get 9x anything? CPUs are the bottleneck here though and they are below 20% generational gains of late as well. 9x is something between astounding and impossible. Overhead concerns? Nope.
The next bullet point is about allowing the dev to have direct access to all of the GPU features aka getting around the blocks Microsoft put in place. This will allow the engine and middleware guys to bang directly on the metal for PCs like they do on consoles. More importantly they can come up with new and exciting hacks that they were prevented from doing with DirectX. Direct access and no handcuffs? Check and check.
Last is probably the most important, portability. If you write for Mantle, anything that has a Mantle driver should run it. In theory. At the moment the PS4, XBox One, and any recent AMD GPU on a PC should be compatible with each other on the GPU programming side. If nothing else it should make the ports to and from a console much easier for the coding elves all over the world. Portability? Check…. with some really big catches.
Ignoring those for a bit it looks like Mantle delivers on every game dev’s wish list. It is fast, flexible, portable, and doesn’t get in the way. What more could they ask for? Actual support for one, right now Mantle is in a very early stage and is a product of Dice and AMD. Mantle lacks a lot but it is described as growing and active so expect changes and additions. Once it is more fully fledged, SemiAccurate expects it to be handed over to a governing body much like HSA or OpenGL, and we would be pretty shocked if others didn’t jump on board sooner rather than later. Stay tuned this one will go places.
That brings us back to the portability issues. The PS4, XBox One, and any PC with a recent AMD GPU in it be it APU or discrete part are low hanging fruit, they are all almost the same hardware. x86 CPUs are the same by definition so Intel CPUs should be a fairly easy port even if they lose out on the goodness of the APU’s GPU/CPU tie in. That leaves two thorny points, the catches mentioned above. Those would be Nvidia and Microsoft, specifically Microsoft on the XBox One side.
Both of these companies are known for their over the top efforts to break portability, compatibility, and enforce user lock in through whatever means necessary. The fact that Mantle is exactly what devs want, is a really good thing for users, and solves most of the largest problems for game companies is a minor secondary concern compared to market protection. Both would rather pull teeth than support something like this, it goes against their every instinct. That said, both will likely have to support it whether they want to or not. Why?
Latest posts by Charlie Demerjian (see all)
- ARM enters the radio IP market with Cordio - Oct 26, 2016
- Nintendo NX/Switch uses Tegra like SemiAccurate said - Oct 24, 2016
- Qualcomm fills in the midrange with Snapdragon 653, 626, and 427 - Oct 24, 2016
- Alibaba and AMD collaborate on GPUs in the cloud - Oct 14, 2016
- The PC market freefall continues, here is how to fix it - Oct 14, 2016