refactor(srp): remove managed frame planning hook

- derive fullscreen stage planning from pipeline render-graph support
- trim planning-only APIs from the managed SRP bridge and public surface
- update probes and tests to lock the slimmer SRP API boundary
This commit is contained in:
2026-04-19 13:47:20 +08:00
parent 08e2b38df2
commit 537d7d99fc
19 changed files with 179 additions and 517 deletions

View File

@@ -1,69 +0,0 @@
using System;
using XCEngine;
namespace XCEngine.Rendering
{
public sealed class ScriptableRenderPipelinePlanningContext
{
private readonly ulong m_nativeHandle;
internal ScriptableRenderPipelinePlanningContext(ulong nativeHandle)
{
m_nativeHandle = nativeHandle;
}
public void ClearFullscreenStage(
CameraFrameStage stage)
{
ValidateFullscreenStage(stage);
InternalCalls.Rendering_ScriptableRenderPipelinePlanningContext_ClearFullscreenStage(
m_nativeHandle,
(int)stage);
}
public void RequestFullscreenStage(
CameraFrameStage stage,
CameraFrameColorSource source,
bool usesGraphManagedOutputColor = false)
{
ValidateFullscreenStage(stage);
if (source == CameraFrameColorSource.ExplicitSurface)
{
throw new ArgumentException(
"Managed planning currently requires a graph-managed color source for fullscreen stages.",
nameof(source));
}
if (stage == CameraFrameStage.FinalOutput && usesGraphManagedOutputColor)
{
throw new ArgumentException(
"FinalOutput fullscreen stages cannot publish a graph-managed output color.",
nameof(usesGraphManagedOutputColor));
}
if (!InternalCalls
.Rendering_ScriptableRenderPipelinePlanningContext_RequestFullscreenStage(
m_nativeHandle,
(int)stage,
(int)source,
usesGraphManagedOutputColor))
{
throw new InvalidOperationException(
$"Failed to request the managed fullscreen stage '{stage}'.");
}
}
private static void ValidateFullscreenStage(
CameraFrameStage stage)
{
if (stage != CameraFrameStage.PostProcess &&
stage != CameraFrameStage.FinalOutput)
{
throw new ArgumentException(
"Managed planning currently supports only fullscreen sequence stages.",
nameof(stage));
}
}
}
}