_mesa_sha1_update(&ctx, &groups[i].handle, sizeof(struct radv_pipeline_group_handle));
}
+ if (pCreateInfo->pLibraryInfo) {
+ for (uint32_t i = 0; i < pCreateInfo->pLibraryInfo->libraryCount; ++i) {
+ RADV_FROM_HANDLE(radv_pipeline, lib_pipeline, pCreateInfo->pLibraryInfo->pLibraries[i]);
+ struct radv_ray_tracing_lib_pipeline *lib = radv_pipeline_to_ray_tracing_lib(lib_pipeline);
+ _mesa_sha1_update(&ctx, lib->sha1, SHA1_DIGEST_LENGTH);
+ }
+ }
+
const uint32_t pipeline_flags =
pCreateInfo->flags & (VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR |
VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR |
RADV_FROM_HANDLE(radv_device, device, _device);
struct radv_ray_tracing_lib_pipeline *pipeline;
VkResult result = VK_SUCCESS;
+ bool keep_statistic_info = radv_pipeline_capture_shader_stats(device, pCreateInfo->flags);
VkRayTracingPipelineCreateInfoKHR local_create_info =
radv_create_merged_rt_create_info(pCreateInfo);
radv_pipeline_init(device, &pipeline->base, RADV_PIPELINE_RAY_TRACING_LIB);
+ struct radv_pipeline_key key =
+ radv_generate_pipeline_key(device, &pipeline->base, pCreateInfo->flags);
+
pipeline->ctx = ralloc_context(NULL);
result = radv_rt_fill_group_info(device, pCreateInfo, pipeline->groups);
memcpy(pipeline->group_infos, local_create_info.pGroups, size);
}
+ radv_hash_rt_shaders(pipeline->sha1, pCreateInfo, &key, pipeline->groups,
+ radv_get_hash_flags(device, keep_statistic_info));
+
*pPipeline = radv_pipeline_to_handle(&pipeline->base);
pipeline_fail:
struct radv_pipeline_key key = radv_generate_rt_pipeline_key(device, rt_pipeline, pCreateInfo->flags);
- radv_hash_rt_shaders(hash, &local_create_info, &key, rt_pipeline->groups,
+ radv_hash_rt_shaders(hash, pCreateInfo, &key, rt_pipeline->groups,
radv_get_hash_flags(device, keep_statistic_info));
/* First check if we can get things from the cache before we take the expensive step of