Skip to content

Support simultaneous use of foz read-only and non-foz read-write caches

Dmitry Osipenko requested to merge digetx/mesa:combined-caches into main

Today we can use only one type of disk cache at a time. This MR brings support for using read-only foz cache files together with a usual non-foz read-write cache. It allows us to ship a prebuilt read-only cache for certain applications, while the rest of application will continue to benefit from the usual caching that supports cache-size limiting.

In order to activate the new behaviour, the new MESA_DISK_CACHE_COMBINE_RW_WITH_RO_FOZ environment variable needs to be set to true. Mesa will first check the foz read-only caches (specified using MESA_DISK_CACHE_READ_ONLY_FOZ_DBS) and if cache entry isn't found there, then it will fall back to the read-write cache.

@tarceri @xexaxo @davidriley

Edited by Dmitry Osipenko

Merge request reports