refactor(lifetime): own render resource prefixes

Give terrain, sky, retained UI, portal preparation, and the update/render frame pair explicit single owners. Make shader, texture, text, bindless, and GL construction prefixes checked and retryable so partial failure cannot lose or replay resource ownership.

Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-22 14:42:14 +02:00
parent fec0d94148
commit c87b15303d
41 changed files with 3768 additions and 355 deletions

View file

@ -43,8 +43,9 @@ public sealed class GameWindowRenderLeafCompositionTests
AssertAppearsInOrder(
source,
"_portalTunnelFallback.Transfer(",
"new AcDream.App.Streaming.LocalPlayerTeleportController(",
"_portalTunnel = null;",
"new AcDream.App.Streaming.LocalPlayerTeleportPresentation(",
"_localPlayerTeleportSink.Bind(_localPlayerTeleport);",
"new AcDream.App.Rendering.LocalPlayerTeleportRenderStateSource(",
"new AcDream.App.Rendering.RenderFrameResourceController(",
@ -125,7 +126,7 @@ public sealed class GameWindowRenderLeafCompositionTests
AssertAppearsInOrder(
source,
"new ResourceShutdownStage(\"frame borrowers\"",
"_renderFrameOrchestrator = null;",
"_frameGraphs.Withdraw();",
"new ResourceShutdownStage(\"session dependents\"");
AssertAppearsInOrder(
source,
@ -133,7 +134,7 @@ public sealed class GameWindowRenderLeafCompositionTests
"new(\"frame profiler\", _frameProfiler.Dispose)");
AssertAppearsInOrder(
source,
"_renderFrameOrchestrator = null;",
"_frameGraphs.Withdraw();",
"_devToolsBackend?.Dispose()",
"new ResourceShutdownStage(\"input\"",
"_input?.Dispose();",
@ -175,7 +176,7 @@ public sealed class GameWindowRenderLeafCompositionTests
Assert.True(start >= 0 && end > start);
string body = source[start..end];
Assert.Equal(1, CountOccurrences(body, "_renderFrameOrchestrator!.Render("));
Assert.Equal(1, CountOccurrences(body, "_frameGraphs.Render("));
Assert.DoesNotContain("_gpuFrameFlights", body);
Assert.DoesNotContain("_worldScene", body);
Assert.DoesNotContain("_devToolsFramePresenter", body);