perf(core): tile-drain instrumentation; parallel FI sign-edge repair, FI first tile 1.28 -> 0.85 s (L55); R24

Opt-in --instrument-tile-drain records per-tile queue/dispatch/finish timelines, stage spans and counters
(proof skips, X8 lanes, GradAt/midpoint memo, skirts, FI cache stats); <2% when off. Measured: SW 13.3 and
FI 50.2 worker-s across LOD0-8, tails are work-saturated. FI sign-edge repair now computes in parallel and
publishes in sorted serial order (exact output): sign-edge 535 -> 47 ms, FI first tile 1.28 -> 0.85 s, near
ring 1.46 -> 1.04 s, whole view 6.09 -> 5.65 s. Proof block size, lane batching, SW midpoint memo and helper
cap 12 measured and left off. fast/medium/full PASS, Clang and GCC. Research R24: slab + motif generator.

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-25 06:16:07 +01:00
1 parent e35a77f676
commit aee1487410
13 files changed
+882 -74

No files matched your search

+20 -2
View File
@@ -1422,7 +1422,10 @@ namespace StandaloneStreamBenchmark
bool bAuditStrateTransitions=false,
const VoxelForgeCore::ResolvedLayoutSnapshotV3* ResolvedLayout=nullptr,
bool bPrintTileHashes=false,bool bAuditLandmarkReachability=false,
bool bAuditOreVeinYield=false,bool bAuditNativeCaves=false)
bool bAuditOreVeinYield=false,bool bAuditNativeCaves=false,
bool bInstrumentTileDrain=false,bool bExactMidpointDensityMemo=false,
bool bActiveLaneBatching=false,int32 ProofBlockCells=8,
bool bParallelSignEdgeRepair=false)
{
using Clock=std::chrono::steady_clock;
FStandaloneOwnerWorld& World=*OwnerWorld;
@@ -1575,6 +1578,7 @@ namespace StandaloneStreamBenchmark
ShapeRequest.clipMinVoxel={ClipMin.X,ClipMin.Y,ClipMin.Z};
ShapeRequest.clipMaxVoxel={ClipMax.X,ClipMax.Y,ClipMax.Z};
ShapeRequest.workerLimit=static_cast<uint32>(std::clamp(WorkerCount,1,16));
ShapeRequest.parallelSignEdgeRepair=bParallelSignEdgeRepair;
ShapeRequest.detail=DetailVariant;ShapeRequest.includeFarWorld=bIncludeFarWorld;
ShapeRequest.roundTunnels=bRoundTunnels;
ShapeRequest.enhancedTunnelWalls=bEnhancedTunnelWalls;
@@ -1582,7 +1586,20 @@ namespace StandaloneStreamBenchmark
bSkipUvAndColors,bSkipMaterialGroups,bSkipUV,bSkipColors,&Shape,bProfileColumnOverlap,
FarHorizonLOD8InteriorStepVoxels,bUseSharedColumnCache);
Streamer.SetUniformBlockProofAuditEnabled(bAuditUniformBlockProofs);
if(bScreenSpaceGate||bReportLodWorkProfile)Streamer.SetMesherStageProfilingEnabled(true);
Streamer.SetTileDrainInstrumentationEnabled(bInstrumentTileDrain);
Streamer.SetExactMidpointDensityMemoEnabled(bExactMidpointDensityMemo);
Streamer.SetActiveLaneBatchingEnabled(bActiveLaneBatching);
Streamer.SetProofBlockCells(ProofBlockCells);
if(bScreenSpaceGate||bReportLodWorkProfile||bInstrumentTileDrain)
Streamer.SetMesherStageProfilingEnabled(true);
if(bInstrumentTileDrain)
{
Streamer.EnableColdTimelineTrace(ColdStart,nullptr);
std::printf("[CpuTileInstrumentation] enabled=true labeled=true flush=after_run proof_block_cells=%d active_lane_batching=%s midpoint_density_memo=%s parallel_sign_edge_repair=%s\n",
ProofBlockCells,bActiveLaneBatching?"on":"off",
bExactMidpointDensityMemo?"on":"off",
bParallelSignEdgeRepair?"on":"off");
}
const auto StreamStart=Clock::now();
const FStandaloneStreamingUpdate EarlyUpdate=Streamer.StartWithDesired(ShapeFreeDesired);
if(EarlyUpdate.DesiredTiles!=static_cast<int32>(ShapeFreeDesired.Tiles.size()))
@@ -4830,6 +4847,7 @@ namespace StandaloneStreamBenchmark
}
}
Streamer.Stop();
Streamer.DumpColdTimelineTrace();
bool bScreenSpaceGatePassing=true;
if(bScreenSpaceGate)
{