diff --git a/.pick_status.json b/.pick_status.json index 7d8c6b14b6c..c5349275773 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2904,7 +2904,7 @@ "description": "radv/rt: Handle monolithic pipelines in capture/replay", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/amd/vulkan/radv_pipeline_rt.c b/src/amd/vulkan/radv_pipeline_rt.c index b2f6ccf2a54..ae4de3d258b 100644 --- a/src/amd/vulkan/radv_pipeline_rt.c +++ b/src/amd/vulkan/radv_pipeline_rt.c @@ -193,7 +193,8 @@ radv_rt_fill_group_info(struct radv_device *device, const struct radv_ray_tracin } else if (groups[idx].recursive_shader != VK_SHADER_UNUSED_KHR) { struct radv_shader *library_shader = stages[groups[idx].recursive_shader].shader; simple_mtx_lock(&library_shader->replay_mtx); - if (!library_shader->has_replay_alloc) { + /* If arena_va is 0, the pipeline is monolithic and the shader was inlined into raygen */ + if (!library_shader->has_replay_alloc && handle->recursive_shader_alloc.arena_va) { union radv_shader_arena_block *new_block = radv_replay_shader_arena_block(device, &handle->recursive_shader_alloc, library_shader); if (!new_block) { @@ -942,7 +943,8 @@ radv_GetRayTracingCaptureReplayShaderGroupHandlesKHR(VkDevice device, VkPipeline uint32_t recursive_shader = rt_pipeline->groups[firstGroup + i].recursive_shader; if (recursive_shader != VK_SHADER_UNUSED_KHR) { struct radv_shader *shader = rt_pipeline->stages[recursive_shader].shader; - data[i].recursive_shader_alloc = radv_serialize_shader_arena_block(shader->alloc); + if (shader) + data[i].recursive_shader_alloc = radv_serialize_shader_arena_block(shader->alloc); } data[i].non_recursive_idx = rt_pipeline->groups[firstGroup + i].handle.any_hit_index; }