From 434a7df2896888dc0fee74192515312eabcd1f05 Mon Sep 17 00:00:00 2001 From: Erik Date: Thu, 3 Sep 2026 08:01:37 +0200 Subject: [PATCH] fix(render): S3 chunk 2 review follow-ups - delete the ACDREAM_PROBE_CATHEDRAL_SKIP_SEALS discriminator (member, read site, launch-options row): its investigation is closed by the retail axiom, and the review found it had silently gained a second effect through the seal count (a skipped seal also suppressed the next depth clear); - the interior PView's draw_landscape is now wired explicitly (RenderDeviceD3D::Init 0x0059efb0), so the two-PView pin asserts wiring, not a default; - the two backend seam comments name retail's clear gate; - the counter doc states the Collect/Replay consume/re-arm split and why it has no retail analogue. Co-Authored-By: Claude Fable 5.1 --- docs/launch-options.md | 1 - src/AcDream.App/Rendering/RetailPViewPassExecutor.cs | 7 ------- src/AcDream.App/Rendering/Walk/RetailFrameWalk.cs | 4 +++- src/AcDream.App/Rendering/Walk/WalkFrameDriver.cs | 6 +++++- src/AcDream.App/Rendering/WorldPassScope.cs | 4 +++- src/AcDream.App/Rendering/WorldPassSurface.cs | 5 ++++- src/AcDream.Core/Rendering/RenderingDiagnostics.cs | 10 ---------- 7 files changed, 15 insertions(+), 22 deletions(-) diff --git a/docs/launch-options.md b/docs/launch-options.md index c8cbaa73..57315942 100644 --- a/docs/launch-options.md +++ b/docs/launch-options.md @@ -330,7 +330,6 @@ issue is closed, the strip was missed; delete both. | `ACDREAM_PROBE_PVINPUT` | "throwaway apparatus — strip once the jitter source is pinned" | `=1` | one `[pv-input]` line/frame with 6-dp-precision `PortalVisibilityBuilder.Build` inputs (camera eye, player position, VP elements) + resulting flood-cell count; deliberately runs WITHOUT the heavier `[flap]` probe so the log stays diffable | print-only | `RenderingDiagnostics.ProbePvInputEnabled` | | `ACDREAM_PROBE_REMOTE_SLIDE` | bug b, temporary — strip once two-client roof capture lands | `=1` OR `=` | gates `[remote-slide-up]`/`[remote-slide-vec]`/`[remote-slide-snap]`/`[remote-slide-enq]` lines across `LiveEntityNetworkUpdateController`, `InterpolationManager`, `RuntimeRemotePhysicsUpdater`, `RuntimeRemoteSteadyStatePosition` tracing two candidate remote-slide "blip" producers | print-only; `BeginRemoteSlideAttribution`/GUID-stamping calls are UNCONDITIONAL at several call sites (self-guard is internal), so a `[ThreadStatic]` field write happens on every remote tick regardless of the flag (cheap, non-allocating); a GUID allow-list narrows output to specific entities for a readable two-client capture | `PhysicsDiagnostics.ProbeRemoteSlideEnabled` + `ProbeRemoteSlideGuids` (raw string parsed via `ParseHexIdList` unless it's the literal `"1"`) | | `ACDREAM_PROBE_REMOTE_TELEPORT` | c4 route 4b-3, temporary | `=1` | gates one `[remote-teleport]` line per routed remote teleport arm in `LiveEntityNetworkUpdateController.ApplyRemoteContactRouting` | print-only; a 2026-08-04 fix moved the enabled-check to the CALL SITE because the probe's internal self-guard did not prevent `teleportStatus.ToString()` from being evaluated/allocated on every teleport regardless of flag state — now properly guarded | `PhysicsDiagnostics.ProbeRemoteTeleportEnabled` | -| `ACDREAM_PROBE_CATHEDRAL_SKIP_SEALS` | Campaign FW floating-stair discriminator | `=1` | suppresses only the true-depth exit seals of cells `0xF4180107` and `0xF4180112`, whose coplanar authored exit polygons span the floating-stair seam at world Y~=24 | **Behavior-changing diagnostic**; never use as a production fix | `RenderingDiagnostics.ProbeCathedralSkipFloatingStairSeals` | | `ACDREAM_PROBE_CATHEDRAL_SKIP_PUNCH` | Campaign FW floating-stair discriminator (committed by the `b3b7d922` investigation checkpoint) | `=1` | suppresses only the far-Z portal punch of the authored building whose look-in owns cell `0xF4180112`, the moving transparent seam at the `0xF4180107/0112` floating stairs | **Behavior-changing diagnostic**; never use as a production fix; scheduled for deletion in Campaign OVERHAUL S5 | `RenderingDiagnostics.ProbeCathedralSkipStairBuildingPunch` | | `ACDREAM_PROBE_CATHEDRAL_SKIP_CELL_SHELLS` | Campaign FW floating-stair carrier discriminator | `=1` | suppresses only the visible EnvCell shells of cells `0xF4180107` and `0xF4180112`; missing walls are intentional so the moving wall-textured triangles can be attributed or exonerated | **Behavior-changing diagnostic**; never use as a production fix | `RenderingDiagnostics.ProbeCathedralSkipFloatingStairCellShells` | | `ACDREAM_PROBE_CATHEDRAL_SKIP_SOUTH_LOOKIN_SHELLS` | Campaign FW south-building carrier discriminator | `=1` | suppresses the visible EnvCell shells of `0xF4180112/0113/0114` only during the south building's pre-clear look-in; the ordinary interior-root repaint is unchanged | **Behavior-changing diagnostic**; never use as a production fix | `RenderingDiagnostics.ProbeCathedralSkipSouthLookInCellShells` | diff --git a/src/AcDream.App/Rendering/RetailPViewPassExecutor.cs b/src/AcDream.App/Rendering/RetailPViewPassExecutor.cs index 40e42c26..04b7b8fc 100644 --- a/src/AcDream.App/Rendering/RetailPViewPassExecutor.cs +++ b/src/AcDream.App/Rendering/RetailPViewPassExecutor.cs @@ -396,13 +396,6 @@ public RetailPViewPassExecutor( { if (_portalDepthMask is null) return 0; - if (!forceFarZ - && AcDream.Core.Rendering.RenderingDiagnostics - .ProbeCathedralSkipFloatingStairSeals - && cellId is 0xF4180107u or 0xF4180112u) - { - return 0; - } LoadedCell? cell = frame.Cells.Find(cellId); if (cell is null) return 0; diff --git a/src/AcDream.App/Rendering/Walk/RetailFrameWalk.cs b/src/AcDream.App/Rendering/Walk/RetailFrameWalk.cs index 621c3d94..48faaf42 100644 --- a/src/AcDream.App/Rendering/Walk/RetailFrameWalk.cs +++ b/src/AcDream.App/Rendering/Walk/RetailFrameWalk.cs @@ -43,7 +43,9 @@ public interface IRetailFrameWalkContext : IWalkBuildingFrameContext /// public sealed class RetailFrameWalk { - private readonly WalkPView _interiorPView = new(); + // RenderDeviceD3D::Init @0x0059efb0: indoor_pview = PView(…, 1) — the + // interior pview DRAWS the landscape through its surviving exit views. + private readonly WalkPView _interiorPView = new() { DrawLandscape = true }; // The outdoor pview never draws the landscape through its look-in // floods (the landscape is already drawn when buildings punch), so its // draw_landscape is FALSE and look-in DCs always read ov=0 — exactly diff --git a/src/AcDream.App/Rendering/Walk/WalkFrameDriver.cs b/src/AcDream.App/Rendering/Walk/WalkFrameDriver.cs index f2686cc5..a9e0bd31 100644 --- a/src/AcDream.App/Rendering/Walk/WalkFrameDriver.cs +++ b/src/AcDream.App/Rendering/Walk/WalkFrameDriver.cs @@ -565,7 +565,11 @@ internal sealed class WalkFrameDriver : IWalkEventSink, IWalkLookInViewSource /// frame's read will see. A driver whose interior floods never reach an /// exit portal keeps this at zero forever — the gated clear never fires /// for it, matching retail exactly (no seals submitted, no depth ever - /// needed clearing). + /// needed clearing). Retail consumes and re-arms inside ONE synchronous + /// DrawCells; here the consume is at Collect and the re-arm at + /// Replay, so a frame that Collects but never Replays (an exception path + /// that already failed the frame) leaves the next ov>0 frame without a + /// clear — no retail analogue, no production path. internal int PortalsDrawnCount; IReadOnlyList IWalkLookInViewSource.LookInCellTurns => LookInCellTurns; diff --git a/src/AcDream.App/Rendering/WorldPassScope.cs b/src/AcDream.App/Rendering/WorldPassScope.cs index 559312ff..6f953898 100644 --- a/src/AcDream.App/Rendering/WorldPassScope.cs +++ b/src/AcDream.App/Rendering/WorldPassScope.cs @@ -96,7 +96,9 @@ internal interface IWorldPassScope /// Retail's interior depth clear, scoped to the live pass. /// /// RetailPViewPassExecutor issues glClear(GL_DEPTH_BUFFER_BIT) - /// between the landscape slice and the interior cells. Splitting the pass to + /// between the landscape slice and the interior cells, only when the walk + /// driver's retail gate fires (outside_view.view_count > 0 and a + /// nonzero portalsDrawnCount — S3 chunk 2). Splitting the pass to /// get a depth load-op is exactly what the resolve forbids, so the backend /// records vkCmdClearAttachments instead — reached through here, so the /// pinned contract stays frozen and the backend-only verb stays inside the diff --git a/src/AcDream.App/Rendering/WorldPassSurface.cs b/src/AcDream.App/Rendering/WorldPassSurface.cs index e7198b50..6b17adca 100644 --- a/src/AcDream.App/Rendering/WorldPassSurface.cs +++ b/src/AcDream.App/Rendering/WorldPassSurface.cs @@ -79,7 +79,10 @@ internal interface IWorldPassSurface /// /// Retail's interior depth clear, between the landscape slice and the - /// interior cells (PView::DrawCells @ 0x005A4840). + /// interior cells (PView::DrawCells @ 0x005A4840). Retail gates it + /// on outside_view.view_count > 0 AND a nonzero persistent + /// portalsDrawnCount (S3 chunk 2); the walk driver decides, this + /// seam only executes. /// void ClearInteriorDepth(); } diff --git a/src/AcDream.Core/Rendering/RenderingDiagnostics.cs b/src/AcDream.Core/Rendering/RenderingDiagnostics.cs index e1a47d1f..540e3f23 100644 --- a/src/AcDream.Core/Rendering/RenderingDiagnostics.cs +++ b/src/AcDream.Core/Rendering/RenderingDiagnostics.cs @@ -119,16 +119,6 @@ public static class RenderingDiagnostics public static bool ProbeCathedralSkipStairBuildingPunch { get; set; } = Environment.GetEnvironmentVariable("ACDREAM_PROBE_CATHEDRAL_SKIP_PUNCH") == "1"; - /// - /// Temporary cathedral discriminator: suppresses only the true-depth exit - /// seals authored by the two cells that meet at the floating-stair seam. - /// Both portal polygons lie on world Y ~= 24 and span the reported moving - /// triangle. This is a binary visual experiment only; normal production - /// behavior is unchanged while the flag is unset. - /// - public static bool ProbeCathedralSkipFloatingStairSeals { get; set; } = - Environment.GetEnvironmentVariable("ACDREAM_PROBE_CATHEDRAL_SKIP_SEALS") == "1"; - /// /// Temporary cathedral carrier discriminator: suppresses only the visible /// EnvCell shells for cells 0xF4180107 and 0xF4180112. This deliberately