refactor(srp): unify managed pipeline instance ownership

Move shared managed ScriptableRenderPipeline instance ownership into MonoManagedRenderPipelineAssetRuntime.

Make stage recorders borrow the runtime-owned pipeline instead of creating and destroying private handles.

Add a regression test that locks one CreatePipeline call across multiple stage recorders.
This commit is contained in:
2026-04-20 00:44:09 +08:00
parent cbc0ddbd42
commit beaf5809d5
4 changed files with 272 additions and 37 deletions

View File

@@ -1306,6 +1306,23 @@ namespace Gameplay
}
}
public sealed class ManagedRenderPipelineCreateCountObservationProbe
: MonoBehaviour
{
public int ObservedCreatePipelineCallCount;
public void Start()
{
ManagedRenderPipelineProbeAsset.CreatePipelineCallCount = 0;
}
public void Update()
{
ObservedCreatePipelineCallCount =
ManagedRenderPipelineProbeAsset.CreatePipelineCallCount;
}
}
public sealed class ScriptCoreUniversalRenderPipelineSelectionProbe
: MonoBehaviour
{