• What
    is this?
    You've landed on the AMD Portal on AnandTech. This section is sponsored by AMD. It features a collection of all of our independent AMD content, as well as Tweets & News from AMD directly. AMD will also be running a couple of huge giveaways here so check back for those.

With the announcement of DirectX 12 features like low-level programming, it appears we're having a revival of the DirectX vs. OpenGL debates—and we can toss AMD's Mantle into the mix in place of Glide (RIP 3dfx). I was around back in the days of the flame wars between OGL and DX1/2/3 devotees, with id Software's John Carmack and others weighing in on behalf of OGL at the time. As Microsoft continued to add features to DX, and with a healthy dose of marketing muscle, the subject mostly faded away after a few years. Today, the vast majority of Windows games run on DirectX, but with mobile platforms predominantly using variants of OpenGL (i.e. smartphones and tablets use a subset called OpenGL ES—the ES being for "Embedded Systems") we're seeing a bit of a resurgence in OGL use. There's also the increasing support of Linux and OS X, making a cross-platform grapics API even more desirable.

At the Game Developers Conference 2014, in a panel including NVIDIA's Cass Everitt and John McDonald, AMD's Graham Sellers, and Intel's Tim Foley, explanations and demonstrations were given suggesting OpenGL could unlock as much as a 7X to 15X improvement in performance. Even without fine tuning, they note that in general OpenGL code is around 1.3X faster than DirectX. It almost makes you wonder why we ever settled for DirectX in the first place—particularly considering many developers felt DirectX code was always a bit more complex than OpenGL code. (Short summary: DX was able to push new features into the API and get them working faster than OpenGL in the DX8/9/10/11 days.) Anyway, if you have an interest in graphics programming (or happen to be a game developer), you can find a full set of 130 slides from the presentation on NVIDIA's blog. Not surprisingly, Valve is also promoting OpenGL in various ways; the same link also has a video from a couple weeks back at Steam Dev Days covering the same topic.

The key to unlocking improved performance appears to be pretty straightforward: reducing driver overhead and increasing the number of draw calls. These are both items targeted by AMD's Mantle API, and presumably the low level DX12 API as well. I suspect the "7-15X improved performance" is going to be far more than we'll see in most real-world situations (i.e. games), but even a 50-100% performance improvement would be huge. Many of the mainstream laptops I test can hit 30-40 FPS at high quality 1080p settings, but there are periodic dips into the low 20s or maybe even the teens. Double the frame rates and everything becomes substantially smoother.

I won't pretend to have a definitive answer on which API is "best", but just like being locked into a single hardware platform or OS can lead to stagnation, I think it's always good to have alternatives. Obviously there's a lot going on with developing game engines, and sometimes slower code that's easier to use/understand is preferable to fast/difficult code. There's also far more to making a "good" game than graphics, which is a topic unto itself. Regardless, code for some of the testing scenarios provided by John McDonald is available on Github if you're interested in checking it out. It should work on Windows and Linux but may require some additional work to get it running on OS X for now.

Source: NVIDIA Blog - GDC 2014



View All Comments

  • dakishimesan - Monday, March 24, 2014 - link

    My first card was the RIVA 128ZX, the higher clock version that had more memory (8MB!) Love that card and playing Moto GT racer for the first time. Reply
  • JarredWalton - Monday, March 24, 2014 - link

    I hail back to the glory days of ISA cards, sadly. My first PC I think had something like the earliest Cirrus Logic controllers -- capable of an astounding 640x480 256-colors! SVGA FTW. I did manage to scape together the funds in high school to buy an S3 911 I think. Then around 95 things changed radically and I was able to stop running DOS on top of Windows and start booting straight to Windows 95. Hard to believe all current high school students were born after Win95 launched. LOL Reply
  • gobaers - Monday, March 24, 2014 - link

    I wonder what type of video board my very first computer had. It was a Hyundai AT clone running at 9MHz in 'Turbo' mode, paired with an EGA monitor instead of the CGA that everyone else had.

    I didn't start tinkering with the insides of my machine until the next one, a 386SX-25. The day I bought and installed a SoundBlaster Pro is still memorable for my brother and me. We must have stayed up until 2AM playing with Dr. SBAITSO.
  • althaz - Monday, March 24, 2014 - link

    We had a Riva 128, it was relatively poor, but when the TNT came out, that was THE SHIT.

    We added a Voodoo (1) to our PC when I was a kid and just couldn't believe how awesome it was, but it had nothing on the Riva TNT. The TNT was faster than the Voodoo (though not, IIRC the Voodoo 2, though performance was close), plus it had incredible 32-bit colour so image quality was FAR superior. The other bonus for nVidia (and their customers) was that their's was a single-card solution and absolutley mauled 3dfx's single-card solution, the Voodoo Banshee (which was the fastest 2D card on the market then, but had less than Voodoo 1 levels of 3D performance, from memory).
  • coder543 - Monday, March 24, 2014 - link

    I've never understood this. Maybe DirectX once held a strong lead in terms of features or performance, but it's been quite a few years since that was the case. If I were starting a new project in the last 5 years, it would seem completely unreasonable to lock myself into DirectX unless I was targeting the Xbox. I'm no Richard Stallman, but locking *your* code into a platform where you have no freedom to move it to something else without rewriting all of the graphics calls just seems like a poor decision. By supporting OpenGL, you not only get arguably better performance, but you can run it on almost every platform in existence. That would seem worthwhile to me, regardless of what Microsoft says. Reply
  • inighthawki - Monday, March 24, 2014 - link

    Any modern game engine is flexible to support almost all rendering APIs. Every talks about how "Oh everyone should use OpenGL cause its up to date and supported everywhere!"

    Except that it's not. Sure you have it on PC, and OpenGL is on mobile devices. But then you have consoles - PS3, PS4, 360, XBO, Wii. None of which use OpenGL. If you want to effectively target these, you need a flexible design that supports multiple APIs. At that point, most developers choose to support DirectX because Windows is the largest market for their games, DirectX tends to provide more consistent results across different hardware vendors, and DirectX tends to be more pleasurable to work with over OpenGL. DX has a long history of significantly better graphics tools, so a lot of developers will write a DX version first just to get it working, then write an OpenGL layer afterwards.
  • inighthawki - Monday, March 24, 2014 - link

    My optional U in brackets after Wii seemed to denote underlining. Sorry about that. Reply
  • ruthan - Monday, March 24, 2014 - link

    On all those other devices running OpenGL, because you need API, which are accelered by HW and without Windows you havent DirectXP, some you havent choice and you have to use OpenGL. Reply
  • lmcd - Monday, March 24, 2014 - link

    DirectX tends to get a lot of features beforehand, and there's no outrageous extension system to work with/deal with. Reply
  • errorr - Monday, March 24, 2014 - link

    While desktop games will continue to be a popular driver of some technology the vast majority of people will have a tablet or phone as their only computer. Quality 3D in games requires experience in and knowledge of OpenGL ES. I don't see where MS will have the clout necessary to drive mobile hardware. DirectX will only be as relevant as the console is and mobile hardware will drive future development. No way can they replace OpenGL as long as Android and Apple make the decisions on the api level.

    Also the paradigm of good coding practices is wildly different for TLDR mobile GPUs and there is no evidence the MS knows how to create an api that deals with the quirks of those Arch's.

Log in

Don't have an account? Sign up now