From 28dcc5959d017a765c6598b8fce7d403ae283712 Mon Sep 17 00:00:00 2001 From: Konstantin Seurer Date: Mon, 11 Sep 2023 09:25:37 +0200 Subject: [PATCH] radv/rt: Handle stages without nir properly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: e039e3cd768bef6c21255aeef2b11cedf1ab29b9 ('radv/rt: Store NIR shaders separately') Reviewed-by: Daniel Schürmann Part-of: --- src/amd/vulkan/radv_pipeline_rt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_pipeline_rt.c b/src/amd/vulkan/radv_pipeline_rt.c index 42a37ca1640..810f6041b1d 100644 --- a/src/amd/vulkan/radv_pipeline_rt.c +++ b/src/amd/vulkan/radv_pipeline_rt.c @@ -263,7 +263,8 @@ radv_rt_fill_stage_info(const VkRayTracingPipelineCreateInfoKHR *pCreateInfo, st RADV_FROM_HANDLE(radv_pipeline, pipeline, pCreateInfo->pLibraryInfo->pLibraries[i]); struct radv_ray_tracing_pipeline *library_pipeline = radv_pipeline_to_ray_tracing(pipeline); for (unsigned j = 0; j < library_pipeline->stage_count; ++j) { - stages[idx].nir = vk_pipeline_cache_object_ref(library_pipeline->stages[j].nir); + if (library_pipeline->stages[j].nir) + stages[idx].nir = vk_pipeline_cache_object_ref(library_pipeline->stages[j].nir); if (library_pipeline->stages[j].shader) stages[idx].shader = vk_pipeline_cache_object_ref(library_pipeline->stages[j].shader);