OSDN Git Service

anv/pipeline: Cache the pre-lowered NIR
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 12 Oct 2018 22:54:41 +0000 (17:54 -0500)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 11 Jan 2019 01:15:27 +0000 (19:15 -0600)
commiteb4b1477dcd37270291bfae94495192e1a760a69
tree59a1afa68d70dcf4f25c94498dd27a8b1fec87be
parentf6aa9f71851614b06c11221f01e78493551ed68b
anv/pipeline: Cache the pre-lowered NIR

This adds a second level of caching for the pre-lowered NIR that's only
based off of the shader module, entrypoint and specialization constants.
This is enough for spirv_to_nir as well as our first round of lowering
and optimization.  Caching at this level should allow for faster shader
recompiles due to state changes.

The NIR caching does not get serialized to disk via either the
VkPipelineCache serialization mechanism or the transparent on-disk
cache.  We could but it's usually not that expensive to fall back to
SPIR-V for the odd cache miss especially if it only happens once for
several misses and it simplifies the cache.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_pipeline.c