Panfrost Gallium3D Driver Wires Up Mesa Shader Disk Cache Support
One of the last features to land in Mesa 22.3 prior to yesterday's branching and Mesa 22.3-rc1 release is enabling the Mesa shader disk cache for Panfrost, the Arm Mali open-source driver for Midgard and Bifrost generations.
Panfrost Gallium3D has made the necessary changes in Mesa 22.3 to enable the common Mesa shader disk cache. In turn this should help with Panfrost on faster game load times by avoiding shader recompilation on subsequent game loads, helping with performance for any games compiling shaders on the fly, etc. It's the same Mesa on-disk cache used by other drivers, just the integration bits were needed for the Panfrost support.
Alyssa Rosenzweig of Collabora worked out the shader disk cache support. She summed it up as:
As part of this merge is also the ability to pre-compile shaders at CSO creation time for trying to avoid "draw-time jank". The shader pre-compilation can be enabled using the new "precompile" debug option.
More details on the Mesa shader disk cache support for Panfrost via this merge.
Panfrost Gallium3D has made the necessary changes in Mesa 22.3 to enable the common Mesa shader disk cache. In turn this should help with Panfrost on faster game load times by avoiding shader recompilation on subsequent game loads, helping with performance for any games compiling shaders on the fly, etc. It's the same Mesa on-disk cache used by other drivers, just the integration bits were needed for the Panfrost support.
Alyssa Rosenzweig of Collabora worked out the shader disk cache support. She summed it up as:
Wire up the Mesa shader disk cache into Panfrost. Coupled with the precompiles from the previous patch, this should greatly reduce shader recompile jank.
This is a bare bones implementation. Obvious future work includes:
- Caching internal (outside of Gallium) shaders
- Implement finalize_nir to reduce on disk size of shaders
As part of this merge is also the ability to pre-compile shaders at CSO creation time for trying to avoid "draw-time jank". The shader pre-compilation can be enabled using the new "precompile" debug option.
More details on the Mesa shader disk cache support for Panfrost via this merge.
Add A Comment