perf(generation): per-tile reach test skips landing and structural posts -- ~12% less worker CPU
The remove-one ablation put landing posts at ~10% and passage structural posts at ~6% of worker time, though landings exist only near passage ends and the origin. The parked exact-cull round's per-SAMPLE post bounds had been a net loss. This round decides reach once per TILE (Codex; reviewed by me). - VoxelTilePostReach.h: one per-tile reach mask (thread-local byte), set when the tile is set up. The origin landing, passage landing SDF/floors, native floors, tunnel air and passage structural posts return their input unchanged on tiles no instance can reach. Per sample this costs an inline flag read. - Reach proofs come from each post's geometry (origin rooms, landing SDF and floors, native floor band, structural support spheres), not from comments. - voxel.TilePostReachDebug=1 evaluates the skipped posts anyway and compares the FINAL field; voxel.TilePostReachScale=0.5 deliberately shrinks the reach and must fail. Default build: 694 tiles, landing reachable on 4 (skipped on 690), structural posts skipped on 169. Soundness: 123,958,673 comparisons, 0 differences; shrunk reach: 13,929 differences, FAIL as required. Final DEFAULT build vs the committed-tip DLL (same command line, two interleaved runs each): static worker 34.80 -> 30.52 s (-12%) LOD0 generation p50/p95 67.0/107.6 -> 55.8/95.8 ms moving worker 75.96 -> 66.66 s (-12%) LOD0 generation p50/p95 66.3/106.0 -> 56.0/95.8 ms Field exact: 841/841 keyed tiles vs a fresh committed-tip trace (669,902 triangles, which includes 9260775's gap floors), export b3e5f4c3..9b377, capability 20,830 / 10,909; strate-crossing and sealed-proof tests pass. Ledger: all launches passed or failed where designed to; early raw-SDF debug attempts failed until the comparator was corrected to compare the final field. No crash folders. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TaFdXhTdYMkW1xrV6ApT6Y
This commit is contained in:
1 parent
92607751b1
commit
ce4d8783e9
7 files changed
+790
-20
No files matched your search
@@ -19,6 +19,7 @@
|
||||
#include "VoxelStats.h"
|
||||
#include "VoxelCaveMorphology.h"
|
||||
#include "VoxelPassageGeometry.h"
|
||||
#include "VoxelTilePostReach.h"
|
||||
// IWYU (FPSemantics = Precise ⇒ plus de PCH partagé) : GetPlayerPosition déréférence le pawn, donc
|
||||
// APawn doit être COMPLET — `Casts.h` n'en donne qu'une déclaration avant. APlayerController était
|
||||
// complet par transitivité seulement : on l'inclut explicitement, c'est exactement la fragilité
|
||||
@@ -1132,6 +1133,98 @@ void AVoxelWorld::EndPlay(const EEndPlayReason::Type EndPlayReason)
|
||||
}
|
||||
VoxelCaveMorphology::LogPlayerFitMemoStats();
|
||||
LogStreamingLatencySummary();
|
||||
const uint64 TilePostReachDifferences =
|
||||
VoxelGenLOD::GSkippedPostDifferences.load(std::memory_order_relaxed);
|
||||
UE_LOG(LogTemp, Display,
|
||||
TEXT("[VoxelForgeTilePostReach] tiles=%llu origin_reachable=%llu origin_skipped=%llu "
|
||||
"passage_landing_reachable=%llu passage_landing_skipped=%llu "
|
||||
"passage_structural_reachable=%llu passage_structural_skipped=%llu "
|
||||
"debug=%d comparisons=%llu differences=%llu"),
|
||||
static_cast<unsigned long long>(
|
||||
VoxelGenLOD::GTilePostReachTileCount.load(std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(
|
||||
VoxelGenLOD::GOriginLandingReachableTiles.load(std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(
|
||||
VoxelGenLOD::GOriginLandingSkippedTiles.load(std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(
|
||||
VoxelGenLOD::GPassageLandingReachableTiles.load(std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(
|
||||
VoxelGenLOD::GPassageLandingSkippedTiles.load(std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(
|
||||
VoxelGenLOD::GPassageStructuralReachableTiles.load(std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(
|
||||
VoxelGenLOD::GPassageStructuralSkippedTiles.load(std::memory_order_relaxed)),
|
||||
VoxelGenLOD::GTilePostReachDebugEnabled.load(std::memory_order_relaxed) ? 1 : 0,
|
||||
static_cast<unsigned long long>(
|
||||
VoxelGenLOD::GSkippedPostComparisons.load(std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(TilePostReachDifferences));
|
||||
UE_LOG(LogTemp, Display,
|
||||
TEXT("[VoxelForgeTilePostReachKinds] comparisons="
|
||||
"origin_air=%llu/origin_floor=%llu/passage_sdf=%llu/landing_air=%llu/"
|
||||
"tunnel_air=%llu/landing_floor=%llu/structural=%llu/native_floor=%llu/room_floor=%llu "
|
||||
"differences=%llu/%llu/%llu/%llu/%llu/%llu/%llu/%llu/%llu"),
|
||||
static_cast<unsigned long long>(VoxelGenLOD::GSkippedPostComparisonsByKind[
|
||||
static_cast<uint8>(VoxelGenLOD::ETilePostComparisonKind::OriginAir)].load(
|
||||
std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(VoxelGenLOD::GSkippedPostComparisonsByKind[
|
||||
static_cast<uint8>(VoxelGenLOD::ETilePostComparisonKind::OriginFloor)].load(
|
||||
std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(VoxelGenLOD::GSkippedPostComparisonsByKind[
|
||||
static_cast<uint8>(VoxelGenLOD::ETilePostComparisonKind::PassageLandingSDF)].load(
|
||||
std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(VoxelGenLOD::GSkippedPostComparisonsByKind[
|
||||
static_cast<uint8>(VoxelGenLOD::ETilePostComparisonKind::PassageLandingAir)].load(
|
||||
std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(VoxelGenLOD::GSkippedPostComparisonsByKind[
|
||||
static_cast<uint8>(VoxelGenLOD::ETilePostComparisonKind::PassageTunnelAir)].load(
|
||||
std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(VoxelGenLOD::GSkippedPostComparisonsByKind[
|
||||
static_cast<uint8>(VoxelGenLOD::ETilePostComparisonKind::PassageLandingFloor)].load(
|
||||
std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(VoxelGenLOD::GSkippedPostComparisonsByKind[
|
||||
static_cast<uint8>(VoxelGenLOD::ETilePostComparisonKind::PassageStructuralPosts)].load(
|
||||
std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(VoxelGenLOD::GSkippedPostComparisonsByKind[
|
||||
static_cast<uint8>(VoxelGenLOD::ETilePostComparisonKind::PassageNativeFloor)].load(
|
||||
std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(VoxelGenLOD::GSkippedPostComparisonsByKind[
|
||||
static_cast<uint8>(VoxelGenLOD::ETilePostComparisonKind::PassageLandingRoomFloor)].load(
|
||||
std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(VoxelGenLOD::GSkippedPostDifferencesByKind[
|
||||
static_cast<uint8>(VoxelGenLOD::ETilePostComparisonKind::OriginAir)].load(
|
||||
std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(VoxelGenLOD::GSkippedPostDifferencesByKind[
|
||||
static_cast<uint8>(VoxelGenLOD::ETilePostComparisonKind::OriginFloor)].load(
|
||||
std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(VoxelGenLOD::GSkippedPostDifferencesByKind[
|
||||
static_cast<uint8>(VoxelGenLOD::ETilePostComparisonKind::PassageLandingSDF)].load(
|
||||
std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(VoxelGenLOD::GSkippedPostDifferencesByKind[
|
||||
static_cast<uint8>(VoxelGenLOD::ETilePostComparisonKind::PassageLandingAir)].load(
|
||||
std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(VoxelGenLOD::GSkippedPostDifferencesByKind[
|
||||
static_cast<uint8>(VoxelGenLOD::ETilePostComparisonKind::PassageTunnelAir)].load(
|
||||
std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(VoxelGenLOD::GSkippedPostDifferencesByKind[
|
||||
static_cast<uint8>(VoxelGenLOD::ETilePostComparisonKind::PassageLandingFloor)].load(
|
||||
std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(VoxelGenLOD::GSkippedPostDifferencesByKind[
|
||||
static_cast<uint8>(VoxelGenLOD::ETilePostComparisonKind::PassageStructuralPosts)].load(
|
||||
std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(VoxelGenLOD::GSkippedPostDifferencesByKind[
|
||||
static_cast<uint8>(VoxelGenLOD::ETilePostComparisonKind::PassageNativeFloor)].load(
|
||||
std::memory_order_relaxed)),
|
||||
static_cast<unsigned long long>(VoxelGenLOD::GSkippedPostDifferencesByKind[
|
||||
static_cast<uint8>(VoxelGenLOD::ETilePostComparisonKind::PassageLandingRoomFloor)].load(
|
||||
std::memory_order_relaxed)));
|
||||
if (VoxelGenLOD::GTilePostReachDebugEnabled.load(std::memory_order_relaxed)
|
||||
&& TilePostReachDifferences != 0)
|
||||
{
|
||||
UE_LOG(LogTemp, Error,
|
||||
TEXT("[VoxelForgeTilePostReach] soundness failure: skipped post changed the field."));
|
||||
FPlatformMisc::RequestExitWithStatus(
|
||||
false, 1, TEXT("VoxelForge tile post reach soundness failure"));
|
||||
}
|
||||
PendingTiles.Empty();
|
||||
PendingTileCancellation.Empty();
|
||||
PendingUnload.Empty();
|
||||
|
||||
Reference in new issue
Block a user