VkPipelineCache data invalidation after driver updates
23K reputation · 15 Sept 2020, 15:28 UTC
Vulkan applications use VkPipelineCache to store compiled pipeline state object (PSO) data, reducing the overhead of vkCreateGraphicsPipelines in subsequent sessions by providing a pre-populated data blob.
The Vulkan specification allows drivers to silently ignore cache data if it is deemed incompatible. This creates uncertainty when managing persistent cache files across minor driver versions or vendor-specific updates, as there is no standardized mechanism to programmatically detect if the driver has discarded the provided blob in favor of a full re-compile.
Given that the internal format of the cache blob is implementation-dependent, what are the specific criteria drivers use to determine cache staleness during a version transition? Is there a documented way to verify if a provided VkPipelineCache blob was successfully utilized or ignored by the driver?