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 <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27137>
This commit is contained in:
Konstantin Seurer 2024-02-14 16:10:14 +01:00 committed by Marge Bot
parent 0e8f2eca9e
commit 12c71ef847

View File

@ -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;
}