Intel Aims To Hit On Performance, Plans LLVM Compiler

Written by Michael Larabel in Intel on 29 August 2012 at 03:03 PM EDT. 16 Comments
INTEL
Eric Anholt of Intel's Open-Source Technology Center had a few things to say yesterday at the 2012 GStreamer Conference about their open-source Linux graphics driver stack. Intel is aiming to hit hard on performance improvements and one of the interesting statements made is that they're now looking at moving to an LLVM-based shader compiler for a big performance win. Left 4 Dead 2 running on Mesa was also shown.

Anholt began his hour-long presentation by taking about OpenGL 3.1 finally coming about in Mesa, OpenGL ES 3.0 coming together fairly quickly, MSAA anti-aliasing finally being settled, and various other Mesa/DRM accomplishments that have already been covered at length on Phoronix.

Eric then went on to talk about performance improvements coming to Mesa for Intel hardware, due to people running more benchmarks (Phoronix) and for improving Valve's Linux performance.

One of the big ones they are working on is providing threaded GL dispatch support within the Intel Mesa driver, which comes down to separating the driver and application work to multiple cores. The closed-source AMD and NVIDIA drivers perform this threaded dispatch, but Mesa does not and it's causing performance problems and is one of the features being requested by Valve.

While threaded GL dispatch will be a nice performance win, Intel will likely only implement the support along their OpenGL 3.1+ code paths since the pre-3.1 core API is just so huge. With now actively working on the GL3.1+ support, they can do the threaded dispatch support at the same time rather than going back and investing time in the legacy GL2 code.

Another item being worked on for improving the Intel OpenGL Linux performance is better memory mapping.

Then a big item was shared: Intel's planning to do an LLVM shader compiler back-end for their driver. The Radeon Gallium3D driver already has an LLVM shader compiler but Intel is now interested in switching to LLVM too for a high-performance shader compiler. This should yield Intel's biggest performance win of the items they're currently working on.

Intel now being interested in a LLVM shader compiler for their graphics driver is rather interesting since in past years they preferred writing their own compiler and weren't convinced about using LLVM IR, etc. However, after working on their own compiler, their own IR, and other prerequisites for years and still not being satisfied, they're now planning to use LLVM. "We want to use a real compiler and stop writing our own with our own IR, own optimizations, etc."

It will be a while before Intel's Mesa driver has a working LLVM shader compiler and they're being cautious about not having the switch between compilers be painful. "The transition to LLVM looks pretty ugly since it's a big change. Hopefully better on regressions when changing shader compilers this time than last time."

Eric also shared that they'll likely go from OpenGL 3.1 to OpenGL 3.3 in Mesa without ever releasing an OpenGL 3.2 version since most of the work to getting to GL3.3 will be coming at the same time. For hitting OpenGL 4.0, it will still be a while in Mesa. Eric believes though that they eventually will catch up with the latest upstream Khronos OpenGL desktop specification since Intel developers have been working harder and catching up faster than the one to two new specification releases per year, but still it will be a long process.

Also mentioned by Eric is "GLX is pretty much deprecated at this point." Intel is encouraging developers to use EGL rather than GLX. EGL is needed anyways for Wayland, Android, OS X, etc and the Mesa EGL support has matured quite well and still works fine with an X.Org Server. Eric said, "Please please please stop using GLX. There shouldn't be anything left that GLX has that EGL doesn't."

The Intel Valve Linux details shared will come in another Phoronix article.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week