perf(streaming): scope reveal warmup spatially

Source composite warmup from the canonical published destination neighborhood, including quiesced static and live projections, instead of rescanning the retained Far-tier world after every membership edge.

This lifecycle correction applies to both draw paths, preserving ef1d263337 as the sole G4 visual rollback.

Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-25 04:39:48 +02:00
parent 129dd77ddd
commit 03b10183e9
5 changed files with 212 additions and 6 deletions

View file

@ -508,6 +508,42 @@ public sealed class GpuWorldStateVisibilityTests
Assert.DoesNotContain(destination, pair => pair.Key == 0u);
}
[Fact]
public void ReadinessNeighborhood_CopiesStaticAndLiveWhileWorldIsQuiesced()
{
var availability = new WorldGenerationAvailabilityState();
availability.Begin(7);
var centerStatic = Entity(1, 0u);
var centerLive = Entity(2, 0x70000001u);
var neighborStatic = Entity(3, 0u);
var farStatic = Entity(4, 0u);
var state = new GpuWorldState(availability: availability);
state.AddLandblock(new LoadedLandblock(
0x1010FFFFu,
new LandBlock(),
new[] { centerStatic, centerLive }));
state.AddLandblock(new LoadedLandblock(
0x1110FFFFu,
new LandBlock(),
new[] { neighborStatic }));
state.AddLandblock(new LoadedLandblock(
0x1310FFFFu,
new LandBlock(),
new[] { farStatic }));
var destination = new List<WorldEntity> { farStatic };
state.CopyPublishedEntitiesNearLandblockForReadiness(
0x10100001u,
1,
destination);
Assert.Equal(3, destination.Count);
Assert.Contains(centerStatic, destination);
Assert.Contains(centerLive, destination);
Assert.Contains(neighborStatic, destination);
Assert.DoesNotContain(farStatic, destination);
}
private static WorldEntity Entity(uint id, uint guid) => new()
{
Id = id,