Radeon RADV Optimizations In Mesa 22.0 Improve PRIME/Hybrid GPU Performance
More last minute feature work to land for Mesa 22.0 ahead of its imminent feature freeze are DRI_PRIME optimizations. These improvements by AMD engineer Pierre-Eric Pelloux-Prayer are based on prior patches to the RadeonSI Gallium3D driver.
Among the changes are implementing partial SDMA support, allocating the PRIME buffer as unchanged, Vulkan windowing system integration (WSI) support for a private transfer pool for the DRI_PRIME blit, and RADV using the private transfer queue using SDMA. The optimizations work for GFX9/Vega and newer. The overall focus is to limit the performance impact of rendering on the discrete GPU but needing to present from the integrated GPU. These optimizations are almost good enough that it eliminates all the DRI_PRIME overhead to deliver similar performance whether the dGPU is connected to the display or having to go through the iGPU.
Among the rough benefits to this work is a possible 1.59x speed-up for Rocket League and 1.15~1.32x for other games while some games benefited by just a few FPS. In any case, it's a move in the right direction for those with hybrid laptops featuring a mix of AMD Radeon integrated and discrete graphics.
See this MR for all of the details on this set of RADV DRI_PRIME optimizations to find in Mesa 22.0, which should be out as stable in February.