• 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.
    PRESENTED BY

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

POST A COMMENT

99 Comments

View All Comments

  • lmcd - Monday, March 24, 2014 - link

    I am aware of ART and think that it simply moves the same problems to elsewhere in the operating system (boot time). Dart is the "new VM," and in my opinion the best Google-produced environment for development (hopefully PNaCl takes off with greater language support). Reply
  • Scali - Wednesday, March 26, 2014 - link

    ART moves the problem to install-time. Of course, the first time you reboot your phone in ART-mode, it needs to 'install' all apps. As in: it needs to compile them to native code compatible with the ART runtime. Reply
  • lmcd - Monday, March 24, 2014 - link

    As if I didn't know they were different things -- that's obvious from the get-go. But it's also obvious that Google is a web-based company focusing on two major code techniques for web: PNaCl and Dart. Granted, PNaCl is the more likely target for conversion (maybe try and get Dalvik as another PNaCl target language?), but regardless I don't think Google can possibly keep Android as it is right now, and the transition is unlikely to be smooth.

    And Dalvik uses Java classes and is heavily based on Java. Pretending that they only "borrowed" some ideas is turning a blind eye to Google's Android development. There was a lawsuit with Oracle for a reason (though Java was open-source, I agree with the verdict). But point being, Dalvik uses Java classes and for backwards-compatibility's sake will not leave those behind (though new ones may be recommended).
    Reply
  • coder543 - Monday, March 24, 2014 - link

    How does Microsoft desktop dominance make DirectX win when OpenGL performs better on Windows than DirectX does? Reply
  • inighthawki - Monday, March 24, 2014 - link

    Valve has only proven that modern OpenGL 4.x is faster than a legacy 10 year old DX9 implementation. Reply
  • Friendly0Fire - Monday, March 24, 2014 - link

    Which is amusingly a detail often forgotten. Modern OpenGL *and* DirectX are both faster than their older counterparts. Reply
  • Klimax - Tuesday, March 25, 2014 - link

    And furthermore nobody could/can replicate their results, because they never released OpenGL part of Source games. (Thus they could just make that up...) Reply
  • R. Hunt - Tuesday, March 25, 2014 - link

    But they got the headline, which was what they were after. Reply
  • Scali - Wednesday, March 26, 2014 - link

    No, Valve has *claimed* that, benchmarks prove otherwise.... OpenGL is not faster than DX9. Look for the Counter Strike review on Rootgamer for example (can't place a direct link, it seems, won't go through the spam filter). Reply
  • nico_mach - Saturday, March 29, 2014 - link

    Let me say, whatever Valve's motivations, it's unlikely that one is 'faster' than the other ultimately, it's all about the effort put in by developers. That's been proven time and against outside the JIT compilers, determined programmers can generally get top performance, it's a question of how long it takes, and MS has always catered to that need. Reply

Log in

Don't have an account? Sign up now