Bug 97476 - Shader binaries should not be stored in the PipelineCache
Summary: Shader binaries should not be stored in the PipelineCache
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Vulkan/intel (show other bugs)
Version: 12.0
Hardware: Other All
: high normal
Assignee: Intel 3D Bugs Mailing List
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-25 03:51 UTC by Jason Ekstrand
Modified: 2016-08-30 22:58 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.


bug/show.html.tmpl processed on Feb 28, 2017 at 05:31:59.
(provided by the Example extension).