Saturday 5 April 2014

Mantle


AMD, a company formed by a couple of people and $100k. A company currently in dire straights, a predicament caused by the first CEO Sanders, which AMD never recovered from[2].

So Mantle, from AMD, why am I intrigued by Mantle?
Ever since its introduction into the PC market, I have been a great fan of openGL. Then came Direct 3D which was, to put it mildly, rubbish. D3D has since risen up to be a challenger to openGL. A key advantage of D3D over openGL is the quick implementation of new graphics technology. Comparably, it takes a little longer for openGL as it has to be reviewed by the consortium before a new version of openGL has them(if at all). However I have always liked openGL since it offers speed advantages over D3D thanks to it offering more low level operations in the API -but that isn't saying openGL is a low level API, it is a high level API. openGL is also cross-platform unlike DirectX which is restricted to Microsoft technology-for the moment.

D3D also suffers here because it has to make more cpu calls which increases latency. Although I am building a 3D game engine for windows phone at the moment, I will switch to openGL ES and develop for Android which has a significantly larger market but crucially it uses a technology I have always loved -openGL. If there is any value to be had, I would get that from the Android market by developing on technology I enjoy, and having a significantly larger market to target. So how does Mantle fit and why I like it?


Mantle is not a revolution, but it offers more low-level API functionality that allows bypassing the CPU and executing instructions directly to GPU which, AMD claims, significantly reduces latency, "by up to 9x"[1]. It is giving me more of the things I liked about openGL and it should allow faster rendering at lower system specs. There is very little information about it, more has been revealed at GDC, and virtually nothing on the AMD website other than a password protected screen and the reference below:[5]. I also like Mantle because it has already proven itself to work well in the Thief game and also Battlefield 4. In Thief as seen in source[3] Mantle out performs D3D on the AMD CPU's but on Intel CPU the figures are the same. This is especially interesting because Intel cpu in this comparison is better so Direct3D's overhead doesn't 'appear' to be a problem. Why this is interesting is that under Mantle, the frame rate pulls on par with the better Intel which highlights the D3D overhead in my opinion.

Microsoft isn't taking this disruption sitting down of course with the announcement of DirectX 12 that claims to provide performance similar to Mantle. The problem here is DirectX 12 isn't projected to have Games for it until 2015 and then there's the con for AMD's Mantle; it needs AMD's hardware even though it is available now[1].

But it doesn't end there because AMD's offering continues to impress me especially in a piece of technology very dear to me, audio. I remember the time when I was writing Intel assembly to probe the Creative labs SB16 DSP to program its opl3 chip in order to produce an instrument bank and thus play midi files. The low level optimizations to reduce those instructions and still achieve results, the "compilers, eat your heart out" moments. Today it is initialise something, send file name, play, and if there is a problem with it, deal with it by pretending it doesn't exist (ouch!). When hope for game audio was diminishing we get Mantle and TrueAudio[4], [6] .."Then Windows Vista shipped, moved a great deal of audio processing into the software stack, and 3D positional audio mostly went away. AMD wants to bring it back and open the door for a wider range of audio engines, effects, and capabilities."[4] Is this love?

So how good is it? "But advancements in game audio have been more sporadic and less widely adopted."[6] -Agreed! and "More voice channels and audio objects mean game developers no longer have the unenviable task of determining which sounds are expendable"[6] -YES! about time. My favorite that reminds me of the days of programming the opl3 chip "Programmable sound effects bring to audio the same kind of flexibility that programmable shaders brought to graphics."[6].

There is a sad side to this story however. As mentioned earlier, AMD is struggling[2] but then we have Microsoft who will not want Mantle and TrueAudio to move into its piece of the market. Android phones and IOS use openGL so what does it mean for Mantle there? If we go back to D3D Vs openGL the early days, Microsoft had struggled to fight the mammoth that was openGL in the graphics environment and their D3D offering was pretty rubbish in comparison with a host of issues with its DirectDraw, but today D3D has taken over on Microsoft only platforms.

There is hope for Mantle yet and given what it is promising, I already like it. I have never been a fan of AMD but after this announcement, AMD is my new friend. For me at the moment, I will continue to build my 3D engine on D3D quite simply because I have come too far to abandon it. However once I have a game on the market from it, it is time to migrate as a low windows phone market share at the moment doesn't feel like it will add any value for me at this stage. It will be time to support the Android platform while very closely watching how Mantle fairs off. I wish AMD all the best for Mantle and TrueAudio and may it "live long and prosper".

References:
[1]http://www.pcworld.com/article/2109596/directx-12-vs-mantle-comparing-pc-gamings-software-supercharged-future.html
[2]http://arstechnica.com/business/2013/04/the-rise-and-fall-of-amd-how-an-underdog-stuck-it-to-intel/
[3]http://www.extremetech.com/extreme/178725-amds-mantle-brings-23-performance-boost-to-thief-trueaudio-impresses
[4]http://www.extremetech.com/extreme/178725-amds-mantle-brings-23-performance-boost-to-thief-trueaudio-impresses/2
[5]http://www.amd.com/en-us/innovations/software-technologies/mantle#overview
[6]http://www.amd.com/en-us/innovations/software-technologies/trueaudio

No comments :

Post a Comment