Valve Adds RADV "Secure Compile" Support For Pre-Caching Game Shaders

Written by Michael Larabel in Valve on 26 October 2019 at 08:10 AM EDT. 4 Comments
The latest feature contribution by Valve's Linux driver developers to the open-source RADV driver is a "secure compile" feature.

The secure compile feature allows for spawning multiple compile threads on the same system that are secured via SECCOMP filters as the "secure" aspect of this feature for ensuring the threads are just doing their designated shader compilation tasks with no shaders going rogue.

The focus by these Valve developers is allowing software -- most namely, Steam -- to pre-compile large databases of shaders such as collected through their Fossilize program. By pre-compiling the shaders, it can avoid in-game stuttering and help with game load times.

The concept itself isn't new and Valve has worked on OpenGL/Vulkan shader caching/pre-caching and distributing those through Steam to help with stuttering and load times. What's new now in Mesa 19.3 is the "secure" compile functionality via SECCOMP for added safety and exposing a RADV_SECURE_COMPILE_THREADS environment variable for specifying the number of extra threads to spawn for handling this pre-compiling of shaders ahead of time.

The RADV secure compile feature had been open for two months as part of this merge request which overnight was merged for this quarter's Mesa 19.3 stable series.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of 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 automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week