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:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user