feat(rendering): establish current-path scene referee

Capture deterministic, landblock-aware fingerprints from the accepted partition only during lifecycle automation. This gives the F/G shadow scene an independent oracle without changing normal draw decisions or adding disabled-path per-entity cost.
This commit is contained in:
Erik 2026-07-24 21:13:11 +02:00
parent 5ecaa5612d
commit b2b67341ac
9 changed files with 845 additions and 5 deletions

View file

@ -2,6 +2,7 @@ using System.Text.Json;
using AcDream.App.Diagnostics;
using AcDream.App.Rendering;
using AcDream.App.Rendering.Residency;
using AcDream.App.Rendering.Scene;
using AcDream.App.Streaming;
using AcDream.App.UI.Testing;
using SixLabors.ImageSharp;
@ -114,6 +115,18 @@ public sealed class WorldLifecycleAutomationControllerTests
{
LoadedLandblocks = 1,
WorldEntities = 42,
RenderSceneOracle = new CurrentRenderSceneOracleSnapshot(
Enabled: true,
CompletedFrameSequence: 19,
AbortedFrames: 1,
ProjectionCount: 73,
OutdoorStaticCount: 41,
CellStaticCount: 20,
DynamicCount: 12,
CellBucketCount: 4,
Digest: new RenderSceneHash128(
Low: 0x0123456789ABCDEF,
High: 0xFEDCBA9876543210)),
TrackedGpuBytes = 1234,
Residency = new ResidencySnapshot(
[
@ -166,6 +179,24 @@ public sealed class WorldLifecycleAutomationControllerTests
Assert.True(json.RootElement.GetProperty("render").GetProperty("presentation")
.GetProperty("screenshotCaptured").GetBoolean());
Assert.Equal(42, json.RootElement.GetProperty("resources").GetProperty("worldEntities").GetInt32());
JsonElement renderSceneOracle = json.RootElement
.GetProperty("resources")
.GetProperty("renderSceneOracle");
Assert.True(renderSceneOracle.GetProperty("enabled").GetBoolean());
Assert.Equal(
19,
renderSceneOracle.GetProperty("completedFrameSequence").GetInt64());
Assert.Equal(
73,
renderSceneOracle.GetProperty("projectionCount").GetInt32());
Assert.Equal(
0x0123456789ABCDEFuL,
renderSceneOracle.GetProperty("digest").GetProperty("low")
.GetUInt64());
Assert.Equal(
0xFEDCBA9876543210uL,
renderSceneOracle.GetProperty("digest").GetProperty("high")
.GetUInt64());
JsonElement residency = json.RootElement
.GetProperty("resources")
.GetProperty("residency");
@ -304,7 +335,8 @@ public sealed class WorldLifecycleAutomationControllerTests
directory);
private static WorldLifecycleResourceSnapshot EmptyResources() => new(
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, CurrentRenderSceneOracleSnapshot.Disabled,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0L, 0, 0L, 0L, 0L, 0L, 0, 0, 0, 0, 0, 0, 0, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
default, default, 0d, 0d, null);