Valve's Open-Source Driver Developers Revise Their RADV "Secure Compile" Feature
Last month Valve's open-source Linux GPU driver developers introduced a "secure compile" feature to the Radeon Vulkan driver to do just as the name implies and making use of SECCOMP filters for enforcing the security aspect. They have now revised this implementation in order to provide faster shader compile times.
The focus of the RADV "secure compile" functionality has been the ability to safely pre-compile large sets of shaders to help with game load times. In making sure there are no nefarious shaders, SECCOMP filters and forking the processes is done.
With a revised implementation merged on Sunday night to Mesa 20.0-devel, fresh forking of the pipeline compiles is being done at device creation time. Rather than doubling the shader times, this revised implementation should only result in compile time increases of about 20% under the secure route.
This ultimately lowers resources and avoids the much slower compile times of shaders.
Seeing as these commits landed as "fixes" to the original RADV secure compile support, it's possible we will see this code back-ported for Mesa 19.3 too.
The focus of the RADV "secure compile" functionality has been the ability to safely pre-compile large sets of shaders to help with game load times. In making sure there are no nefarious shaders, SECCOMP filters and forking the processes is done.
With a revised implementation merged on Sunday night to Mesa 20.0-devel, fresh forking of the pipeline compiles is being done at device creation time. Rather than doubling the shader times, this revised implementation should only result in compile time increases of about 20% under the secure route.
This ultimately lowers resources and avoids the much slower compile times of shaders.
Seeing as these commits landed as "fixes" to the original RADV secure compile support, it's possible we will see this code back-ported for Mesa 19.3 too.
8 Comments