AMD Radeon Linux OpenGL Driver Makes More Optimizations, Eyes GL Threading By Default

Written by Michael Larabel in Radeon on 28 August 2022 at 05:23 AM EDT. 7 Comments
RADEON --
Longtime AMD open-source Linux graphics developer Marek Olšák is at it again with some interesting optimizations for RadeonSI Gallium3D and is eyeing at enabling OpenGL threading by default.

RadeonSI for years has supported a "glthread" option for enabling OpenGL threading by executing OpenGL calls on a different CPU thread. This threaded OpenGL dispatch support has been of big help to CPU-bound games but has been opt-in on a per-game and environment variable override basis. For example, glthread with RadeonSI yielded a ~30% boost for Minecraft as just one of many games this Mesa feature has helped in recent years.

This past week Marek opened a merge request providing "lots of cleanups, some CPU overhead improvements" for Mesa and the glthread code. One interesting remark he made there was:
I get 15% better perf with this in one viewperf subtest that is CPU-bound.

In recent months Marek and other AMD Mesa developers have been doing a lot of tuning work for SPECViewPerf and have been making some mighty impressive performance gains for those workstation OpenGL test cases, even with consumer Radeon GPUs.

In addition to those clean-ups, Marek opened another MR with more fixes to the GLThread code and then even enabling it by default for RadeonSI. In there he commented:
These are conformance fixes, synchronization fixes, and changes to allow glthread to be used with all EGL backends (android, device, drm, wayland were missing).

This is the first time that glthread is considered complete, performant, and being enabled by default (only radeonsi).

With this pending code, Mesa's glthread is considered "complete" after many years in the making. There is already whitelisting to enable the glthread functionality for RadeonSI with many games, but this merge request would enable it by default. This is likely to help a number of games and other niche workloads that otherwise weren't vetted previously for whether or not glthread would be beneficial to enabling.


It will be very interesting to see in practice how this OpenGL threading being flipped on unconditionally for RadeonSI works out and what new workloads are discovered to be faster. Currently these merge requests are still undergoing review but hopefully they'll be merged in time for Mesa 22.3 next quarter.
Related News
About The Author
Author picture

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