Bug 97476

Summary: Shader binaries should not be stored in the PipelineCache
Product: Mesa Reporter: Jason Ekstrand <jason>
Component: Drivers/Vulkan/intelAssignee: Intel 3D Bugs Mailing List <intel-3d-bugs>
Status: RESOLVED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: high CC: jason
Version: 12.0   
Hardware: Other   
OS: All   
i915 platform: i915 features:

Description Jason Ekstrand 2016-08-25 03:51:42 UTC
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?)
Comment 1 Jason Ekstrand 2016-08-25 04:06:33 UTC
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.
Comment 2 Jason Ekstrand 2016-08-30 22:58:55 UTC
I just pushed a series that fixes this.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.