From 8c84083a1705aedfbe95b919939c37d96286eb7f 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: (cherry picked from commit 12c71ef847c18fe2025f946d53009de314f13b1d) --- .pick_status.json | 2 +- src/amd/vulkan/radv_pipeline_rt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index d15b9bb7cda..2add70b4b36 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/amd/vulkan/radv_pipeline_rt.c b/src/amd/vulkan/radv_pipeline_rt.c index ae4de3d258b..fe078b89495 100644 --- a/src/amd/vulkan/radv_pipeline_rt.c +++ b/src/amd/vulkan/radv_pipeline_rt.c @@ -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; }