Mesa Threaded OpenGL Dispatch Finally Landing, Big Perf Win For Some Games
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.