Radeon Vulkan Driver Lands Dynamic VRS To Help With Power Savings - Helps The Steam Deck
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.
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.
11 Comments