From 2301705dee6324634520559b27ac6728ebb02191 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 24 Aug 2016 17:14:11 -0700 Subject: anv: Include the pipeline layout in the shader hash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pipeline layout affects shader compilation because it is what determines binding table locations as well as whether or not a particular buffer has dynamic offsets. Since this affects the generated shader, it needs to be in the hash. This fixes a bunch of CTS tests now that the CTS is using a pipeline cache. Signed-off-by: Jason Ekstrand Reviewed-by: Kristian Høgsberg Cc: "12.0" --- src/intel/vulkan/anv_pipeline_cache.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/intel/vulkan/anv_pipeline_cache.c') diff --git a/src/intel/vulkan/anv_pipeline_cache.c b/src/intel/vulkan/anv_pipeline_cache.c index 6af15d4..3f111a1 100644 --- a/src/intel/vulkan/anv_pipeline_cache.c +++ b/src/intel/vulkan/anv_pipeline_cache.c @@ -104,6 +104,7 @@ void anv_hash_shader(unsigned char *hash, const void *key, size_t key_size, struct anv_shader_module *module, const char *entrypoint, + const struct anv_pipeline_layout *pipeline_layout, const VkSpecializationInfo *spec_info) { struct mesa_sha1 *ctx; @@ -112,6 +113,10 @@ anv_hash_shader(unsigned char *hash, const void *key, size_t key_size, _mesa_sha1_update(ctx, key, key_size); _mesa_sha1_update(ctx, module->sha1, sizeof(module->sha1)); _mesa_sha1_update(ctx, entrypoint, strlen(entrypoint)); + if (pipeline_layout) { + _mesa_sha1_update(ctx, pipeline_layout->sha1, + sizeof(pipeline_layout->sha1)); + } /* hash in shader stage, pipeline layout? */ if (spec_info) { _mesa_sha1_update(ctx, spec_info->pMapEntries, -- cgit v1.1