Radeon Vulkan Driver Lands Dynamic VRS To Help With Power Savings - Helps The Steam Deck

Written by Michael Larabel in Radeon on 16 February 2022 at 06:04 AM EST. 11 Comments
RADEON
Back in January I wrote how Valve is working on dynamic Variable Rate Shading (VRS) for the Mesa Radeon Vulkan driver "RADV" to dynamically control the shading performance to help with battery life. That work has now successfully been merged into Mesa 22.1 for the open-source AMD Radeon Linux graphics stack.

As explained in that prior article drawing attention to the then-proposed dynamic VRS behavior, Vulkan has the VK_KHR_fragment_shading_rate extension for being able to control the shading rate depending upon the frame region being shaded. The shading at a lower resolution for less important areas of the screen can help with increasing performance as well as power-savings. One of the frequently cited examples around variable rate shading is often for the landscape within racing games.

The RADV driver has already supported the Vulkan VRS extension and allowed it to be statically overrode using an environment variable if wanting to trade lower rendering quality for lower power consumption / thermals. What Valve engineer Samuel Pitoiset worked out though is the ability to dynamically control the VRS behavior using a control file. When this configuration file option is in use with Mesa (RADV_FORCE_VRS_CONFIG_FILE), the desired shading rate can be written to that file and will be applied immediately even for running games without having to restart the game, etc.

That dynamic VRS handling for RADV has been under review since January in the public while today was merged into Mesa 22.1-devel. This makes it part of next quarter's Mesa3D stable release, which will be out roughly in May~June. It didn't make it in time for Mesa 22.0 that is already branched and releasing next month. The Vulkan Variable Rate Shading support is only present for AMD RDNA2 graphics.


Now with this code in Mesa, Valve presumably will integrate the handling into SteamOS 3.0 so that RADV_FORCE_VRS_CONFIG_FILE is automatically controlled. Into their Gamescope compositor or other system daemon that could make it so that if running on battery power or a certain thermal/power threshold is exceeded, they could change the shading rate within running games in order to reduce power consumption -- all done dynamically without any game restart being necessary. There could be other interesting use-cases too moving forward for this dynamic VRS for Mesa's RADV.

This is another great example of how Valve is able to improve the Radeon graphics driver stack thanks to it being open-source and not only benefiting their own purposes (Steam Deck / SteamOS) but can also then be made us of by other Linux gamers. This change doesn't impact AMD's official driver stack or Windows, but is a change made only to the Mesa RADV driver code.
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