From 12c71ef847c18fe2025f946d53009de314f13b1d Mon Sep 17 00:00:00 2001 From: Konstantin Seurer Date: Wed, 14 Feb 2024 16:10:14 +0100 Subject: [PATCH] radv/rt: Fix raygen_imported condition This can cause GPU hangs if the imported raygen shader is the first shader of the library. Fixes: 0f87d40 ("radv/rt: Skip compiling a traversal shader") Reviewed-by: Friedrich Vock Part-of: --- src/amd/vulkan/radv_pipeline_rt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_pipeline_rt.c b/src/amd/vulkan/radv_pipeline_rt.c index c3d69848c68..d5667d1ea56 100644 --- a/src/amd/vulkan/radv_pipeline_rt.c +++ b/src/amd/vulkan/radv_pipeline_rt.c @@ -613,7 +613,7 @@ radv_rt_compile_shaders(struct radv_device *device, struct vk_pipeline_cache *ca has_callable |= rt_stages[i].stage == MESA_SHADER_CALLABLE; monolithic &= rt_stages[i].info.can_inline; - if (i > pCreateInfo->stageCount) + if (i >= pCreateInfo->stageCount) raygen_imported |= rt_stages[i].stage == MESA_SHADER_RAYGEN; }