A cache allows us to improve the performance of creating multiple pipeline objects. But for us to be able to use the cache each time we execute our application, we need a way to store the contents of the cache and reuse it any time we want. To do that, we can retrieve the data gathered in a cache.
Retrieving data from a pipeline cache
How to do it...
- Take the handle of a logical device and use it to initialize a variable of type VkDevice named logical_device.
- Store the handle of a pipeline cache, from which data should be retrieved, in a variable of type VkPipelineCache named pipeline_cache.
- Prepare a variable of type size_t named data_size.
- Call vkGetPipelineCacheData( logical_device, pipeline_cache, &data_size, nullptr ) providing the logical_device and...