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>
(cherry picked from commit 12c71ef847)
This commit is contained in:
Konstantin Seurer 2024-02-14 16:10:14 +01:00 committed by Eric Engestrom
parent ead9441e18
commit 8c84083a17
2 changed files with 2 additions and 2 deletions

View File

@ -644,7 +644,7 @@
"description": "radv/rt: Fix raygen_imported condition",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "0f87d406b58aa103ae67f3cc8a694c1343d8f8ed",
"notes": null

View File

@ -536,7 +536,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].can_inline;
if (i > pCreateInfo->stageCount)
if (i >= pCreateInfo->stageCount)
raygen_imported |= rt_stages[i].stage == MESA_SHADER_RAYGEN;
}