Right now, the anv_pipeline_cache object owns the storage for the shaders and their metadata: bind maps, prog_data, etc. However, according to the Vulkan spec:
> The following object types are consumed when they are passed into a Vulkan
> command and not further accessed by the objects they are used to create.
> They can be destroyed at any time they are not in use by an API command:
> * VkShaderModule
> * VkPipelineCache
Instead, we need to have global storage for shader binaries and related data, probably reference-count it per-shader, and make the cache a dumb map from SHA1s to shaders (and maybe own a reference to each of them?)
This affects the dEQP-VK.synchronization.op.* tests in version 1.0.1 of the Vulkan CTS. They create pipelines, destroy the caches, and then use them.
I just pushed a series that fixes this.
on Feb 28, 2017 at 05:31:59.
(provided by the Example extension).