Why does vkCreateRayTracingPipelinesKHR takes so long?


I am working a vulkan ray tracing program, and find "vkCreateRayTracingPipelinesKHR " takes 3-4 seconds, why does it takes so long?

I have tried using PipelineCache, as this example shows(https://github.com/LunarG/VulkanSamples/blob/master/API-Samples/pipeline_cache/pipeline_cache.cpp). But it doesn’t seems to save the time.

Anybody give me a hint?


just find that the pipeline creation time is proportional to the length of shader code…