From ac72225800b7873b862243f832c47aabfd65a04f 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 (cherry picked from commit 89eefdcadb178e38ce9ed6d493970039e101d1e8) Part-of: --- .pick_status.json | 2 +- src/amd/vulkan/radv_pipeline_rt.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index cdd1b1137ee..0303af708cd 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -114,7 +114,7 @@ "description": "radv: fix when incomplete rt pipeline libraries are loaded from cache", "nominated": true, "nomination_type": 4, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/amd/vulkan/radv_pipeline_rt.c b/src/amd/vulkan/radv_pipeline_rt.c index 1d5b0e24c07..6c0bf9666c9 100644 --- a/src/amd/vulkan/radv_pipeline_rt.c +++ b/src/amd/vulkan/radv_pipeline_rt.c @@ -616,7 +616,7 @@ radv_rt_compile_shaders(struct radv_device *device, struct vk_pipeline_cache *ca */ bool 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(); @@ -651,7 +651,7 @@ radv_rt_compile_shaders(struct radv_device *device, struct vk_pipeline_cache *ca } 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();