diag: passage-disabled ceiling (L86); readiness unchanged without passages

Environment-only diagnostic hook disables passage composition (never a world setting).
Cold LOD0-2 / whole @W12 WITHOUT passages: SW 1.12/2.25, FI 2.18/3.34, TN 2.15/3.15, VS 1.12/2.03 s
- the same as with passages (FI 2.16 s). Passages are ~58% of sampled CPU but not the
readiness bottleneck. A lazy exact passage-result cache was +47% slower (24% hit rate, ~700 MB)
and was removed. No world change.

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-28 02:13:43 +01:00
1 parent 06f558dc91
commit 4f5f6667ae
4 files changed
+312 -12

No files matched your search

+35 -12
View File
@@ -31,6 +31,19 @@
#include <variant>
#include <vector>
// L86-only ceiling measurement. This removes passage carving/support and the transition-mouth
// passage fade so timing can measure the best possible passage-representation gain. Never ship
// or expose this diagnostic as a world setting.
static bool VF_IsL86PassageCompositionDisabled()
{
static const bool bDisabled = []()
{
const char* Value = std::getenv("VOXELFORGE_L86_DISABLE_PASSAGE_COMPOSITION");
return Value && Value[0] == '1' && Value[1] == '\0';
}();
return bDisabled;
}
// Standalone-only world compiler. It compiles the runtime room/tunnel/passages into
// axis-line intervals, composes rock/cave signs into packed Z-column words, then displaces
// only the conservative surface band. The copied Unreal generator remains the A/B reference.
@@ -195,19 +208,26 @@ public:
{
mayContainResolvedBoundaryBand_=shape.ResolvedBoundaryBandsIntersectSubvoxelRange(
minimumSubvoxels_[2],maximumSubvoxels_[2]);
mayContainTransitionPassageFade_=shape.ResolvedTransitionPassageFadeIntersectsTileXY(
minimumSubvoxels_,maximumSubvoxels_);
featureIndices_=shape.BuildPassageFeatureTileList(
minimumSubvoxels_,maximumSubvoxels_);
const bool disablePassageComposition = VF_IsL86PassageCompositionDisabled();
mayContainTransitionPassageFade_ = !disablePassageComposition
&& shape.ResolvedTransitionPassageFadeIntersectsTileXY(
minimumSubvoxels_, maximumSubvoxels_);
if (!disablePassageComposition)
{
featureIndices_ = shape.BuildPassageFeatureTileList(
minimumSubvoxels_, maximumSubvoxels_);
}
stampIndices_=shape.BuildStampTileList(minimumSubvoxels_,maximumSubvoxels_);
cavernFeatureIndices_=shape.BuildCavernFeatureTileList(
minimumSubvoxels_,maximumSubvoxels_);
passageRoutes_.assign(shape.ResolvedLayout?shape.ResolvedLayout->passages.size():0,0);
passageRoutes_.assign(shape.ResolvedLayout && !disablePassageComposition
? shape.ResolvedLayout->passages.size() : 0, 0);
passageColumns_=passageRoutes_;
passageMouthSupports_=passageRoutes_;
passageMouthSupportSegments_.resize(passageRoutes_.size());
passageSegmentRangeCaches_.resize(passageRoutes_.size());
if(shape.ResolvedLayout&&!shape.ResolvedLayout->passages.empty())
if(!disablePassageComposition&&shape.ResolvedLayout
&&!shape.ResolvedLayout->passages.empty())
{
constexpr double Q=static_cast<double>(
VoxelForgeCore::WorldAssemblySubvoxelsPerVoxel);
@@ -238,11 +258,14 @@ public:
upperMouthSupportPassages_.push_back(passageIndex);
}
}
for(const auto& crossing:shape.PassageVoidCrossings)
if(crossing.needsColumn
&&crossing.bottomZSubvoxels<=maximumSubvoxels_[2]
&&crossing.topZSubvoxels>=minimumSubvoxels_[2])
columnZOverlap_=true;
if(!disablePassageComposition)
{
for(const auto& crossing:shape.PassageVoidCrossings)
if(crossing.needsColumn
&&crossing.bottomZSubvoxels<=maximumSubvoxels_[2]
&&crossing.topZSubvoxels>=minimumSubvoxels_[2])
columnZOverlap_=true;
}
for(const std::uint32_t featureIndex:featureIndices_)
{
if(featureIndex>=shape.PassageTileFeatures.size())continue;
@@ -2233,7 +2256,7 @@ public:
// mouth that crosses a wide transition band. Keep that opt-in field whole;
// its host-rock value already supplies the ceiling and bedrock.
float boundary=graphDensity;
if(!nativeLattice)
if(!nativeLattice && !VF_IsL86PassageCompositionDisabled())
{
VoxelForgeCore::Linux77Profiler::FScopedPhase l77BandsPhase(
VoxelForgeCore::Linux77Profiler::EPhase::Bands);