From 9a5016d54d4061010d8dcc080642b255388a6624 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 11 Apr 2024 17:18:25 +0200 Subject: [PATCH] radv/rt: use radv_pipeline_hash_shader_stage() It should be equivalent. Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_pipeline_rt.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/amd/vulkan/radv_pipeline_rt.c b/src/amd/vulkan/radv_pipeline_rt.c index 2c1825f83b9..6a0cfbe1656 100644 --- a/src/amd/vulkan/radv_pipeline_rt.c +++ b/src/amd/vulkan/radv_pipeline_rt.c @@ -274,15 +274,14 @@ static void radv_init_rt_stage_hashes(const struct radv_device *device, const VkRayTracingPipelineCreateInfoKHR *pCreateInfo, struct radv_ray_tracing_stage *stages, const struct radv_shader_stage_key *stage_keys) { - VK_FROM_HANDLE(radv_pipeline_layout, pipeline_layout, pCreateInfo->layout); - for (uint32_t idx = 0; idx < pCreateInfo->stageCount; idx++) { - gl_shader_stage s = vk_to_mesa_shader_stage(pCreateInfo->pStages[idx].stage); - struct radv_shader_stage stage; + const VkPipelineShaderStageCreateInfo *sinfo = &pCreateInfo->pStages[idx]; + gl_shader_stage s = vk_to_mesa_shader_stage(sinfo->stage); + struct mesa_sha1 ctx; - radv_pipeline_stage_init(&pCreateInfo->pStages[idx], pipeline_layout, &stage_keys[s], &stage); - - radv_hash_shaders(device, stages[idx].sha1, &stage, 1, NULL, NULL); + _mesa_sha1_init(&ctx); + radv_pipeline_hash_shader_stage(sinfo, &stage_keys[s], &ctx); + _mesa_sha1_final(&ctx, stages[idx].sha1); } }