Skip to content

util/fossilize_db: Single file concurrency fixes.

When running games through the DXVK DXGI multiple vulkan instances end up getting created each with their own disk cache. When opening the fossilize file for the cache the disk cache code locks the file for the lifetime of that disk cache causing all but one of those vulkan instances to run without working disk cache.

This caused e.g. Horizon Zero Dawn to recompile shaders every start.

The easy way to "fix" this would be a singleton disk_cache instance but that doesn't help for multi-process scenarios like using fossilize for shader pre-caching. As such I decided to fix this by reducing the locking. This resolves the issues for HZD.

Merge request reports