Pipeline cache question

Anyone familiar with the pipeline cache that vulkan uses? Couldn’t find information regarding the following:

  1. are the pipeline cache ‘portable’? portable in the sense that the cache file generated is the same on a different vendor, card model or driver version
  2. if the cache isn’t ‘portable’ does it cause an undefined behavior if a use a cache generated by a different platform?
  3. also if it’s not ‘portable’ what are the stuff that i need to check to ensure i’m using the correct cache, for e.g. vendors, card model, driver version

No, they’re not guaranteed to be portable and ar bound to vendor, device and a unique cache identifier. As such you need to extract the pipelineCacheUUID that the cache was created for from the header and compare against the pipelineCacheUUID physical device property of the GPU you want to load the cache for.

You’ll probably get an error when trying to generate pipelines from that cache.

See chapter 9.6 of the specs. It has a table with the header layout that you’d need to load and check against the properties of the device you want to use the cache on.

P.S. : There should be an API sample in the LunarG VulkanSDK for the pipeline cache. That may help you get started.

ahh ok got it, thanks a lot