streaming: deeper ready queue + startup apply cap; tile-local mouth-support culling (L72)

- Unreal: ready queue depth 8 -> 16 (cap 4 worker-sets / 64), startup mesh-apply cap
  12 -> 24 within the unchanged 14 ms budget. Owner SW arrival, same 2,850 keys:
  initial set ready 4.78 -> 3.74 s, queue p95 123 -> 35 ms, request-to-apply p95
  139 -> 45 ms; walkable gate 1.07 -> 1.11 s; per-frame apply p95 0.73 ms.
- Core composer: mouth-support segments filtered by tile bounds, mouth relief result reused
  (route checks -80/-87% in passage tiles). Hashes identical W1/W8/W12, Clang and GCC.
- Opt-in per-tile composer counters. Verify control meshes stored as .xz (78.5 -> 18.4 MB).
- Fast tier 269 PASS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
This commit is contained in:
Fr0zkaandClaude Opus 5.5 committed 2026-10-27 08:25:14 +01:00
1 parent 971206c2ea
commit d970d75be8
26 files changed
+383 -82

No files matched your search

@@ -46,6 +46,7 @@ namespace
bool ScreenSpaceGate=false;
bool AuditUniformBlockProofs=false;
bool ProfileLodWork=false;
bool ProfilePassageComposer=false;
bool InstrumentTileDrain=false;
bool ExactMidpointDensityMemo=false;
bool ActiveLaneBatching=false;
@@ -1439,6 +1440,7 @@ namespace
" --audit-uniform-block-proofs (fill and check every interval-certified block)\n"
" --profile-lod-work (report per-LOD density sample counts)\n"
" --instrument-tile-drain (opt-in CpuTileTimeline and per-tile stages/counters)\n"
" --profile-passage-composer (emit per-tile passage work counters)\n"
" --exact-midpoint-density-memo (exact-input midpoint query memo A/B)\n"
" --active-lane-batching --proof-block-cells=N (proof-masked density fill A/B)\n"
" --parallel-sign-edge-repair --serial-sign-edge-repair\n"
@@ -1494,6 +1496,8 @@ namespace
else if(arg=="--audit-uniform-block-proofs")options.AuditUniformBlockProofs=true;
else if(arg=="--profile-lod-work")options.ProfileLodWork=true;
else if(arg=="--instrument-tile-drain")options.InstrumentTileDrain=true;
else if(arg=="--profile-passage-composer")
{options.ProfilePassageComposer=true;options.InstrumentTileDrain=true;}
else if(arg=="--exact-midpoint-density-memo")options.ExactMidpointDensityMemo=true;
else if(arg=="--active-lane-batching")options.ActiveLaneBatching=true;
else if(arg=="--parallel-sign-edge-repair")
@@ -2214,5 +2218,5 @@ int main(int argc,char** argv)
options.ProofBlockCells,options.HasSignEdgeRepairOverride
?options.ParallelSignEdgeRepair:options.FloatingIslandsRecipe,
options.AuditNativeLattice,options.LatticeOrphanControl,
options.CaptureSkipWalkability);
options.CaptureSkipWalkability,options.ProfilePassageComposer);
}
+3 -1
View File
@@ -1872,7 +1872,8 @@ namespace StandaloneStreamBenchmark
bool bExactMidpointDensityMemo=false,
bool bActiveLaneBatching=false,int32 ProofBlockCells=8,
bool bParallelSignEdgeRepair=false,bool bAuditNativeLattice=false,
bool bLatticeOrphanControl=false,bool bCaptureSkipWalkability=false)
bool bLatticeOrphanControl=false,bool bCaptureSkipWalkability=false,
bool bProfilePassageComposer=false)
{
using Clock=std::chrono::steady_clock;
FStandaloneOwnerWorld& World=*OwnerWorld;
@@ -2037,6 +2038,7 @@ namespace StandaloneStreamBenchmark
FarHorizonLOD8InteriorStepVoxels,bUseSharedColumnCache);
Streamer.SetUniformBlockProofAuditEnabled(bAuditUniformBlockProofs);
Streamer.SetTileDrainInstrumentationEnabled(bInstrumentTileDrain);
Streamer.SetPassageComposerProfilingEnabled(bProfilePassageComposer);
Streamer.SetExactMidpointDensityMemoEnabled(bExactMidpointDensityMemo);
Streamer.SetActiveLaneBatchingEnabled(bActiveLaneBatching);
Streamer.SetProofBlockCells(ProofBlockCells);
+32
View File
@@ -710,6 +710,8 @@ public:
{bProfileMesherStages=Enabled;}
void SetTileDrainInstrumentationEnabled(bool Enabled)
{bInstrumentTileDrain=Enabled;}
void SetPassageComposerProfilingEnabled(bool Enabled)
{bProfilePassageComposer=Enabled;}
void SetExactMidpointDensityMemoEnabled(bool Enabled)
{bExactMidpointDensityMemo=Enabled;}
void SetActiveLaneBatchingEnabled(bool Enabled)
@@ -890,6 +892,7 @@ private:
Options.useSharedColumnCache=bSharedColumnCache;
Options.lod8HorizonInteriorStepVoxels=Lod8HorizonInteriorStepVoxels;
Options.profileMesherStages=(bProfileMesherStages||bInstrumentTileDrain)&&!ForceGenerate;
Options.profilePassageComposer=bProfilePassageComposer;
Options.instrumentTileDrain=bInstrumentTileDrain&&!ForceGenerate;
Options.exactMidpointDensityMemo=bExactMidpointDensityMemo&&!ForceGenerate;
Options.activeLaneBatching=bActiveLaneBatching&&!ForceGenerate;
@@ -1100,6 +1103,34 @@ private:
static_cast<unsigned long long>(D.islandSharedCacheComputes),
static_cast<unsigned long long>(D.islandSharedCacheConflictReplacements),
static_cast<double>(D.islandSharedCacheLockWaitNanoseconds)/1000.0);
if(D.passageComposerProfiled)
std::printf("[PassageComposerTile] key=(%d,%d,%d,lod%d) worker_ms=%.3f samples=%llu native_field_calls=%llu features=%llu route_candidates=%llu mouth_candidates=%llu queries=%llu passage_iterations=%llu upper_mouth_checks=%llu column_candidates=%llu column_distance_calls=%llu negative_bounds=%llu negative_rejects=%llu positive_bounds=%llu positive_rejects=%llu carve_segment_visits=%llu smooth_carve_joins=%llu support_segment_visits=%llu smooth_support_joins=%llu support_capsule_checks=%llu later_bore_checks=%llu other_capsule_checks=%llu mouth_support_calls=%llu mouth_route_segment_checks=%llu relief_field_calls=%llu smoothstep_evaluations=%llu\n",
Event.Key.Coord.X,Event.Key.Coord.Y,Event.Key.Coord.Z,Event.Key.Level,
Event.WorkerMilliseconds,static_cast<unsigned long long>(Event.DensitySamples),
static_cast<unsigned long long>(D.fieldCalls),
static_cast<unsigned long long>(D.passageTileFeatureCount),
static_cast<unsigned long long>(D.passageTileRouteSegmentCandidates),
static_cast<unsigned long long>(D.passageTileMouthSegmentCandidates),
static_cast<unsigned long long>(D.passageComposerQueries),
static_cast<unsigned long long>(D.passageIterations),
static_cast<unsigned long long>(D.passageUpperMouthFilterChecks),
static_cast<unsigned long long>(D.passageColumnCandidates),
static_cast<unsigned long long>(D.passageColumnDistanceCalls),
static_cast<unsigned long long>(D.passageNegativeBoundChecks),
static_cast<unsigned long long>(D.passageNegativeBoundRejects),
static_cast<unsigned long long>(D.passagePositiveBoundChecks),
static_cast<unsigned long long>(D.passagePositiveBoundRejects),
static_cast<unsigned long long>(D.passageCarveSegmentVisits),
static_cast<unsigned long long>(D.passageSmoothCarveJoins),
static_cast<unsigned long long>(D.passageSupportSegmentVisits),
static_cast<unsigned long long>(D.passageSmoothSupportJoins),
static_cast<unsigned long long>(D.passageSupportCapsuleChecks),
static_cast<unsigned long long>(D.passageLaterBoreChecks),
static_cast<unsigned long long>(D.passageOtherCapsuleChecks),
static_cast<unsigned long long>(D.passageMouthSupportCalls),
static_cast<unsigned long long>(D.passageMouthRouteSegmentChecks),
static_cast<unsigned long long>(D.passageReliefFieldCalls),
static_cast<unsigned long long>(D.passageSmoothstepEvaluations));
}
void RecordTimelineEvent(FStandaloneCpuTileTimelineEvent::EType Type,
const FVoxelTileKey& Key,int32 WorkerId,size_t QueueDepth,size_t ActiveWorkers,
@@ -1138,6 +1169,7 @@ private:
int32 Lod8HorizonInteriorStepVoxels=0;
bool bProfileMesherStages=false;
bool bInstrumentTileDrain=false;
bool bProfilePassageComposer=false;
bool bExactMidpointDensityMemo=false;
bool bActiveLaneBatching=false;
int32 ProofBlockCells=8;