fix(rendering): decouple portal warmup discovery

Scan published destination candidates under a separate bounded budget from expensive mesh and composite preparation so large retained worlds cannot exhaust the reveal window before candidate discovery completes.

The correction is valid on both the retained and pre-cutover draw paths, so the G4 visual rollback remains the single commit ef1d263337.

Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-25 04:27:17 +02:00
parent a7cddc65d7
commit 129dd77ddd
2 changed files with 44 additions and 5 deletions

View file

@ -56,6 +56,28 @@ public sealed class WbDrawDispatcherCompositeWarmupTests
entityGeneration: 42));
}
[Fact]
public void LargeRetainedWorldDiscoveryConvergesIndependentlyOfUploadBudget()
{
const int entityCount = 21_025;
int scanIndex = 0;
int frameCount = 0;
while (scanIndex < entityCount)
{
scanIndex = WbDrawDispatcher.CompositeWarmupScanEnd(
scanIndex,
entityCount);
frameCount++;
}
Assert.Equal(6, frameCount);
Assert.Equal(entityCount, scanIndex);
Assert.True(
WbDrawDispatcher.MaximumCompositeWarmupScanEntitiesPerFrame
> WbDrawDispatcher.MaximumCompositeWarmupPrepareEntitiesPerFrame);
}
[Fact]
public void PaletteEntityInsideDestinationRadiusIsCandidate()
{