RADV Lands Shader Caching For Graphics Pipeline Libraries

Written by Michael Larabel in Radeon on 4 April 2023 at 04:55 PM EDT. 8 Comments
RADEON
Ahead of hopefully enabling the RADV Vulkan Graphics Pipeline Libraries "GPL" support by default for this quarter's Mesa 23.1 release, the RADV driver has now landed on-disk shader caching support for GPL libraries.

Prolific RADV contributor Samuel Pitoiset of Valve's Linux graphics driver team commented with the support:
"This was the last missing feature for GPL. The main problem is that the on-disk shaders cache size will increase a lot because we don't deduplicate shaders but there is on-going work to improve that.

We also can't use the shaders cache for libraries created with the RETAIN_LINK_TIME_OPTIMIZATION flag and module identifiers because we don't know the SPIR-V and thus can't retain NIR shaders for linking."

Landing this "last missing feature" of shader caching is important for in turn being able to turn on RADV GPL handling by default where as right now it's behind the RADV_PERFTEST=gpl environment variable option. The RADV GPL functionality can yield a nice performance boost.

RADV developers have been working on the GPL support going back to last summer. Vulkan 1.3.210 last March added VK_EXT_graphics_pipeline_library as allowing for separate compilation of four distinct parts of graphics pipelines. By allowing independent parts of the graphics pipeline to be compiled into a graphics pipeline library that is then linked together at the final stage to create the executable pipeline, it allows for greater re-use for pipelines having the same shaders or states across multiple pipelines.

RADV GPL libraries caching MR


It's great seeing this code land today and here's to hoping RADV GPL crosses the finish line for the upcoming v23.1 branching.
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