Mesa Threaded OpenGL Dispatch Finally Landing, Big Perf Win For Some Games

Written by Michael Larabel in Mesa on 5 February 2017 at 09:37 PM EST. 54 Comments
Four years ago Intel developers were working on a threaded OpenGL dispatch mechanism for Mesa, but it never ended up being merged. Now, prolific Mesa contributor and AMD developer Marek Olšák is looking to merge this code and clean it up.

The "glthread" work started 4+ years ago by Intel to queue and execute OpenGL calls in a different CPU thread. This effort was designed to deal with higher CPU overhead of Mesa, but at the time it wasn't too helpful with the available Linux games of the time.

The Mesa threading plan... Back in 2013, finally being realized in 2017.

A few years later and the increasing number of demanding Linux games, Marek is looking to revive the "glthread" code and ship it in mainline Mesa. Several modern Linux games can now run better with this threaded OpenGL dispatch feature, such as Borderlands 2 is one game that's named for seeing much better performance. Borderlands 2 can be faster by around 70% in some cases, Marek has been working on the revised code on and off the past few months.

Marek is planning to land this code soon into mainline Mesa and from there to clean it up and further enhance its abilities while in the Mesa Git code.

This threaded GL dispatch mode is disabled by default but once it lands can be turned on via a drirc toggle (glthread) or environment variable. This will work with all Gallium3D drivers while Marek is leaving it to the Intel developers if they want to land the patches that would allow the support for their classic Mesa DRI driver.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of 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 automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week