From 7b0fdde601160671f1f08869056464a8de7ee097 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 31 May 2026 01:09:28 +0100 Subject: [PATCH] Route live Leap depth into surface claims --- .../mimir-leap-surface-claims-clean.png | Bin 0 -> 49045 bytes config/mimir-runtime.ks-camera.example.json | 3 +- config/mimir-runtime.leap-live.example.json | 21 ++++++++++ docs/implementation-plan.md | 19 ++++++--- notes/current-system-map.md | 25 +++++++---- src/Mimir.BufferSmoke/Program.cs | 22 +++++++++- src/Mimir.Runtime/MimirRuntime.cs | 13 +++++- .../MimirFensalirFieldLowering.cs | 6 +-- .../MimirFensalirTextureLeaseClient.cs | 10 ++++- .../MimirKsVideoCaptureDriver.cs | 22 +++++++++- .../MimirPs3EyeVideoCaptureDriver.cs | 12 ++++++ .../MimirRuntimeConfiguration.cs | 5 ++- state/evidence.jsonl | 1 + state/map.yaml | 39 +++++++++++------- 14 files changed, 159 insertions(+), 39 deletions(-) create mode 100644 artifacts/runtime/mimir-leap-surface-claims-clean.png create mode 100644 config/mimir-runtime.leap-live.example.json diff --git a/artifacts/runtime/mimir-leap-surface-claims-clean.png b/artifacts/runtime/mimir-leap-surface-claims-clean.png new file mode 100644 index 0000000000000000000000000000000000000000..9a5f8aada728dd051e3c576b6026e7881e17f97d GIT binary patch literal 49045 zcmeIb2{_d2`#(No7>PkCjUklMB4rs{VQ87rqP=KE#3+&?M7@U*Ew(x>XfZXm7Ex)V znz1C6Wd=o5mMAINcQeobnd$U7C7tGcKL6|c`+a_2=bGy}=W=G=@8`Mi`?;6beLweo zWaV-SZZu&u3WdTgwpzFvg%WQ?p~Nna!ot7kohX6-Vr^c$&~mLWdYiqyeJ|-KCC8qK z3rh^-5_Mv+ny@mP7B(n4w5tkX3h^{BnvMo>Jw?}H86!}L2Dzv)V zd!an!7iLq*_}(xbf+W*ZG|IdbQpOhJRz;jHUga-+%oS#VchuqTZs!`>FGj zkoju34z7-xC~pnfLBQXXRl9;VZ~DT`-u8RKs4vGn5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CHw Fensalir +D3D12 texture lease -> packed stereo disparity -> 19,200 generated surface +claims -> visible reservoir-resolved splats, with point-list rendering still +at `rendered 0`. The proof currently runs with +`AQUARIUM_DISABLE_RESERVOIR_HISTORY=1`; when history is disabled, presentation +now deliberately reads the current resolver target instead of an unwritten +history target. The next truth cut is calibrated projection constants, +reservoir-history startup repair, and global residual/calibration ownership, +not another fake RGB depth path. Those claims are not inherently pixel-sized. Pixel-level resolve consumes the reservoir, but claim support is chosen from the represented field. Smooth diff --git a/notes/current-system-map.md b/notes/current-system-map.md index 75fc5c2..df49fbc 100644 --- a/notes/current-system-map.md +++ b/notes/current-system-map.md @@ -466,13 +466,24 @@ R16F disparity SurfacePage. `MimirRuntime` merges that Mesh claim into the same evidence frame as the Leap stereo-depth lowering. `Mimir.BufferSmoke --leap-point-cloud-root-smoke` proves the combined depth/point-cloud contract plans as one `SurfacePage` packet and one `Mesh` packet with zero deferred -requests. Fensalir branch `codex/leap-packed-depth` now has the first render -lane too. It preserves Mesh `SourceUri=derived-from:*`, allocates generated -point-list vertex/index buffers as UAV-capable GPU resources, fills them from -the disparity SurfacePage in `D3D12PointCloudFromDisparityCS`, and renders the -standard `PositionNormalUvColor` PointList through `D3D12PointCloudPS`. The -remaining truth gap is live Leap/editor verification, calibrated projection -constants, full SGM, and a global residual/calibration owner. +requests. Fensalir branch `codex/leap-packed-depth` now has the first native +surface-claim lane too. It preserves Mesh `SourceUri=derived-from:*`, allocates +generated point-list vertex/index buffers as UAV-capable GPU resources, fills +them from the disparity SurfacePage in `D3D12PointCloudFromDisparityCS`, and +writes approximated normals, curvature, SDF, PBR, and radiosity reservoirs into +the existing fractal splat buffers. The point-list draw path is diagnostic-only; +the verified live presentation path is Fensalir's splat/reservoir resolver. +The 2026-05-31 live capture +`artifacts/runtime/mimir-leap-surface-claims-clean.png` proves the clean path: +LeapUVC frames uploaded through a Fensalir-owned D3D12 texture, packed stereo +dispatched to R16F disparity, point-cloud compute generated 19,200 surface +claims, the point-list mesh renderer stayed at `rendered 0`, and the reservoir +resolver presented visible Leap-derived splats. Reservoir history update is +still disabled during the proof with `AQUARIUM_DISABLE_RESERVOIR_HISTORY=1`; +the fallback presentation source now explicitly reads the current resolver +output instead of the untouched history target. Remaining truth gaps are +calibrated projection constants, full SGM, reservoir-history shader startup +repair, and a global residual/calibration owner. Fensalir must not be treated as a traditional rendering pipeline. Mimir does not ask it to "draw a thing" and hope post-processing makes the result true. diff --git a/src/Mimir.BufferSmoke/Program.cs b/src/Mimir.BufferSmoke/Program.cs index 5671fad..0a21ba6 100644 --- a/src/Mimir.BufferSmoke/Program.cs +++ b/src/Mimir.BufferSmoke/Program.cs @@ -892,6 +892,7 @@ static int RunKsCameraDriverSmoke(string[] args) var fourCc = ParseStringOption(args, "--fourcc", "YUY2"); var minFps = ParseDoubleOption(args, "--min-fps", 100.0); var timeoutMs = ParseIntOption(args, "--timeout-ms", 3000); + var dumpFrame = ParseStringOption(args, "--dump-frame", ""); var broker = new FakeFieldResourceBroker(); using var driver = new MimirKsVideoCaptureDriver(new MimirKsVideoCaptureDriverOptions( @@ -906,7 +907,10 @@ static int RunKsCameraDriverSmoke(string[] args) new MimirStreamDescriptor(sourceId, MimirStreamKind.Video, MimirStreamOrigin.LocalDevice), driver, static () => StopwatchTicksToNs(Stopwatch.GetTimestamp())); - source.AttachTextureLeaseClient(new MimirFensalirTextureLeaseClient(broker)); + if (string.IsNullOrWhiteSpace(dumpFrame)) + { + source.AttachTextureLeaseClient(new MimirFensalirTextureLeaseClient(broker)); + } var deadline = Stopwatch.GetTimestamp() + (long)(timeoutMs / 1000.0 * Stopwatch.Frequency); while (Stopwatch.GetTimestamp() < deadline) @@ -920,6 +924,20 @@ static int RunKsCameraDriverSmoke(string[] args) var frame = sample.VideoFrame; Console.WriteLine( $"ks-camera-driver-smoke source={sample.SourceId} {frame?.Width}x{frame?.Height} format={frame?.PixelFormat} liveBytes={sample.ByteLength} uploadedBytes={source.LastUploadedByteLength} uploaded={broker.UploadedResourceKey} copies={source.LastUploadedCopyCount}"); + if (!string.IsNullOrWhiteSpace(dumpFrame) && !sample.Data.IsEmpty) + { + var dumpPath = Path.GetFullPath(dumpFrame); + Directory.CreateDirectory(Path.GetDirectoryName(dumpPath) ?? "."); + File.WriteAllBytes(dumpPath, sample.Data.ToArray()); + Console.WriteLine($"ks-camera-driver-dump path={dumpPath} bytes={sample.Data.Length}"); + return frame != null && + frame.Width == width && + frame.Height == height && + sample.ByteLength > 0 + ? 0 + : 1; + } + return frame != null && frame.Width == width && frame.Height == height && @@ -2620,7 +2638,7 @@ static int RunLeapPointCloudRootSmoke() pointResource.Kind == AquariumFieldResourceKind.Mesh && pointResource.Mesh.Topology == AquariumFieldMeshTopology.PointList && pointResource.Mesh.Layout == AquariumFieldMeshLayout.PositionNormalUvColor && - pointResource.Mesh.Vertices.Count == 320 * 120 && + pointResource.Mesh.Vertices.Count == 160 * 120 && pointResource.Mesh.Indices.Count == pointResource.Mesh.Vertices.Count && pointResource.SourceUri == "derived-from:mimir:resource:stereo-depth:leap-stereo-ir:disparity-r16f" && stereoPacket.Backend == AquariumFieldBackendKind.SurfacePage && diff --git a/src/Mimir.Runtime/MimirRuntime.cs b/src/Mimir.Runtime/MimirRuntime.cs index 72cfabd..820c8de 100644 --- a/src/Mimir.Runtime/MimirRuntime.cs +++ b/src/Mimir.Runtime/MimirRuntime.cs @@ -1433,14 +1433,19 @@ public sealed class MimirRuntime : IAquariumRuntime, IAquariumRuntimeServicesRec private void StartConfiguredSources() { + var started = 0; foreach (var factory in sourceFactories) { var source = factory.Create(); if (source != null) { synchronization.AddSource(source); + started++; + Console.WriteLine($"mimir-source-started source={factory.Descriptor.SourceId} kind={factory.Descriptor.Kind}"); } } + + Console.WriteLine($"mimir-source-started total={started} configured={sourceFactories.Count}"); } private void EmitTelemetry() @@ -1454,7 +1459,7 @@ public sealed class MimirRuntime : IAquariumRuntime, IAquariumRuntimeServicesRec string.Equals(buffer.Descriptor.SourceId, audioSyncSettings.ReferenceSourceId, StringComparison.Ordinal)); var states = synchronization.AudioSynchronizationStates; Console.WriteLine( - $"mimir-sync-telemetry t={runtimeSeconds:0.00}s audioSync={audioSyncSettings.Mode} loopbackCount={loopback?.Count ?? 0} loopbackEdgeNs={loopback?.EdgeNs ?? 0} reports={lastAudioSynchronizationReports.Count} states={states.Count} analyzeMs={lastAudioSyncAnalysisMilliseconds:0.0} aligned={DescribeAlignedAudio()}"); + $"mimir-sync-telemetry t={runtimeSeconds:0.00}s sources={synchronization.SourceCount} lastPoll={lastPollCount} ingested={synchronization.IngestedSamples} audioSync={audioSyncSettings.Mode} loopbackCount={loopback?.Count ?? 0} loopbackEdgeNs={loopback?.EdgeNs ?? 0} reports={lastAudioSynchronizationReports.Count} states={states.Count} analyzeMs={lastAudioSyncAnalysisMilliseconds:0.0} aligned={DescribeAlignedAudio()}"); if (lastObsStemPublication.ReadyStems.Count > 0 || lastObsStemPublication.MissingStemIds.Count > 0) { Console.WriteLine( @@ -1462,6 +1467,12 @@ public sealed class MimirRuntime : IAquariumRuntime, IAquariumRuntimeServicesRec } Console.WriteLine($"mimir-sync-buffers {DescribeAudioBuffers()}"); + foreach (var buffer in synchronization.Buffers.Buffers.Where(static buffer => buffer.Descriptor.Kind == MimirStreamKind.Video)) + { + var frame = buffer.Latest?.VideoFrame; + Console.WriteLine( + $"mimir-video-buffer {buffer.Descriptor.SourceId} count={buffer.Count} latest={(frame == null ? "none" : $"{frame.Width}x{frame.Height} {frame.PixelFormat} bytes={buffer.Latest?.ByteLength ?? 0} resource={frame.ResourceKey} handle={frame.NativeHandle} kind={frame.NativeHandleKind} fence={frame.ProducerFenceHandle}/{frame.ProducerFenceValue}")}"); + } Console.WriteLine($"mimir-spectrum-frustum {DescribeSpectrumFrustum()}"); foreach (var spectrum in lastAudioSpectra.OrderBy(snapshot => snapshot.SourceId, StringComparer.Ordinal)) { diff --git a/src/Mimir.Runtime/Synchronization/MimirFensalirFieldLowering.cs b/src/Mimir.Runtime/Synchronization/MimirFensalirFieldLowering.cs index fcbed04..1d061a8 100644 --- a/src/Mimir.Runtime/Synchronization/MimirFensalirFieldLowering.cs +++ b/src/Mimir.Runtime/Synchronization/MimirFensalirFieldLowering.cs @@ -373,13 +373,13 @@ public sealed class MimirFensalirFieldLowering(MimirFensalirLoweringOptions? opt CameraPairId: leapWindow.StreamId, ProducerKey: profile.Id, ProfileId: profile.Id, - LeftObservationKey: $"{leapWindow.WindowId}:left-packed-r", - RightObservationKey: $"{leapWindow.WindowId}:right-packed-g", + LeftObservationKey: $"{leapWindow.WindowId}:left-ir-luma", + RightObservationKey: $"{leapWindow.WindowId}:right-ir-luma", LeftResourceKey: packedResourceKey, RightResourceKey: packedResourceKey, DisparityResourceKey: $"mimir:resource:stereo-depth:{sourceSegment}:disparity-r16f", ConfidenceResourceKey: $"mimir:resource:stereo-depth:{sourceSegment}:confidence-r8", - Width: Math.Max(1, leapWindow.SampleDescriptor.Width), + Width: Math.Max(1, leapWindow.SampleDescriptor.Width / 2), Height: Math.Max(1, leapWindow.SampleDescriptor.Height), MinDisparity: profile.MinDisparity, DisparityLevels: profile.DisparityLevels, diff --git a/src/Mimir.Runtime/Synchronization/MimirFensalirTextureLeaseClient.cs b/src/Mimir.Runtime/Synchronization/MimirFensalirTextureLeaseClient.cs index e30ba68..6e45983 100644 --- a/src/Mimir.Runtime/Synchronization/MimirFensalirTextureLeaseClient.cs +++ b/src/Mimir.Runtime/Synchronization/MimirFensalirTextureLeaseClient.cs @@ -18,7 +18,7 @@ public readonly record struct MimirFensalirTextureLease( IntPtr ProducerFenceHandle, AquariumFieldResourceDeclaration Declaration) { - public bool IsValid => NativeHandle != IntPtr.Zero && Frame.NativeHandle != 0 && !string.IsNullOrWhiteSpace(Frame.ResourceKey); + public bool IsValid => !string.IsNullOrWhiteSpace(Frame.ResourceKey) && Declaration.HasIdentity; } public sealed class MimirFensalirTextureLeaseClient(IAquariumFieldResourceBroker broker) @@ -42,8 +42,14 @@ public sealed class MimirFensalirTextureLeaseClient(IAquariumFieldResourceBroker FormatForPixelFormat(request.PixelFormat), request.ProducerAccess, request.Version)); - if (!engineLease.IsValid || engineLease.NativeHandle == IntPtr.Zero) + if (!engineLease.IsValid) { + if (Environment.GetEnvironmentVariable("MIMIR_TEXTURE_LEASE_DIAG") == "1") + { + Console.WriteLine( + $"mimir-texture-lease-failed source={request.SourceId} resource={resourceKey} {request.Width}x{request.Height} format={FormatForPixelFormat(request.PixelFormat)} access={request.ProducerAccess} valid={engineLease.IsValid} handle={engineLease.NativeHandle}"); + } + return false; } diff --git a/src/Mimir.Runtime/Synchronization/MimirKsVideoCaptureDriver.cs b/src/Mimir.Runtime/Synchronization/MimirKsVideoCaptureDriver.cs index 71dfc38..c72d885 100644 --- a/src/Mimir.Runtime/Synchronization/MimirKsVideoCaptureDriver.cs +++ b/src/Mimir.Runtime/Synchronization/MimirKsVideoCaptureDriver.cs @@ -10,7 +10,8 @@ public sealed record MimirKsVideoCaptureDriverOptions( int Height, string FourCc, double MinimumFramesPerSecond, - int QueueDepth = 8); + int QueueDepth = 8, + MimirVideoPixelFormat DeclaredPixelFormat = MimirVideoPixelFormat.Unknown); public sealed unsafe class MimirKsVideoCaptureDriver : IMimirVideoCaptureDriver, IMimirFensalirTextureLeaseReceiver { @@ -19,8 +20,12 @@ public sealed unsafe class MimirKsVideoCaptureDriver : IMimirVideoCaptureDriver, private readonly byte[] scratch; private readonly string sourceId; private readonly string fourCc; + private readonly MimirVideoPixelFormat declaredPixelFormat; private MimirFensalirTextureLeaseClient? textureLeaseClient; private string resourceKey = ""; + private ulong nativeHandle; + private string nativeHandleKind = ""; + private ulong producerFenceHandle; private bool disposed; public MimirKsVideoCaptureDriver(MimirKsVideoCaptureDriverOptions options) @@ -43,6 +48,7 @@ public sealed unsafe class MimirKsVideoCaptureDriver : IMimirVideoCaptureDriver, native = Native.Load(options.NativeLibraryPath); sourceId = options.SourceId; fourCc = options.FourCc.Trim(); + declaredPixelFormat = options.DeclaredPixelFormat; capture = native.Create( options.PathNeedle, options.Width, @@ -68,6 +74,9 @@ public sealed unsafe class MimirKsVideoCaptureDriver : IMimirVideoCaptureDriver, { textureLeaseClient = client; resourceKey = ""; + nativeHandle = 0; + nativeHandleKind = ""; + producerFenceHandle = 0; } public bool TryCapture(out MimirVideoFrameDescriptor frame, out ReadOnlyMemory data) @@ -92,7 +101,10 @@ public sealed unsafe class MimirKsVideoCaptureDriver : IMimirVideoCaptureDriver, return false; } - var pixelFormat = PixelFormatFromFourCc(FourCcFromBytes(fourCcBytes)); + var capturedPixelFormat = PixelFormatFromFourCc(FourCcFromBytes(fourCcBytes)); + var pixelFormat = declaredPixelFormat == MimirVideoPixelFormat.Unknown + ? capturedPixelFormat + : declaredPixelFormat; EnsureLease(width, height, pixelFormat, stride, timestampNs, sequence); frame = new MimirVideoFrameDescriptor( width, @@ -100,7 +112,10 @@ public sealed unsafe class MimirKsVideoCaptureDriver : IMimirVideoCaptureDriver, pixelFormat, stride, timestampNs, + NativeHandle: nativeHandle, + NativeHandleKind: nativeHandleKind, ResourceKey: resourceKey, + ProducerFenceHandle: producerFenceHandle, ProducerFenceValue: sequence); data = string.IsNullOrWhiteSpace(resourceKey) ? scratch.AsMemory(0, byteLength).ToArray() @@ -138,6 +153,9 @@ public sealed unsafe class MimirKsVideoCaptureDriver : IMimirVideoCaptureDriver, version), out var lease)) { resourceKey = lease.Frame.ResourceKey; + nativeHandle = lease.Frame.NativeHandle; + nativeHandleKind = lease.Frame.NativeHandleKind; + producerFenceHandle = unchecked((ulong)lease.ProducerFenceHandle.ToInt64()); } } diff --git a/src/Mimir.Runtime/Synchronization/MimirPs3EyeVideoCaptureDriver.cs b/src/Mimir.Runtime/Synchronization/MimirPs3EyeVideoCaptureDriver.cs index 8138c65..70c8d14 100644 --- a/src/Mimir.Runtime/Synchronization/MimirPs3EyeVideoCaptureDriver.cs +++ b/src/Mimir.Runtime/Synchronization/MimirPs3EyeVideoCaptureDriver.cs @@ -18,6 +18,9 @@ public sealed unsafe class MimirPs3EyeVideoCaptureDriver : IMimirVideoCaptureDri private readonly string sourceId; private MimirFensalirTextureLeaseClient? textureLeaseClient; private string resourceKey = ""; + private ulong nativeHandle; + private string nativeHandleKind = ""; + private ulong producerFenceHandle; private bool disposed; public MimirPs3EyeVideoCaptureDriver(MimirPs3EyeVideoCaptureDriverOptions options) @@ -53,6 +56,9 @@ public sealed unsafe class MimirPs3EyeVideoCaptureDriver : IMimirVideoCaptureDri { textureLeaseClient = client; resourceKey = ""; + nativeHandle = 0; + nativeHandleKind = ""; + producerFenceHandle = 0; } public bool TryCapture(out MimirVideoFrameDescriptor frame, out ReadOnlyMemory data) @@ -82,7 +88,10 @@ public sealed unsafe class MimirPs3EyeVideoCaptureDriver : IMimirVideoCaptureDri MimirVideoPixelFormat.Bayer8, stride, timestampNs, + NativeHandle: nativeHandle, + NativeHandleKind: nativeHandleKind, ResourceKey: resourceKey, + ProducerFenceHandle: producerFenceHandle, ProducerFenceValue: sequence); data = string.IsNullOrWhiteSpace(resourceKey) ? scratch.AsMemory(0, byteLength).ToArray() @@ -120,6 +129,9 @@ public sealed unsafe class MimirPs3EyeVideoCaptureDriver : IMimirVideoCaptureDri version), out var lease)) { resourceKey = lease.Frame.ResourceKey; + nativeHandle = lease.Frame.NativeHandle; + nativeHandleKind = lease.Frame.NativeHandleKind; + producerFenceHandle = unchecked((ulong)lease.ProducerFenceHandle.ToInt64()); } } diff --git a/src/Mimir.Runtime/Synchronization/MimirRuntimeConfiguration.cs b/src/Mimir.Runtime/Synchronization/MimirRuntimeConfiguration.cs index 972bd33..d9cda77 100644 --- a/src/Mimir.Runtime/Synchronization/MimirRuntimeConfiguration.cs +++ b/src/Mimir.Runtime/Synchronization/MimirRuntimeConfiguration.cs @@ -168,9 +168,10 @@ public sealed class MimirRuntimeConfiguration stream.PathNeedle, stream.Width, stream.Height, - stream.PixelFormat, + string.IsNullOrWhiteSpace(stream.InputFormat) ? stream.PixelFormat : stream.InputFormat, stream.MinimumFramesPerSecond, - stream.QueueDepth)), + stream.QueueDepth, + ParsePixelFormat(stream.PixelFormat))), static () => StopwatchTicksToNs(System.Diagnostics.Stopwatch.GetTimestamp()))); } diff --git a/state/evidence.jsonl b/state/evidence.jsonl index 44f15c8..e1bbcb3 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -248,3 +248,4 @@ {"ts": "2026-05-30T23:14:23+01:00", "type": "verification", "status": "ok", "note": "Fensalir branch codex/leap-packed-depth now has the first D3D12 point-cloud render lane for Mimir's Leap mesh socket: derived-from SurfacePage meshes allocate UAV-capable buffers, point vertices/indices are generated from disparity, and the point list renders through scene candidate targets. Verified Fensalir engine/client builds, stereo/resize tests, headless pipeline capture, and Mimir BufferSmoke rebuild against the updated contracts."} {"ts": "2026-05-31T00:47:41+01:00", "type": "verification", "status": "warn", "note": "Eve dialogue probe: added Mimir.EveDialogue and EveCanvas dialogue/ack handling. Eve host reached Starfire dialogue /health on 192.168.1.66:8792, proving network path. EveCanvas binary contains dialogue code and builds on-device, but launching via uiopen or SSH did not open /stream; remaining blocker is foreground/SpringBoard app activation or observing/accepting the UI on the iPad, not Starfire reachability."} {"ts": "2026-05-31T01:03:07+01:00", "type": "verification", "status": "ok", "note": "Eve dashboard proof: EveCanvas rendered the native dashboard on device from Mimir.EveDashboard snapshots, showing scene graph/source panels and transform controls. A command smoke moved eve-camera and received version 2 state. Screenshot exposed legacy debug overlay occlusion; EveCanvas now hides the debug overlay while dashboard mode is active."} +{"ts": "2026-05-31T01:06:44+01:00", "type": "verification", "status": "ok", "note": "Live Leap surface-claim proof captured artifacts/runtime/mimir-leap-surface-claims-clean.png. With AQUARIUM_DISABLE_RESERVOIR_HISTORY=1, Fensalir now presents the current reservoir resolver target instead of an unwritten history target; LeapUVC frames uploaded through the Fensalir-owned D3D12 texture, packed stereo depth dispatched, point-cloud compute generated 19,200 SDF/PBR/radiosity surface splats, point-list rendering stayed diagnostic at rendered 0, and visible Leap-derived splats reached presentation."} diff --git a/state/map.yaml b/state/map.yaml index c19ecce..8806a0c 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -84,9 +84,17 @@ invariants: live Leap stereo-depth claim. `Mimir.BufferSmoke --leap-point-cloud-root-smoke` proves one `SurfacePage` packet plus one `Mesh` packet and zero deferred requests. Fensalir branch `codex/leap-packed-depth` now owns the matching - first render lane: generated PointList Mesh buffers are filled from the - disparity SurfacePage on D3D12 and rendered into scene candidate targets. - Live-device/editor verification, calibrated projection constants, full SGM, + first native surface-claim lane: generated PointList Mesh buffers are + filled from the disparity SurfacePage on D3D12 for diagnostics, while the + same compute pass writes approximated normals, curvature, SDF, PBR, and + radiosity data into Fensalir's splat reservoir buffers. The point-list draw + path is diagnostic-only; live presentation goes through Fensalir's + splat/reservoir resolver. The live proof + `artifacts/runtime/mimir-leap-surface-claims-clean.png` showed LeapUVC + frames uploaded through a Fensalir-owned D3D12 texture, packed stereo depth + dispatch-ready/dispatched, 19,200 generated surface claims, point-list + rendering at `rendered 0`, and visible reservoir-resolved Leap splats. + Calibrated projection constants, full SGM, reservoir-history startup repair, and global residual/calibration ownership remain open. - Fensalir packet payload handles are not authority. Live payload references must resolve through declared typed GPU/native resources with shape, @@ -735,14 +743,17 @@ current_status: Kiyo 30.18 fps, PS3 Eye 0 59.66 fps, and PS3 Eye 1 59.95 fps. A mouse in the Leap USB neighborhood does not reproduce the Focusrite-induced collapse. next_action: > - Continue the Leap-first visual geometry cut. Mimir now lowers live - `LeapStereoIr` packed R/G stereo into a disparity SurfacePage and declares a - derived point-cloud Mesh socket. Fensalir now has the first D3D12 - disparity-to-point render lane. The next implementation is live-device/editor - verification, calibrated projection constants, then a global - residual/calibration owner that can consume point-cloud alignment error. Do - not fan RGB cameras into fake depth: PS3 Eyes are fast motion/feature - witnesses, Kiyos and Eve are RGB/context witnesses, and Leap owns the first - dense close-range geometry. Keep the Focusrite away from the Leap USB - neighborhood. Treat Kiyo Pro as a ~25 fps source until its SuperSpeed - negotiation is fixed. + Continue the Leap-first visual geometry cut from the verified surface-claim + path. Mimir lowers live `LeapStereoIr` packed R/G stereo into a disparity + SurfacePage and declares a derived point-cloud Mesh socket. Fensalir now + generates Leap surface splats from that disparity, feeds them into the + native splat/reservoir resolver, and presents visible Leap-derived points + without the diagnostic point-list draw path. Next: replace provisional + projection display fit with calibrated Leap intrinsics/extrinsics, repair + reservoir-history startup so the temporal pass can stay enabled, then add a + global residual/calibration owner that can consume point-cloud alignment + error. Do not fan RGB cameras into fake depth: PS3 Eyes are fast + motion/feature witnesses, Kiyos and Eve are RGB/context witnesses, and Leap + owns the first dense close-range geometry. Keep the Focusrite away from the + Leap USB neighborhood. Treat Kiyo Pro as a ~25 fps source until its + SuperSpeed negotiation is fixed.