probe(render): cathedral Phase I instrumentation
Implements the synthesis plan''s Phase I (instrument-first, no rendering edits): the [falls] watch printing EVERY particle submission carrying a real falls owner (the outdoor landblock emitters 0xCF418000-13 the six fix rounds never traced) with route + phase; [falls-adm] admission verdicts for F418 emitters at the retail ShouldDrawParticles port (owner, cell, distance, in-set, eligibility); the continuous [walk-root] line now separating the TRUE root flood (InteriorFloodCells) from the visited union (root + look-ins - the conflation the review corpus indicted) and printing the walk''s own exit-view count; [walk-cam] replayable camera dumps; and the restored [walk-portal] per-portal side/clip decisions. All under the existing ACDREAM_PROBE_WALK_ROOT flag; the depth-checkpoint readback is deferred until these answers narrow the question (mid-pass Vulkan depth reads need render-pass splitting). Hermetic 6,762/0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
6d990d38b3
commit
f4522297cc
5 changed files with 104 additions and 10 deletions
|
|
@ -639,6 +639,29 @@ internal sealed partial class RetailPViewPassExecutor :
|
|||
sb.Append(id.ToString("x"));
|
||||
}
|
||||
ids = $" n={owners.Count} ids=[{sb}]";
|
||||
|
||||
// Phase I cathedral instrumentation: the REAL falls owners
|
||||
// (outdoor landblock statics 0xCF418000-13 per the DAT-geometry
|
||||
// report) — print EVERY submission that carries one, with the
|
||||
// exact watched ids, unconditionally (never rate-limited; these
|
||||
// are the money lines the six fix rounds never had).
|
||||
System.Text.StringBuilder? falls = null;
|
||||
foreach (uint id in owners)
|
||||
{
|
||||
if (id >= 0xCF418000u && id <= 0xCF418014u)
|
||||
{
|
||||
falls ??= new System.Text.StringBuilder();
|
||||
if (falls.Length > 0) falls.Append(',');
|
||||
falls.Append(id.ToString("x"));
|
||||
}
|
||||
}
|
||||
if (falls is not null)
|
||||
{
|
||||
Console.WriteLine(
|
||||
$"[falls] route={route} phase="
|
||||
+ $"{AcDream.Core.Rendering.RenderingDiagnostics.WalkRootPhase} "
|
||||
+ $"ids=[{falls}]");
|
||||
}
|
||||
}
|
||||
Console.WriteLine(
|
||||
$"[walk-part] {route}{ids} phase={AcDream.Core.Rendering.RenderingDiagnostics.WalkRootPhase}");
|
||||
|
|
|
|||
|
|
@ -343,9 +343,15 @@ public sealed class RetailPViewRenderer
|
|||
walkExecutor!, ctx, clipAssembly, clearInteriorDepth, drawExitSeals);
|
||||
walkDriver = new Walk.WalkFrameDriver(walkExecutor!.Dispatcher, leafRenderer, _walkWorldData);
|
||||
|
||||
if (AcDream.Core.Rendering.RenderingDiagnostics.ProbeWalkRootEnabled)
|
||||
{
|
||||
AcDream.Core.Rendering.RenderingDiagnostics.WalkPortalProbeThisFrame =
|
||||
_probeWalkRootFrame % 90 == 0;
|
||||
}
|
||||
walkDriver.Collect(
|
||||
_frameWalk, ctx.ViewerCellId, walkCameraCell, walkLandscape, walkContext,
|
||||
ctx.ViewProjection, ctx.CameraWorldPosition);
|
||||
AcDream.Core.Rendering.RenderingDiagnostics.WalkPortalProbeThisFrame = false;
|
||||
|
||||
// FW4 slice 1: an interior root's terrain/sky/punch clip slices
|
||||
// come from THE WALK'S OWN outside_view — retail's one
|
||||
|
|
@ -363,31 +369,55 @@ public sealed class RetailPViewRenderer
|
|||
viewportHeight);
|
||||
}
|
||||
|
||||
// Phase I cathedral instrumentation (synthesis §Phase I.3): the
|
||||
// continuous rooting line SEPARATES the true root flood
|
||||
// (InteriorFloodCells) from the visited union (root + look-ins —
|
||||
// the conflation the review corpus indicted), and adds the
|
||||
// walk's OWN exit-view count. [walk-cam] dumps a replayable
|
||||
// camera every ~300 frames and at every root flip.
|
||||
if (AcDream.Core.Rendering.RenderingDiagnostics.ProbeWalkRootEnabled)
|
||||
{
|
||||
_probeWalkRootFrame++;
|
||||
bool outdoorNow = ctx.RootCell.IsOutdoorNode;
|
||||
if (_probeWalkRootPrevOutdoor is bool prev && prev != outdoorNow)
|
||||
bool flipped = _probeWalkRootPrevOutdoor is bool prev && prev != outdoorNow;
|
||||
if (flipped)
|
||||
{
|
||||
_probeWalkRootFramesLeft = 8;
|
||||
Console.WriteLine(
|
||||
$"[walk-root] ---- FLIP {(prev ? "OUT->IN" : "IN->OUT")} at frame {_probeWalkRootFrame} ----");
|
||||
$"[walk-root] ---- FLIP {(outdoorNow ? "IN->OUT" : "OUT->IN")} at frame {_probeWalkRootFrame} ----");
|
||||
}
|
||||
_probeWalkRootPrevOutdoor = outdoorNow;
|
||||
bool sample = _probeWalkRootFramesLeft > 0 || _probeWalkRootFrame % 30 == 0;
|
||||
if (_probeWalkRootFramesLeft > 0)
|
||||
{
|
||||
_probeWalkRootFramesLeft--;
|
||||
var cellsList = new List<uint>(walkDriver.VisitedCells);
|
||||
cellsList.Sort();
|
||||
string cells = string.Join(",", cellsList.ConvertAll(c => c.ToString("x8"))
|
||||
.GetRange(0, Math.Min(cellsList.Count, 10)));
|
||||
if (sample)
|
||||
{
|
||||
List<uint> rootFlood = walkDriver.InteriorFloodCells;
|
||||
string flood = string.Join(",", rootFlood
|
||||
.GetRange(0, Math.Min(rootFlood.Count, 8))
|
||||
.ConvertAll(c => c.ToString("x8")));
|
||||
int walkOv = outdoorNow ? -1 : _frameWalk.InteriorOutsideView.ViewCount;
|
||||
Vector3 fwd = walkContext.CyPlane.Normal;
|
||||
Console.WriteLine(
|
||||
$"[walk-root] f={_probeWalkRootFrame} out={(outdoorNow ? 1 : 0)} "
|
||||
+ $"viewer=0x{ctx.ViewerCellId:X8} root=0x{ctx.RootCell.CellId:X8} "
|
||||
+ $"res={ctx.CameraCellResolution} slices={clipAssembly.OutsideViewSlices.Length} "
|
||||
+ $"walkOv={walkOv} rootFlood={rootFlood.Count}[{flood}] "
|
||||
+ $"visited={walkDriver.VisitedCells.Count} bld={walkDriver.VisitedBuildings.Count} "
|
||||
+ $"eye=({ctx.ViewerEyePos.X:F2},{ctx.ViewerEyePos.Y:F2},{ctx.ViewerEyePos.Z:F2}) "
|
||||
+ $"walkCells={walkDriver.VisitedCells.Count} bld={walkDriver.VisitedBuildings.Count} "
|
||||
+ $"cells=[{cells}]");
|
||||
+ $"fwd=({fwd.X:F3},{fwd.Y:F3},{fwd.Z:F3})");
|
||||
}
|
||||
if (flipped || _probeWalkRootFrame % 300 == 0)
|
||||
{
|
||||
Matrix4x4 vp = ctx.ViewProjection;
|
||||
Console.WriteLine(
|
||||
$"[walk-cam] viewer=0x{ctx.ViewerCellId:X8} "
|
||||
+ $"eye=({ctx.ViewerEyePos.X:R},{ctx.ViewerEyePos.Y:R},{ctx.ViewerEyePos.Z:R}) "
|
||||
+ $"vw={viewportWidth:R} vh={viewportHeight:R} vp=["
|
||||
+ $"{vp.M11:R},{vp.M12:R},{vp.M13:R},{vp.M14:R},"
|
||||
+ $"{vp.M21:R},{vp.M22:R},{vp.M23:R},{vp.M24:R},"
|
||||
+ $"{vp.M31:R},{vp.M32:R},{vp.M33:R},{vp.M34:R},"
|
||||
+ $"{vp.M41:R},{vp.M42:R},{vp.M43:R},{vp.M44:R}]");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,6 +119,14 @@ public sealed class WalkPView
|
|||
flags.InView = true; // portal polygon faces the viewer
|
||||
}
|
||||
}
|
||||
if (AcDream.Core.Rendering.RenderingDiagnostics.WalkPortalProbeThisFrame)
|
||||
{
|
||||
Console.WriteLine(
|
||||
$"[walk-portal] init cell={cell.CellId:x8} i={i} "
|
||||
+ $"dest={cell.Portals[i].OtherCellId:x8} d={d:F3} "
|
||||
+ $"pside={cell.Portals[i].PortalSide} "
|
||||
+ $"inview={(flags.InView ? 1 : 0)}");
|
||||
}
|
||||
}
|
||||
|
||||
if (flags.InView)
|
||||
|
|
@ -201,6 +209,12 @@ public sealed class WalkPView
|
|||
cell, portal.PortalSide,
|
||||
cell.PortalPolygons[portal.PolygonIndex],
|
||||
doClip: true, ctx, _clipScratch);
|
||||
if (AcDream.Core.Rendering.RenderingDiagnostics.WalkPortalProbeThisFrame)
|
||||
{
|
||||
Console.WriteLine(
|
||||
$"[walk-portal] clip cell={cell.CellId:x8} view={i} j={j} "
|
||||
+ $"dest={portal.OtherCellId:x8} n={n}");
|
||||
}
|
||||
if (n == 0) continue;
|
||||
|
||||
if (portal.OtherCellId == 0xFFFFFFFFu)
|
||||
|
|
|
|||
|
|
@ -321,6 +321,9 @@ public sealed class ParticleSystem : IParticleSystem
|
|||
rangeMultiplier = 1f;
|
||||
|
||||
LastRetailViewEmitterVisitCount = 0;
|
||||
_probeAdmissionDumpThisCall =
|
||||
AcDream.Core.Rendering.RenderingDiagnostics.ProbeWalkRootEnabled
|
||||
&& ++_probeAdmissionCallCounter % 120 == 0;
|
||||
foreach (int handle in _worldSimulationHandles)
|
||||
{
|
||||
if (!_byHandle.TryGetValue(handle, out ParticleEmitter? emitter))
|
||||
|
|
@ -346,9 +349,33 @@ public sealed class ParticleSystem : IParticleSystem
|
|||
|| float.IsNaN(maxDistance)
|
||||
|| distance <= maxDistance);
|
||||
RefreshRenderableIndex(emitter, wasRenderable);
|
||||
|
||||
// ACDREAM_PROBE_WALK_ROOT companion (Phase I cathedral
|
||||
// instrumentation, throwaway): admission verdicts for the F418
|
||||
// watch set — the real falls owners 0xCF418000-13 and every
|
||||
// F418-cell emitter — every ~120th ApplyRetailView pass.
|
||||
if (_probeAdmissionDumpThisCall
|
||||
&& AcDream.Core.Rendering.RenderingDiagnostics.ProbeWalkRootEnabled
|
||||
&& ((emitter.AttachedObjectId >= 0xCF418000u
|
||||
&& emitter.AttachedObjectId <= 0xCF418014u)
|
||||
|| (emitter.OwnerCellId >> 16) == 0xF418u))
|
||||
{
|
||||
Console.WriteLine(
|
||||
$"[falls-adm] owner={emitter.AttachedObjectId:x} "
|
||||
+ $"cell={emitter.OwnerCellId:x8} "
|
||||
+ $"pos=({emitter.OwnerPosition.X:F1},{emitter.OwnerPosition.Y:F1},{emitter.OwnerPosition.Z:F1}) "
|
||||
+ $"dist={distance:F1} max={maxDistance:F1} "
|
||||
+ $"inSet={(visibleCellIds.Contains(emitter.OwnerCellId) ? 1 : 0)} "
|
||||
+ $"eligible={(emitter.ViewEligible ? 1 : 0)} "
|
||||
+ $"active={emitter.ActiveCount} pass={emitter.RenderPass}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Phase I instrumentation rate limiter (see the probe block above).
|
||||
private static uint _probeAdmissionCallCounter;
|
||||
private static bool _probeAdmissionDumpThisCall;
|
||||
|
||||
/// <summary>
|
||||
/// Changes only render presentation. Logical lifetime is unaffected.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue