refactor(srp): add camera depth prepass planning bridge

This commit is contained in:
2026-04-21 16:56:20 +08:00
parent 1cb23cd178
commit 4300e45168
7 changed files with 123 additions and 2 deletions

View File

@@ -5938,6 +5938,35 @@ InternalCall_Rendering_ScriptableRenderPipelinePlanningContext_RequestDepthOnlyS
: 0;
}
mono_bool
InternalCall_Rendering_ScriptableRenderPipelinePlanningContext_RequestCameraDepthOnlyStage(
uint64_t nativeHandle) {
ManagedScriptableRenderPipelinePlanningContextState* const state =
FindManagedScriptableRenderPipelinePlanningContextState(nativeHandle);
if (state == nullptr || state->plan == nullptr) {
return 0;
}
Rendering::DepthOnlyRenderRequest& depthOnlyRequest =
state->plan->request.depthOnly;
depthOnlyRequest = {};
depthOnlyRequest.surface =
Rendering::CameraFramePlan::BuildCameraDepthOnlySurfaceTemplate(
state->plan->request.surface);
depthOnlyRequest.clearFlags =
Rendering::RenderClearFlags::Depth;
if (!depthOnlyRequest.IsValid()) {
depthOnlyRequest = {};
state->plan->ClearDepthOnlyStage(true);
return 0;
}
return state->plan->RequestDepthOnlyStage(true)
? 1
: 0;
}
void InternalCall_Rendering_ScriptableRenderPipelinePlanningContext_ClearDepthOnlyStage(
uint64_t nativeHandle) {
ManagedScriptableRenderPipelinePlanningContextState* const state =
@@ -6181,6 +6210,7 @@ void RegisterInternalCalls() {
mono_add_internal_call("XCEngine.InternalCalls::Rendering_ScriptableRenderPipelinePlanningContext_ClearShadowCasterStage", reinterpret_cast<const void*>(&InternalCall_Rendering_ScriptableRenderPipelinePlanningContext_ClearShadowCasterStage));
mono_add_internal_call("XCEngine.InternalCalls::Rendering_ScriptableRenderPipelinePlanningContext_GetHasExplicitShadowCasterStageConfiguration", reinterpret_cast<const void*>(&InternalCall_Rendering_ScriptableRenderPipelinePlanningContext_GetHasExplicitShadowCasterStageConfiguration));
mono_add_internal_call("XCEngine.InternalCalls::Rendering_ScriptableRenderPipelinePlanningContext_RequestDepthOnlyStage", reinterpret_cast<const void*>(&InternalCall_Rendering_ScriptableRenderPipelinePlanningContext_RequestDepthOnlyStage));
mono_add_internal_call("XCEngine.InternalCalls::Rendering_ScriptableRenderPipelinePlanningContext_RequestCameraDepthOnlyStage", reinterpret_cast<const void*>(&InternalCall_Rendering_ScriptableRenderPipelinePlanningContext_RequestCameraDepthOnlyStage));
mono_add_internal_call("XCEngine.InternalCalls::Rendering_ScriptableRenderPipelinePlanningContext_ClearDepthOnlyStage", reinterpret_cast<const void*>(&InternalCall_Rendering_ScriptableRenderPipelinePlanningContext_ClearDepthOnlyStage));
mono_add_internal_call("XCEngine.InternalCalls::Rendering_ScriptableRenderPipelinePlanningContext_GetHasExplicitDepthOnlyStageConfiguration", reinterpret_cast<const void*>(&InternalCall_Rendering_ScriptableRenderPipelinePlanningContext_GetHasExplicitDepthOnlyStageConfiguration));
mono_add_internal_call("XCEngine.InternalCalls::Rendering_ScriptableRenderPipelinePlanningContext_GetHasFinalColorProcessing", reinterpret_cast<const void*>(&InternalCall_Rendering_ScriptableRenderPipelinePlanningContext_GetHasFinalColorProcessing));