radv/rt: Only compare the non-recursive capture/replay handle
authorFriedrich Vock <friedrich.vock@gmx.de>
Fri, 2 Jun 2023 15:36:31 +0000 (17:36 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 5 Jul 2023 15:58:25 +0000 (15:58 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23516>

src/amd/vulkan/radv_pipeline_rt.c

index e89793a..ed7777b 100644 (file)
@@ -149,9 +149,9 @@ radv_create_group_handles(struct radv_device *device, const VkRayTracingPipeline
          unreachable("VK_SHADER_GROUP_SHADER_MAX_ENUM_KHR");
       }
 
-      if (capture_replay) {
-         if (group_info->pShaderGroupCaptureReplayHandle &&
-             memcmp(group_info->pShaderGroupCaptureReplayHandle, &groups[i].handle, sizeof(groups[i].handle)) != 0) {
+      if (group_info->pShaderGroupCaptureReplayHandle) {
+         const struct radv_rt_capture_replay_handle *handle = group_info->pShaderGroupCaptureReplayHandle;
+         if (memcmp(&handle->non_recursive_idx, &groups[i].handle.any_hit_index, sizeof(uint32_t)) != 0) {
             return VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS;
          }
       }