ngscopeclient 0.1-dev+51fbda87c
|
Helper for managing Vulkan / vkFFT pipeline cache objects. More...
#include <PipelineCacheManager.h>
Public Member Functions | |
~PipelineCacheManager () | |
Destroys the cache and writes it out to disk. | |
std::shared_ptr< std::vector< uint8_t > > | LookupRaw (const std::string &key) |
Look up a blob which may or may not be in the cache. | |
void | StoreRaw (const std::string &key, std::shared_ptr< std::vector< uint8_t > > value) |
Store a raw blob to the cache. | |
std::shared_ptr< vk::raii::PipelineCache > | Lookup (const std::string &key, time_t target) |
Returns a Vulkan pipeline cache object for the given path. More... | |
void | LoadFromDisk () |
Loads cache content from disk. | |
void | SaveToDisk () |
Writes cache content out to disk. | |
void | Clear () |
Removes all content from the cache. | |
Protected Member Functions | |
void | FindPath () |
Helper for managing Vulkan / vkFFT pipeline cache objects.
The cache is stored on disk under the .cache/glscopeclient directory on Linux, or FIXME on Windows.
Raw data: $cachedir/shader_raw_[key].bin Vulkan shader data: $cachedir/shader_pipeline_[key].bin
shared_ptr< vk::raii::PipelineCache > PipelineCacheManager::Lookup | ( | const std::string & | key, |
time_t | target | ||
) |
Returns a Vulkan pipeline cache object for the given path.
If not found, a new cache object is created and returned.