
Longtime AMD Linux graphics driver expert Marek Olšák, who joined Valve earlier this year and now focusing more on RADV rather than the RadeonSI Gallium3D driver, has seen some of his latest work now merged for Mesa 26.2. Marek landed a big overhaul to the variable rate shading (VRS) code that in some cases can double the performance.
Variable rate shading is the modern graphics feature that allows a reduction of pixel shading rate in less important areas of the frame. Marek partially rewrote the VRS state code for the Radeon RADV Vulkan driver to fix some outstanding bugs and improving performance all while simplifying the code too. This RADV VRS work includes benefiting VKD3D too, the Direct3D 12 API atop Vulkan for the likes of Steam Play (Proton).
Marek noted in the merge request of the enticing performance work:
– VRS being dynamic state or statically enabled in the pipeline object no longer prevents the VRS flat shading optimization from being enabled, which can double performance in those cases. That mainly benefits VKD3D. Fragment shaders still need to do flat shading to get this.
– VRS being forcefully disabled due to SampleMaskIn or when sample shading is enabled without MSAA no longer disables RB+, which can double performance in those cases, though this one is enough of an edge case that I think apps are unlikely to run into it.
– Since we sometimes know at compile time whether the VRS state will be overridden, the VRS rate shader output is now removed in those cases and likewise the per-vertex VRS rate output is not added either.
The 22 patches making up this merge request are now in place for the Mesa 26.2 release due out in August.
