Upload CPU camera frames into Fensalir leases

This commit is contained in:
Meta Vens 2026-05-27 14:11:48 +01:00
commit 7f3df7979b
9 changed files with 105 additions and 8 deletions

View file

@ -176,3 +176,4 @@
{"ts": "2026-05-27T13:26:42+01:00", "type": "decision", "status": "ok", "note": "Fensalir-owned Texture2D leases are the preferred live camera payload authority: Mimir receives AquariumRuntimeServices, requests keyed D3D12 texture/fence leases, writes decoded frames into the engine-owned shared texture, commits producer fence values, and lowers the resource key through FieldEvidence. Imported shared texture handles remain fallback/import edges."}
{"ts": "2026-05-27T13:32:24+01:00", "type": "decision", "status": "ok", "note": "Texture lease services now propagate from MimirRuntime into direct video capture sources. MimirVideoCaptureDriverSource forwards a MimirFensalirTextureLeaseClient to drivers that implement IMimirFensalirTextureLeaseReceiver, so a direct camera driver can request its Fensalir-owned destination texture before it emits the frame descriptor and producer fence value."}
{"ts": "2026-05-27T13:37:42+01:00", "type": "decision", "status": "ok", "note": "Camera ingest policy is now closest-to-device first. Fensalir-owned Texture2D leases remain the render-input authority, but each native camera backend must choose the most direct device path available and report unavoidable copy count. Managed wrappers, process bridges, and system-memory rings are diagnostics or fallbacks, not production hot-path owners."}
{"ts": "2026-05-27T14:07:32+01:00", "type": "decision", "status": "ok", "note": "Raw single-plane CPU-origin camera frames now have an explicit Fensalir texture upload fallback. MimirVideoCaptureDriverSource uploads returned frame bytes into the leased Fensalir Texture2D through the broker, clears the live managed payload after successful upload, and increments MimirVideoFrameDescriptor.UnavoidableCopyCount. CPU NV12 upload is rejected until Fensalir has a real planar copy path; GPU/direct producers should bypass this lane and remain at zero copies."}

View file

@ -317,6 +317,12 @@ accepted_design:
Camera backends must use the closest-to-device path available and report
unavoidable copies; process or managed convenience layers are diagnostics,
not production camera hot-path owners.
Raw single-plane system-memory frames use the explicit fallback upload lane:
`MimirVideoCaptureDriverSource` uploads the bytes into the Fensalir lease,
drops the managed payload from the live sample, and increments
`UnavoidableCopyCount`. NV12 CPU upload is rejected until Fensalir has a
real planar upload path; device/GPU NV12 producers should write the leased
texture directly.
`Mimir.BufferSmoke --fensalir-camera-observation-smoke`
verifies the split, and `--fensalir-texture-lease-smoke` verifies the
engine-owned lease path. Camera image claims currently defer until Fensalir