RADV Preference On Spilling Buffers To Help Discrete GPUs For Some Games

Written by Michael Larabel in Radeon on 7 February 2021 at 03:35 AM EST. 4 Comments
RADEON
Dropping a conditional (if) statement from the RADV driver in Mesa is helping the performance of discrete Radeon graphics cards with the RADV Vulkan driver for some games.

Hitting Mesa 21.1-devel on Saturday and marked for back-porting to stable series of Mesa is a change to improve spilling on discrete GPUs. Up to now the preferred heap for buffers has only set GTT (RAM) for APUs given that all the memory ends up being system RAM on current platforms with the integrated graphics. But this simple change drops the check over dedicated vRAM or not, thereby having the same behavior for discrete GPUs.

With this change is improved buffer spilling for discrete GPUs that helps in case of graphics cards with limited amounts of dedicated video memory relative to what is being sought by the game/application. As noted in the code comment for the reasoning, "Otherwise AMDGPU tries to place the buffers in VRAM really hard to the extent that we are getting a lot of unnecessary movement. This helps significantly when e.g. Horizon Zero Dawn allocates more memory than we have VRAM."

All that unnecessary movement up to now in trying to avoid buffer spilling has been hurting the performance for select games. The issue originally was reported via this bug report over the RADV Vulkan driver performing much slower than the likes of the AMDVLK driver when running Doom Eternal. But with this simple change, the performance is now much better for this and other games. AMDGPU will still prefer video memory for the initial buffer/heap placement so it shouldn't cause any problems otherwise.

This change, which helps out graphics cards with smaller amounts of video memory, should work its way to stable Mesa releases soon.
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