radv/rt: insert shaders to cache right after they are compiled

No need postpone this.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28760>
This commit is contained in:
Samuel Pitoiset
2024-04-16 13:33:08 +02:00
committed by Marge Bot
parent 6dc5b6ee60
commit 07f3b9aaed
+3 -3
View File
@@ -915,6 +915,9 @@ radv_rt_pipeline_create(VkDevice _device, VkPipelineCache _cache, const VkRayTra
if (result != VK_SUCCESS)
goto fail;
if (!skip_shaders_cache)
radv_ray_tracing_pipeline_cache_insert(device, cache, pipeline, pCreateInfo->stageCount, pipeline->sha1);
}
if (!(pipeline->base.base.create_flags & VK_PIPELINE_CREATE_2_LIBRARY_BIT_KHR)) {
@@ -926,9 +929,6 @@ radv_rt_pipeline_create(VkDevice _device, VkPipelineCache _cache, const VkRayTra
radv_rmv_log_rt_pipeline_create(device, pipeline);
if (!cache_hit && !skip_shaders_cache)
radv_ray_tracing_pipeline_cache_insert(device, cache, pipeline, pCreateInfo->stageCount, pipeline->sha1);
/* write shader VAs into group handles */
for (unsigned i = 0; i < pipeline->group_count; i++) {
if (pipeline->groups[i].recursive_shader != VK_SHADER_UNUSED_KHR) {