Mesa Flips On OpenGL Threading For Valheim To Deliver Better Performance
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.)
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.)
15 Comments