Dolphin, the open source GameCube and Wii emulator, hit a milestone 4.0 release this week. On Thursday, one of Dolphin's developers wrote a blog post titled "Dolphin Emulator and OpenGL Drivers - Hall of Fame/Shame," detailing the triumphs and trials of improving Dolphin's OpenGL backend since its 3.5 release. On Windows, most Dolphin users will use Direct3D (think DirectX), but that's not an option on Mac OS, Linux, or mobile platforms. And when it comes to Nvidia, AMD, ARM, and other graphics hardware providers, not all drivers are created equal.
"One of the reasons we wrote this post is to give some attention to the extremely bad state of mobile GPU drivers," writes Dolphin's delroth. "If people want mobile to become a serious contestant for graphics intensive applications, they will have to fix these issues, and it looks more and more like Qualcomm and ARM will not be able to develop proper drivers in the future or support newer versions of graphics APIs quickly. NVIDIA stepping into the mobile world might just be the best thing that has happened for mobile graphics developers." The post goes on to praise the potential of AMD's coding-to-the-metal Mantle initiative and offer up some great insight into where each company gets it right and where they get it wrong.
First up is Nvidia, which wins an "Excellent" from Dolphin for the best OpenGL drivers around. Nvidia has typically been an industry leader with Windows DirectX drivers, so it's interesting to see that they're doing a great job with OpenGL as well; Dolphin's developers are optimistic that Tegra 4 will be a powerful platform for the emulator. The team hasn't yet acquired a Tegra 4 device for testing and development.
The blog notes that Nvidia's OpenGL drivers are basically bug-free, but they do have a couple shortcomings. No support for client-side buffer storage means Dolphin has to use a work-around for full-speed emulation, and it's a feature AMD's drivers support. Another problem: "Licensing for the NVIDIA Graphics SDK that is incompatible with GPL licensed applications (including Dolphin), coupled with bad analysis of GPU performance requirements. The NVIDIA driver often detects Dolphin as an application which requires little GPU performance, which we assume is due to how we have to operate for accurate emulation (lot of stalling on GPU->CPU transfers, leading to very short average command queue length). We could use the NVIDIA Graphics SDK to force the driver to give us a high performance profile, but the GPL forbids us to do so, leading to degraded performance for some NVIDIA users."
AMD's drivers, unfortunately, score a mediocre. "We had the most issues with AMD when using their proprietary graphics driver on Linux, fglrx/Catalyst," delroth writes. "A lot of issues that do not happen on Windows are present on Linux, sometimes with a very visible effect in our emulator." One bug affecting Dolphin has been unfixed for two years, despite the developers' attempts to report it. The client-side buffer AMD supports on Windows also has issues that affect performance.
The future for AMD seems brighter, though. Delroth writes: "AMD is making steps that will help Dolphin a lot in the future: pioneering Unified Memory Access for graphics APIs, and working on Mantle, a new API that exposes more low-level GPU features to applications. If these last two improvements come together, it could potentially make AMD GPUs the best platform for high-gen console emulation."
ARM's Mali GPUs and Qualcomm's Adreno GPUs earned bad and horrible ratings, respectively. Here's where the post gets into how bad mobile drivers currently are. Dolphin's developers were actually able to get the emulator running on Mali devices "after a lot of time spent working around driver bugs and general slowness." And when they report bugs in Mali's performance, those bugs tend to be acknowledged...but never fixed. The blog lists multiple bugs that have even been worked around in Google's Chromium builds. And they're noted by other Android developers.
This list of problems with graphics drivers on ARM paints a pretty dire picture for OpenGL on mobile:
- Only binary blobs, no good documentation about the architecture
- Drivers limiting performance of the devices when the GPU could perform faster
- Phone manufacturers and operating systems developers bragging about support of features their hardware could have had for the last 2 years (OpenGL ES 3.0) if drivers were not so bad
- Very few applications using advanced OpenGL features, thus making Dolphin reveal how broken some of the GLES3 features are.
- Driver developers that seem to be doing less QA than open-source teams like Mesa
Adreno GPUs are even buggier, earning their horrible rating. If you want to dive into the more technical descriptions of the bugs, check out the full post on the Dolphin blog; it also details the open source support in Intel HD Graphics and open source Mesa drivers. Android has a long way to go to fully support open source game development.