diff --git a/src/amd/vulkan/radv_pipeline_cache.c b/src/amd/vulkan/radv_pipeline_cache.c index 9cc62b4c245..75aa3a4ec14 100644 --- a/src/amd/vulkan/radv_pipeline_cache.c +++ b/src/amd/vulkan/radv_pipeline_cache.c @@ -47,14 +47,15 @@ radv_is_cache_disabled(struct radv_device *device) void radv_hash_shaders(const struct radv_device *device, unsigned char *hash, const struct radv_shader_stage *stages, - uint32_t stage_count, const struct radv_pipeline_layout *layout, const struct radv_pipeline_key *key) + uint32_t stage_count, const struct radv_pipeline_layout *layout, + const struct radv_graphics_state_key *gfx_state) { struct mesa_sha1 ctx; _mesa_sha1_init(&ctx); _mesa_sha1_update(&ctx, device->cache_hash, sizeof(device->cache_hash)); - if (key) - _mesa_sha1_update(&ctx, key, sizeof(*key)); + if (gfx_state) + _mesa_sha1_update(&ctx, gfx_state, sizeof(*gfx_state)); if (layout) _mesa_sha1_update(&ctx, layout->sha1, sizeof(layout->sha1)); diff --git a/src/amd/vulkan/radv_pipeline_graphics.c b/src/amd/vulkan/radv_pipeline_graphics.c index 02801afe24b..2f4afae60d7 100644 --- a/src/amd/vulkan/radv_pipeline_graphics.c +++ b/src/amd/vulkan/radv_pipeline_graphics.c @@ -2645,7 +2645,7 @@ radv_graphics_pipeline_compile(struct radv_graphics_pipeline *pipeline, const Vk radv_pipeline_load_retained_shaders(device, pipeline, pCreateInfo, stages); if (radv_should_compute_pipeline_hash(device, pipeline, fast_linking_enabled)) { - radv_hash_shaders(device, hash, stages, MESA_VULKAN_SHADER_STAGES, pipeline_layout, pipeline_key); + radv_hash_shaders(device, hash, stages, MESA_VULKAN_SHADER_STAGES, pipeline_layout, &pipeline_key->gfx_state); pipeline->base.pipeline_hash = *(uint64_t *)hash; } diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index b6f5e5fe989..50b93bfd018 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -2006,7 +2006,6 @@ struct radv_event { uint64_t *map; }; -struct radv_pipeline_key; struct radv_ray_tracing_group; void radv_pipeline_stage_init(const VkPipelineShaderStageCreateInfo *sinfo, const struct radv_pipeline_layout *layout, @@ -2014,7 +2013,7 @@ void radv_pipeline_stage_init(const VkPipelineShaderStageCreateInfo *sinfo, cons void radv_hash_shaders(const struct radv_device *device, unsigned char *hash, const struct radv_shader_stage *stages, uint32_t stage_count, const struct radv_pipeline_layout *layout, - const struct radv_pipeline_key *key); + const struct radv_graphics_state_key *gfx_state); struct radv_ray_tracing_stage; void radv_hash_rt_shaders(const struct radv_device *device, unsigned char *hash,