From 89eefdcadb178e38ce9ed6d493970039e101d1e8 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Fri, 31 Oct 2025 10:58:29 +0000 Subject: [PATCH] radv: fix when incomplete rt pipeline libraries are loaded from cache It might be that the radv_pipeline_cache_lookup_nir_handle() in radv_ray_tracing_pipeline_cache_search() fails but we will later need the NIR. If rt_stages[i].shader was non-NULL, then we would not have created the NIR. Signed-off-by: Rhys Perry Backport-to: 25.2 Reviewed-by: Konstantin Seurer Part-of: --- src/amd/vulkan/radv_pipeline_rt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/vulkan/radv_pipeline_rt.c b/src/amd/vulkan/radv_pipeline_rt.c index f3847fa088d..201c3139bcd 100644 --- a/src/amd/vulkan/radv_pipeline_rt.c +++ b/src/amd/vulkan/radv_pipeline_rt.c @@ -674,7 +674,7 @@ radv_rt_compile_shaders(struct radv_device *device, struct vk_pipeline_cache *ca bool can_use_monolithic = !library && pipeline->stage_count < 50; for (uint32_t i = 0; i < pCreateInfo->stageCount; i++) { - if (rt_stages[i].shader || rt_stages[i].nir) + if (rt_stages[i].nir) continue; int64_t stage_start = os_time_get_nano(); @@ -749,7 +749,7 @@ radv_rt_compile_shaders(struct radv_device *device, struct vk_pipeline_cache *ca inline_any_hit_shaders |= raygen_lowering_mode == RADV_RT_LOWERING_MODE_MONOLITHIC && !raygen_imported; for (uint32_t idx = 0; idx < pCreateInfo->stageCount; idx++) { - if (rt_stages[idx].shader || rt_stages[idx].nir) + if (rt_stages[idx].nir) continue; int64_t stage_start = os_time_get_nano();