@@ -1010,7 +1010,7 @@ static VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesNormal(Device *la
1010
1010
1011
1011
// If pipeline compile fails due to pipeline cache control we get a null handle for pipeline, so we need to
1012
1012
// treat it as a failure.
1013
- if (res != VK_SUCCESS || !shouldRecord)
1013
+ if (( res != VK_SUCCESS && res != VK_OPERATION_DEFERRED_KHR && res != VK_OPERATION_NOT_DEFERRED_KHR) || !shouldRecord)
1014
1014
return res;
1015
1015
1016
1016
for (uint32_t i = 0 ; i < createInfoCount; i++)
@@ -1023,7 +1023,7 @@ static VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesNormal(Device *la
1023
1023
}
1024
1024
}
1025
1025
1026
- return VK_SUCCESS ;
1026
+ return res ;
1027
1027
}
1028
1028
1029
1029
static VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesParanoid (Device *layer,
@@ -1062,9 +1062,10 @@ static VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesParanoid(Device *
1062
1062
1063
1063
// Have to create all pipelines here, in case the application makes use of basePipelineIndex.
1064
1064
// Write arguments in TLS in-case we crash here.
1065
+ // Never defer operations when we're recording in paranoid mode,
1066
+ // since we need to observe the compilation on this thread.
1065
1067
Instance::braceForRayTracingPipelineCrash (&layer->getRecorder (), &info);
1066
- // FIXME: Can we meaningfully deal with deferredOperation here?
1067
- auto res = layer->getTable ()->CreateRayTracingPipelinesKHR (device, deferredOperation, pipelineCache, 1 , &info,
1068
+ auto res = layer->getTable ()->CreateRayTracingPipelinesKHR (device, VK_NULL_HANDLE, pipelineCache, 1 , &info,
1068
1069
pAllocator, &pPipelines[i]);
1069
1070
Instance::completedPipelineCompilation ();
1070
1071
@@ -1076,7 +1077,7 @@ static VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesParanoid(Device *
1076
1077
LOGW_LEVEL (" Failed to record compute pipeline, usually caused by unsupported pNext.\n " );
1077
1078
}
1078
1079
1079
- if (res == VK_PIPELINE_COMPILE_REQUIRED_EXT )
1080
+ if (res == VK_PIPELINE_COMPILE_REQUIRED )
1080
1081
final_res = res;
1081
1082
1082
1083
if (res < 0 )
@@ -1092,6 +1093,9 @@ static VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesParanoid(Device *
1092
1093
}
1093
1094
}
1094
1095
1096
+ if (final_res == VK_SUCCESS && deferredOperation)
1097
+ final_res = VK_OPERATION_NOT_DEFERRED_KHR;
1098
+
1095
1099
return final_res;
1096
1100
}
1097
1101
0 commit comments