TGSI On-Disk Shader Cache For Mesa: Caching Comes To R600g/RadeonSI
Written by Michael Larabel in Mesa on 7 February 2017 at 06:07 AM EST. 15 Comments
MESA --
Timothy Arceri of Collabora has sent out his latest patches to Mesa in regards to the ongoing work for shader caches. The 40 patches published over night do benefit RadeonSI and R600g.

Up to now Arceri's GLSL shader cache has been about having a cache of the compiled shaders on-disk for the hardware being targeted and that focus up until recently was just for the Intel i965 driver. The shader cache effort being worked on now is adding support for caching of TGSI (Gallium3D's IR) for drivers with RadeonSI caching now on his radar. With the TGSI effort, basically allowing an on-disk cache of the intermediate representation that is then consumed by the Gallium3D hardware drivers for generating their hardware-specific code.

Left out of these patches is the cache support within the RadeonSI back-end, similar to the i965 shader cache back-end, for caching the hardware-specific shader code. He's going to post that patch once a chance is made to LLVM for being able to query the version at runtime. Arceri commented about the RadeonSI performance, "Without the radeonsi patch min fps still goes up around 4 fps in the Shadow of Mordor benchmark (although the stalls are still very noticeable)."


The TGSI cache may help the R600g driver, but Arceri hasn't been able to test it. Other Gallium3D drivers like Nouveau that consume TGSI IR should also be able to enable that cache support too. The TGSI caching code was added to Gallium3D's Mesa OpenGL state tracker -- thus the actual G3D wiring is quite small.

The series can be found on Mesa-dev. Hopefully all of this caching work will come to fruition for Mesa 17.1. The more profound work for RadeonSI gamers should be the back-end within the RadeonSI driver once Arceri is able to get past the LLVM version issue.
About The Author
Author picture

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 10,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 or contacted via MichaelLarabel.com.

Related Mesa News
Popular News This Week