}
static void
-radv_rt_fill_stage_info(const VkRayTracingPipelineCreateInfoKHR *pCreateInfo, struct radv_ray_tracing_stage *stages)
+radv_rt_fill_stage_info(struct radv_device *device, const VkRayTracingPipelineCreateInfoKHR *pCreateInfo,
+ struct radv_ray_tracing_stage *stages, const struct radv_pipeline_key *key)
{
uint32_t idx;
for (idx = 0; idx < pCreateInfo->stageCount; idx++) {
stages[idx].stage = vk_to_mesa_shader_stage(pCreateInfo->pStages[idx].stage);
- struct mesa_sha1 ctx;
- _mesa_sha1_init(&ctx);
- radv_hash_rt_stages(&ctx, pCreateInfo->pStages + idx, 1);
- _mesa_sha1_final(&ctx, stages[idx].sha1);
+ struct radv_pipeline_stage stage;
+ radv_pipeline_stage_init(&pCreateInfo->pStages[idx], &stage, stages[idx].stage);
+
+ radv_hash_shaders(stages[idx].sha1, &stage, 1, NULL, key, radv_get_hash_flags(device, false));
}
if (pCreateInfo->pLibraryInfo) {
pipeline->stages = stages;
pipeline->groups = groups;
- radv_rt_fill_stage_info(pCreateInfo, stages);
+ struct radv_pipeline_key key = radv_generate_pipeline_key(device, &pipeline->base.base, pCreateInfo->flags);
+
+ radv_rt_fill_stage_info(device, pCreateInfo, stages, &key);
result = radv_rt_fill_group_info(device, pCreateInfo, stages, pipeline->groups);
if (result != VK_SUCCESS)
goto fail;
- struct radv_pipeline_key key = radv_generate_pipeline_key(device, &pipeline->base.base, pCreateInfo->flags);
-
radv_hash_rt_shaders(pipeline->sha1, pCreateInfo, &key, pipeline->groups,
radv_get_hash_flags(device, keep_statistic_info));
pipeline->base.base.pipeline_hash = *(uint64_t *)pipeline->sha1;