RADV Driver Lands Another Optimization: "Missing In RADV For A Very Long Time"
#Hardware

RADV Driver Lands Another Optimization: "Missing In RADV For A Very Long Time"

Hardware Reporter
2 min read

Valve's Linux graphics team finally ports a four-year-old optimization to RADV, improving clipping performance by properly setting the PA_SU_HARDWARE_SCREEN_OFFSET register.

The RADV Vulkan driver has received another optimization that developers are calling "missing in RADV for a very long time." This four-year-old optimization was finally scratched off the TODO list last week as part of the upcoming Mesa 26.1 release.

Back in May 2022, Timur Kristof from Valve's Linux graphics team opened a ticket suggesting that RADV should "Port si_emit_guardband to RADV" and "Setting PA_SU_HARDWARE_SCREEN_OFFSET properly (like RadeonSI does) should improve clipping (not culling) performance." The ticket sat largely untouched for years until Samuel Pitoiset, also from Valve's Linux graphics team, picked up the work and ported the optimization to RADV.

The optimization involves properly setting the PA_SU_HARDWARE_SCREEN_OFFSET register, which has been present on AMD GPUs for at least 16+ years. This register helps with clipping performance by allowing the GPU to handle screen offset calculations more efficiently. The code was merged last week for Mesa 26.1, bringing RADV's clipping performance closer to parity with the RadeonSI OpenGL driver, which has had this optimization for years.

While no specific performance numbers were shared as part of the issue tracker or merge request, the optimization should provide measurable improvements in scenarios where clipping performance is critical. The PA_SU_HARDWARE_SCREEN_OFFSET register allows the GPU to handle certain calculations that would otherwise need to be done in software, potentially reducing CPU overhead and improving overall rendering efficiency.

This optimization is particularly significant because it demonstrates the ongoing work to bring RADV's performance closer to that of the mature RadeonSI driver. As RADV continues to evolve as a Vulkan driver, these incremental improvements help close the gap between the two drivers and provide better performance for Linux gamers and professionals using AMD hardware.

For developers and users interested in the technical details, the PA_SU_HARDWARE_SCREEN_OFFSET register is part of the GPU's primitive assembly (PA) unit and specifically the setup unit (SU). It allows the GPU to handle screen offset calculations natively rather than requiring software workarounds. This type of low-level optimization can have cascading benefits throughout the rendering pipeline, particularly in complex scenes with many objects requiring clipping calculations.

The merge of this optimization highlights the collaborative nature of open-source graphics development, with Valve's Linux graphics team members contributing significant improvements to the RADV driver. As Mesa 26.1 approaches its release, users can expect to see these performance improvements in the next stable version of the driver stack.

Comments

Loading comments...