passages: swept tube evaluates the exact route on in-bound cache misses (L100, v216)
L99 treated a missing exact-grid sweep sample as "no route here", so off-grid queries exposed the FI/TN boundary band inside passage 1-2 (flat ceiling/floor). In-bound misses now evaluate the exact route; a conservative route-feature bound still skips out-of-extent misses. Composition order unchanged (graph -> bands -> passage -> stamps -> floor caps). Comparison now counts added/removed crossings and triangles: 0/0 crossings on all four strates (FI +56 triangles). 1-2 mid-tunnel: L98->L100 changes 32k px (L99 changed 1.14M). Near-ready @W12 (L98/L99/L100): FI 2.62/1.78/2.05, TN 2.36/1.55/1.80, SW 1.17/0.95/1.04, VS 1.16/1.03/1.08 s. All walk audits pass; 24/24 Clang/GCC W1/W8/W12 determinism; fast tier PASS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
This commit is contained in:
1 parent
fa6363b31a
commit
2d5822cdf7
47 files changed
+1433
-22
No files matched your search
@@ -135,7 +135,9 @@ namespace StandaloneStreamBenchmark
|
||||
struct FPassageClampComparison
|
||||
{
|
||||
std::uint64_t samples=0,changedSamples=0,signFlips=0;
|
||||
std::uint64_t crossingEdgeMismatches=0,sharedCrossingEdges=0,movedCrossingEdges=0;
|
||||
std::uint64_t crossingEdgeMismatches=0,addedCrossingEdges=0,removedCrossingEdges=0;
|
||||
std::uint64_t sharedCrossingEdges=0,movedCrossingEdges=0;
|
||||
std::uint64_t addedSurfaceTriangles=0,removedSurfaceTriangles=0;
|
||||
std::uint64_t normalVertices=0,normalPairingFailures=0,changedNormalVertices=0;
|
||||
double maxAbsDensityDelta=0.0,maxSurfaceDisplacementCm=0.0;
|
||||
double sumSurfaceDisplacementCm=0.0,maxNormalAngleDegrees=0.0;
|
||||
@@ -251,6 +253,8 @@ namespace StandaloneStreamBenchmark
|
||||
const bool crossBase=solid(a0)!=solid(a1);
|
||||
const bool crossCandidate=solid(b0)!=solid(b1);
|
||||
if(crossBase!=crossCandidate)++result.crossingEdgeMismatches;
|
||||
if(!crossBase&&crossCandidate)++result.addedCrossingEdges;
|
||||
else if(crossBase&&!crossCandidate)++result.removedCrossingEdges;
|
||||
if(!crossBase||!crossCandidate)return;
|
||||
const double ta=static_cast<double>(a0)/(static_cast<double>(a0)-a1);
|
||||
const double tb=static_cast<double>(b0)/(static_cast<double>(b0)-b1);
|
||||
@@ -324,6 +328,20 @@ namespace StandaloneStreamBenchmark
|
||||
result.meshChanged=Base.meshHash!=Candidate.meshHash
|
||||
||Base.vertices.size()!=Candidate.vertices.size()
|
||||
||Base.indices!=Candidate.indices;
|
||||
const auto surfaceTriangleCount=[](const VoxelForgeCore::TileMesh& Mesh)
|
||||
{
|
||||
const std::size_t triangleCount=Mesh.indices.size()/3;
|
||||
if(Mesh.skirtFaceMasks.size()!=triangleCount)
|
||||
return static_cast<std::uint64_t>(triangleCount);
|
||||
return static_cast<std::uint64_t>(std::count(Mesh.skirtFaceMasks.begin(),
|
||||
Mesh.skirtFaceMasks.end(),static_cast<std::uint8_t>(0)));
|
||||
};
|
||||
const std::uint64_t baseSurfaceTriangles=surfaceTriangleCount(Base);
|
||||
const std::uint64_t candidateSurfaceTriangles=surfaceTriangleCount(Candidate);
|
||||
if(candidateSurfaceTriangles>baseSurfaceTriangles)
|
||||
result.addedSurfaceTriangles=candidateSurfaceTriangles-baseSurfaceTriangles;
|
||||
else
|
||||
result.removedSurfaceTriangles=baseSurfaceTriangles-candidateSurfaceTriangles;
|
||||
result.valid=true;
|
||||
return result;
|
||||
}
|
||||
@@ -445,7 +463,8 @@ namespace StandaloneStreamBenchmark
|
||||
VoxelForgeCore::TileGenerationOptions candidateOptions=baseOptions;
|
||||
candidateOptions.profilePassageComposer=true;
|
||||
std::array<std::uint64_t,4> tileCount{},sampleCount{},changedSamples{},signFlips{},
|
||||
crossingMismatches{},sharedCrossings{},movedCrossings{},changedTiles{},
|
||||
crossingMismatches{},addedCrossings{},removedCrossings{},sharedCrossings{},
|
||||
movedCrossings{},addedSurfaceTriangles{},removedSurfaceTriangles{},changedTiles{},
|
||||
normalVertices{},normalPairingFailures{},changedNormalVertices{};
|
||||
std::array<std::uint64_t,4> movedRegions[4]{},normalRegions[4]{};
|
||||
std::array<double,4> maxDisplacementCm{},sumDisplacementCm{},maxNormalAngle{};
|
||||
@@ -494,8 +513,12 @@ namespace StandaloneStreamBenchmark
|
||||
changedSamples[floorIndex]+=comparison.changedSamples;
|
||||
signFlips[floorIndex]+=comparison.signFlips;
|
||||
crossingMismatches[floorIndex]+=comparison.crossingEdgeMismatches;
|
||||
addedCrossings[floorIndex]+=comparison.addedCrossingEdges;
|
||||
removedCrossings[floorIndex]+=comparison.removedCrossingEdges;
|
||||
sharedCrossings[floorIndex]+=comparison.sharedCrossingEdges;
|
||||
movedCrossings[floorIndex]+=comparison.movedCrossingEdges;
|
||||
addedSurfaceTriangles[floorIndex]+=comparison.addedSurfaceTriangles;
|
||||
removedSurfaceTriangles[floorIndex]+=comparison.removedSurfaceTriangles;
|
||||
changedTiles[floorIndex]+=comparison.meshChanged?1u:0u;
|
||||
normalVertices[floorIndex]+=comparison.normalVertices;
|
||||
normalPairingFailures[floorIndex]+=comparison.normalPairingFailures;
|
||||
@@ -511,13 +534,17 @@ namespace StandaloneStreamBenchmark
|
||||
movedRegions[floorIndex][region]+=comparison.movedEdgeRegions[region];
|
||||
normalRegions[floorIndex][region]+=comparison.normalVertexRegions[region];
|
||||
}
|
||||
std::printf("[%s] %s=%.2f key=(%d,%d,%d,lod%d) samples=%llu changed=%llu sign_flips=%llu moved_edges=%llu max_displacement_cm=%.6g max_displacement_xyz_vox=(%.6g,%.6g,%.6g) displacement_region=%d normal_vertices=%llu max_normal_degrees=%.6g max_normal_xyz_vox=(%.6g,%.6g,%.6g) normal_region=%d changed_mesh=%d\n",
|
||||
std::printf("[%s] %s=%.2f key=(%d,%d,%d,lod%d) samples=%llu changed=%llu sign_flips=%llu moved_edges=%llu added_crossings=%llu removed_crossings=%llu added_surface_triangles=%llu removed_surface_triangles=%llu max_displacement_cm=%.6g max_displacement_xyz_vox=(%.6g,%.6g,%.6g) displacement_region=%d normal_vertices=%llu max_normal_degrees=%.6g max_normal_xyz_vox=(%.6g,%.6g,%.6g) normal_region=%d changed_mesh=%d\n",
|
||||
tileTag,valueName,Candidates[floorIndex],key.coordinate.x,
|
||||
key.coordinate.y,key.coordinate.z,key.lod,
|
||||
static_cast<unsigned long long>(comparison.samples),
|
||||
static_cast<unsigned long long>(comparison.changedSamples),
|
||||
static_cast<unsigned long long>(comparison.signFlips),
|
||||
static_cast<unsigned long long>(comparison.movedCrossingEdges),
|
||||
static_cast<unsigned long long>(comparison.addedCrossingEdges),
|
||||
static_cast<unsigned long long>(comparison.removedCrossingEdges),
|
||||
static_cast<unsigned long long>(comparison.addedSurfaceTriangles),
|
||||
static_cast<unsigned long long>(comparison.removedSurfaceTriangles),
|
||||
comparison.maxSurfaceDisplacementCm,
|
||||
comparison.maxSurfaceLocationVoxels[0],
|
||||
comparison.maxSurfaceLocationVoxels[1],
|
||||
@@ -544,13 +571,17 @@ namespace StandaloneStreamBenchmark
|
||||
&&maxNormalAngle[floorIndex]<=2.0
|
||||
&&normalPairingFailures[floorIndex]==0;
|
||||
acceptedAtAllFloors=acceptedAtAllFloors&&accepted;
|
||||
std::printf("[%s] %s=%.2f tiles=%llu/%zu samples=%llu changed_samples=%llu sign_flips=%llu edge_crossing_mismatches=%llu shared_crossings=%llu moved_crossings=%llu max_displacement_cm=%.6g mean_displacement_cm=%.6g changed_mesh_tiles=%llu normal_vertices=%llu changed_normal_vertices=%llu max_normal_degrees=%.6g mean_normal_degrees=%.6g normal_pairing_failures=%llu moved_regions=(wall:%llu,floor:%llu,mouth:%llu,other:%llu) normal_regions=(wall:%llu,floor:%llu,mouth:%llu,other:%llu) status=%s\n",
|
||||
std::printf("[%s] %s=%.2f tiles=%llu/%zu samples=%llu changed_samples=%llu sign_flips=%llu edge_crossing_mismatches=%llu added_crossings=%llu removed_crossings=%llu added_surface_triangles=%llu removed_surface_triangles=%llu shared_crossings=%llu moved_crossings=%llu max_displacement_cm=%.6g mean_displacement_cm=%.6g changed_mesh_tiles=%llu normal_vertices=%llu changed_normal_vertices=%llu max_normal_degrees=%.6g mean_normal_degrees=%.6g normal_pairing_failures=%llu moved_regions=(wall:%llu,floor:%llu,mouth:%llu,other:%llu) normal_regions=(wall:%llu,floor:%llu,mouth:%llu,other:%llu) status=%s\n",
|
||||
summaryTag,valueName,Candidates[floorIndex],
|
||||
static_cast<unsigned long long>(tileCount[floorIndex]),
|
||||
keys.size(),static_cast<unsigned long long>(sampleCount[floorIndex]),
|
||||
static_cast<unsigned long long>(changedSamples[floorIndex]),
|
||||
static_cast<unsigned long long>(signFlips[floorIndex]),
|
||||
static_cast<unsigned long long>(crossingMismatches[floorIndex]),
|
||||
static_cast<unsigned long long>(addedCrossings[floorIndex]),
|
||||
static_cast<unsigned long long>(removedCrossings[floorIndex]),
|
||||
static_cast<unsigned long long>(addedSurfaceTriangles[floorIndex]),
|
||||
static_cast<unsigned long long>(removedSurfaceTriangles[floorIndex]),
|
||||
static_cast<unsigned long long>(sharedCrossings[floorIndex]),
|
||||
static_cast<unsigned long long>(movedCrossings[floorIndex]),
|
||||
maxDisplacementCm[floorIndex],meanDisplacement,
|
||||
|
||||
Reference in new issue
Block a user