Mesa Flips On OpenGL Threading For Valheim To Deliver Better Performance

Written by Michael Larabel in Mesa on 27 February 2021 at 07:30 AM EST. 15 Comments
MESA
For those enjoying the Valheim, the new survival/sandbox game that has been an incredible success and sold more than four millions of copies so far while being a low-budget indie game, Mesa should be providing better performance when using its OpenGL renderer.

Valheim is powered by the Unity game engine and is natively supported on Linux. Initially the focus was on the OpenGL rendering support while the game is now running out Vulkan support. But for those sticking to OpenGL usage, Mesa Git is performing better thanks to enabling OpenGL threading.

For Valheim running in the OpenGL mode, Mesa 21.1-devel (and presumably back-porting to Mesa stable series soon), the OpenGL threading is whitelisted for the game. Users can also set the mesa_glthread=true environment variable for enabling OpenGL threading as another option regardless of your current Mesa version.


The patch whitelisting Valheim for Mesa OpenGL threading mentions, "Drastically reduces hitching when traversing the landscape."

As shown over the years, mesa_glthread can be of big benefit for OpenGL performance by allowing more work to happen in a separate CPU thread and will particularly help lower-end and mid-range processors. For those with Vulkan support available, however, using Valheim with Vulkan should ultimately lead to better performance. (Unfortunately, this game seems to lack any nice automated benchmark capabilities which is why we haven't been testing it.)
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