Mark stereo depth disparity as compute output
This commit is contained in:
parent
67f1c662f0
commit
f868ddf18d
8 changed files with 71 additions and 22 deletions
|
|
@ -43,9 +43,10 @@ monocular model demos are provenance only. The live owner is Fensalir D3D12
|
|||
compute over Mimir-declared texture resources and calibration state.
|
||||
The first contract slice now exists in `MimirStereoDepthConfigurations` and
|
||||
`MimirFensalirFieldLowering.BuildStereoDepthCandidateFrame`: a calibrated
|
||||
stereo pair profile emits a GPU-resident R16F disparity `SurfacePage`, an R8
|
||||
confidence texture, and a Height FieldEvidence claim planned to the
|
||||
`SurfacePage` backend. This is the socket for the kernel, not the kernel.
|
||||
stereo pair profile emits a GPU-resident compute-writable R16F disparity
|
||||
`SurfacePage`, an R8 confidence texture, and a Height FieldEvidence claim
|
||||
planned to the `SurfacePage` backend. This is the socket for the kernel, not
|
||||
the kernel.
|
||||
|
||||
Those claims are not inherently pixel-sized. Pixel-level resolve consumes the
|
||||
reservoir, but claim support is chosen from the represented field. Smooth
|
||||
|
|
@ -215,6 +216,17 @@ a named invariant that the native runtime cannot protect yet.
|
|||
with preset paths and strength; until the renderer grows LUT texture sampling,
|
||||
preset exposure and bloom are mapped into existing `GraphicsSettings`.
|
||||
`Mimir.BufferSmoke --presentation-control-smoke` proves the state owner.
|
||||
- `MimirSceneEditorState` owns the new Mimir-window editor graph. It is not the
|
||||
OBS program output: it owns editor camera, selected node, sensor-feed panels,
|
||||
SDF text-panel nodes, model placeholders, visibility, locks, transforms, reset
|
||||
commands, and grab/rotate/resize gizmo intent. `MimirRuntime` renders derived
|
||||
spline outlines and handle markers from that state, and the `Mimir Editor`
|
||||
panel exposes hierarchy, visibility, transform, creation, and reset controls.
|
||||
See [[scene-editor-control-surface|Mimir Scene Editor Control Surface]].
|
||||
`Mimir.BufferSmoke --scene-editor-smoke` proves the graph/control/gizmo owner
|
||||
path. World SDF text glyph rendering, ASSIMP-style mesh import/upload, and
|
||||
pixel-accurate gizmo hit-testing remain Fensalir renderer cuts rather than
|
||||
Mimir-side fake outputs.
|
||||
- `MimirRuntime` no longer submits the legacy direct `AquariumSplineFrame`
|
||||
spectrum dashboard. Live spectrum visualization authority is the
|
||||
`AquariumFieldEvidenceFrame`: Mimir declares the rolling resource, emits a
|
||||
|
|
|
|||
|
|
@ -179,8 +179,9 @@ Likely shape:
|
|||
- Current contract proof:
|
||||
`Mimir.BufferSmoke --stereo-depth-contract-smoke` validates the profile and
|
||||
FieldEvidence socket. The synthetic Leap stereo pair produces an R16F
|
||||
disparity `SurfacePage`, an R8 confidence `Texture2D`, one Height claim, and
|
||||
one planned `SurfacePage` packet. It is not yet a live compute kernel.
|
||||
compute-writable disparity `SurfacePage`, an R8 confidence `Texture2D`, one
|
||||
Height claim, and one planned `SurfacePage` packet. It is not yet a live
|
||||
compute kernel.
|
||||
- Native reservoir preserves rolling evidence.
|
||||
- Fusion emits surface/material/render claims.
|
||||
- Program video publishes via Spout2.
|
||||
|
|
|
|||
|
|
@ -382,6 +382,16 @@ filter production surface intents before Fensalir composition; audio controls
|
|||
modify Faust gain controls and sample gain before Fensalir streaming DSP. LUT
|
||||
presets are typed postprocess state, with exposure/bloom currently mapped into
|
||||
`GraphicsSettings` and LUT texture sampling left as the next renderer hook.
|
||||
`MimirSceneEditorState` is now the separate Mimir-window editor owner. It owns
|
||||
the editor camera, dynamic scene nodes, selected node, visibility/lock state,
|
||||
2D-plane transforms, reset commands, and grab/rotate/resize gizmo mode. Rolling
|
||||
video buffers derive sensor-feed panel nodes; SDF text panels and model import
|
||||
requests create editor graph nodes. `MimirRuntime` presents that editor through
|
||||
the Fensalir camera plus derived spline outlines, selection handles, and the
|
||||
`Mimir Editor` hierarchy/transform panel. This editor is not the OBS program
|
||||
output. World SDF glyph rendering, ASSIMP-style mesh decoding/upload, and
|
||||
pixel-accurate gizmo hit-testing are explicit Fensalir renderer cuts, mapped in
|
||||
[[docs/scene-editor-control-surface|Mimir Scene Editor Control Surface]].
|
||||
|
||||
## Visual Fusion
|
||||
|
||||
|
|
@ -399,9 +409,9 @@ research references only.
|
|||
The first live contract exists: `MimirStereoDepthConfigurations` names the
|
||||
libSGM-provenance D3D12 SGM profile, and
|
||||
`MimirFensalirFieldLowering.BuildStereoDepthCandidateFrame` lowers a synthetic
|
||||
rectified stereo result into GPU-resident disparity/confidence resources plus a
|
||||
Height FieldEvidence claim planned as a `SurfacePage` packet. The kernel itself
|
||||
is still future work.
|
||||
rectified stereo result into a GPU-resident compute-writable disparity
|
||||
SurfacePage, confidence texture, and Height FieldEvidence claim planned as a
|
||||
`SurfacePage` packet. The kernel itself is still future work.
|
||||
|
||||
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.
|
||||
|
|
|
|||
|
|
@ -43,6 +43,14 @@ Get-Content .\state\evidence.jsonl -Tail 8
|
|||
- `native/reservoir` owns the lower shared-edge typed-handle invariant for
|
||||
Fensalir/Faust binding work.
|
||||
- Fensalir owns production GPU fusion, UI, and Spout2 publication.
|
||||
- `MimirSceneEditorState` owns the current Mimir-window editor graph, not the
|
||||
OBS program output: editor camera, source/text/model nodes, visibility,
|
||||
transforms, reset controls, and grab/rotate/resize gizmo intent. The
|
||||
`Mimir Editor` panel and derived spline/handle geometry are live now; world
|
||||
SDF text glyphs, ASSIMP-style mesh import/upload, and clickable gizmo
|
||||
hit-testing are still Fensalir renderer cuts. See
|
||||
[[docs/scene-editor-control-surface|Mimir Scene Editor Control Surface]] and
|
||||
smoke with `--scene-editor-smoke`.
|
||||
- Live camera image buffers should use Fensalir-owned texture leases when they
|
||||
are rendering inputs: Mimir asks the engine broker for a keyed D3D12
|
||||
Texture2D/fence lease, writes decoded frames into that texture, commits the
|
||||
|
|
@ -86,8 +94,8 @@ Get-Content .\state\evidence.jsonl -Tail 8
|
|||
The first code contract is in `MimirStereoDepthConfigurations` and
|
||||
`MimirFensalirFieldLowering.BuildStereoDepthCandidateFrame`; run
|
||||
`dotnet run --project .\src\Mimir.BufferSmoke\Mimir.BufferSmoke.csproj -- --stereo-depth-contract-smoke`
|
||||
to verify the synthetic R16F disparity `SurfacePage` FieldEvidence socket.
|
||||
This proves the lane shape, not the SGM kernel.
|
||||
to verify the synthetic compute-writable R16F disparity `SurfacePage`
|
||||
FieldEvidence socket. This proves the lane shape, not the SGM kernel.
|
||||
- Fensalir also owns the EVE-facing dashboard pixels through
|
||||
`Global\MimirFensalirProgramTexture`. `src/Mimir.EveRelay` opens that shared
|
||||
texture, encodes H.264 Annex-B with NVENC by default, and serves EveCanvas
|
||||
|
|
|
|||
|
|
@ -2266,7 +2266,7 @@ static int RunStereoDepthContractSmoke()
|
|||
Console.WriteLine(
|
||||
$"stereo-depth-field resources={frame.Resources.Count} claims={frame.Claims.Count} planned={plan.Packets.Count} deferred={plan.DeferredRequests.Count} errors={validation.HasErrors}");
|
||||
Console.WriteLine(
|
||||
$"stereo-depth-output disparity={disparity.ResourceKey} kind={disparity.Kind} format={disparity.Format} confidence={confidence.ResourceKey} confidenceFormat={confidence.Format} backend={(plan.Packets.Count > 0 ? plan.Packets[0].Backend : AquariumFieldBackendKind.Unknown)}");
|
||||
$"stereo-depth-output disparity={disparity.ResourceKey} kind={disparity.Kind} access={disparity.Access} format={disparity.Format} confidence={confidence.ResourceKey} confidenceFormat={confidence.Format} backend={(plan.Packets.Count > 0 ? plan.Packets[0].Backend : AquariumFieldBackendKind.Unknown)}");
|
||||
|
||||
return !validation.HasErrors &&
|
||||
!profile.LiveDependency &&
|
||||
|
|
@ -2278,6 +2278,7 @@ static int RunStereoDepthContractSmoke()
|
|||
frame.Resources.Count == 2 &&
|
||||
disparity.Kind == AquariumFieldResourceKind.SurfacePage &&
|
||||
disparity.Residency == AquariumFieldResourceResidency.GpuResident &&
|
||||
disparity.Access == AquariumFieldShaderAccess.UnorderedAccess &&
|
||||
disparity.Format == "R16Float" &&
|
||||
confidence.Kind == AquariumFieldResourceKind.Texture2D &&
|
||||
confidence.Format == "R8_UNorm" &&
|
||||
|
|
|
|||
|
|
@ -703,14 +703,21 @@ public sealed class MimirFensalirFieldLowering(MimirFensalirLoweringOptions? opt
|
|||
|
||||
private static AquariumFieldResourceDeclaration DisparityResourceForStereoDepthCandidate(
|
||||
MimirStereoDepthFieldCandidate depthCandidate) =>
|
||||
AquariumFieldResourceDeclaration.SurfacePage(
|
||||
depthCandidate.DisparityResourceKey,
|
||||
Math.Max(1, depthCandidate.Width),
|
||||
Math.Max(1, depthCandidate.Height),
|
||||
format: "R16Float",
|
||||
version: checked((ulong)Math.Max(0L, depthCandidate.ObservedTimeNs)),
|
||||
validFromNs: depthCandidate.ObservedTimeNs,
|
||||
validUntilNs: depthCandidate.ObservedTimeNs);
|
||||
new(
|
||||
ResourceKey: depthCandidate.DisparityResourceKey,
|
||||
Kind: AquariumFieldResourceKind.SurfacePage,
|
||||
Residency: AquariumFieldResourceResidency.GpuResident,
|
||||
Access: AquariumFieldShaderAccess.UnorderedAccess,
|
||||
Format: "R16Float",
|
||||
Width: Math.Max(1, depthCandidate.Width),
|
||||
Height: Math.Max(1, depthCandidate.Height),
|
||||
DepthOrCount: 1,
|
||||
StrideBytes: 2,
|
||||
ValidFromNs: depthCandidate.ObservedTimeNs,
|
||||
ValidUntilNs: depthCandidate.ObservedTimeNs,
|
||||
Version: checked((ulong)Math.Max(0L, depthCandidate.ObservedTimeNs)),
|
||||
NativeHandle: IntPtr.Zero,
|
||||
NativeHandleKind: "fensalir-stereo-depth-disparity");
|
||||
|
||||
private static AquariumFieldResourceDeclaration ConfidenceResourceForStereoDepthCandidate(
|
||||
MimirStereoDepthFieldCandidate depthCandidate)
|
||||
|
|
|
|||
|
|
@ -230,3 +230,4 @@
|
|||
{"ts": "2026-05-29T23:50:56+01:00", "type": "decision", "status": "ok", "note": "Fast stereo depth is mapped as a future Fensalir-owned D3D12 compute lane, with libSGM as permissive SGM provenance rather than a CUDA dependency. External TensorRT/monocular depth projects remain reference evidence only; live depth must consume Mimir-declared texture resources, calibration, and fences, then emit GPU disparity/depth/confidence resources and FieldEvidence claims."}
|
||||
{"ts": "2026-05-29T23:52:11+01:00", "type": "decision", "status": "ok", "note": "Mimir Program panel now owns Fensalir presentation intent: video visibility/solo/opacity/layer filters production surface intents, audio mute/solo/gain feeds Faust controls and streaming samples, and LUT presets are typed postprocess state with exposure/bloom mapped to current GraphicsSettings until renderer LUT sampling lands."}
|
||||
{"ts": "2026-05-30T00:21:36+01:00", "type": "implementation", "status": "ok", "note": "Added the first stereo-depth contract slice: MimirStereoDepthConfigurations names a non-dependency libSGM-provenance D3D12 SGM profile, compute/visual/module catalogs include stereo depth, and MimirFensalirFieldLowering.BuildStereoDepthCandidateFrame lowers synthetic rectified stereo depth into GPU-resident R16F disparity SurfacePage plus R8 confidence Texture2D and a Height FieldEvidence claim. Verified with --stereo-depth-contract-smoke and --perfect-machine-profile-smoke; actual HLSL/D3D12 SGM kernel remains future work."}
|
||||
{"ts": "2026-05-30T00:29:32+01:00", "type": "implementation", "status": "ok", "note": "Stereo-depth FieldEvidence socket now declares its R16F disparity SurfacePage as compute-writable UnorderedAccess, matching Fensalir's new UAV-capable SurfacePage resolver. Verified Mimir build after shutting down stale build servers plus --stereo-depth-contract-smoke and --perfect-machine-profile-smoke; Fensalir focused test verifies UAV SurfacePage allocation/descriptors/reuse. The SGM HLSL kernels still remain future work."}
|
||||
|
|
|
|||
|
|
@ -60,9 +60,9 @@ invariants:
|
|||
- The first stereo-depth contract is code-visible:
|
||||
`MimirStereoDepthConfigurations` names the libSGM-provenance D3D12 SGM
|
||||
profile, and `MimirFensalirFieldLowering.BuildStereoDepthCandidateFrame`
|
||||
lowers synthetic rectified stereo depth into an R16F disparity SurfacePage,
|
||||
R8 confidence Texture2D, and Height FieldEvidence claim. The actual SGM
|
||||
HLSL/D3D12 kernel is still future work.
|
||||
lowers synthetic rectified stereo depth into a compute-writable R16F
|
||||
disparity SurfacePage, R8 confidence Texture2D, and Height FieldEvidence
|
||||
claim. The actual SGM HLSL/D3D12 kernel is still future work.
|
||||
- Fensalir packet payload handles are not authority. Live payload references
|
||||
must resolve through declared typed GPU/native resources with shape,
|
||||
residency, shader access, validity, version, and handle metadata before
|
||||
|
|
@ -243,6 +243,15 @@ accepted_design:
|
|||
Faust streaming DSP path. LUT presets are typed postprocess state; exposure
|
||||
and bloom map into current Fensalir `GraphicsSettings`, while actual LUT
|
||||
texture sampling remains the named renderer hook.
|
||||
`MimirSceneEditorState` owns the separate Mimir-window editor graph:
|
||||
editor camera, scene nodes, selected node, visibility/locks, 2D-plane
|
||||
transforms, reset affordances, and grab/rotate/resize gizmo mode. Rolling
|
||||
video buffers derive sensor-feed panel nodes, while SDF text and model
|
||||
import controls create editor graph nodes. `MimirRuntime` renders derived
|
||||
outlines/handles through the Fensalir frame and exposes the `Mimir Editor`
|
||||
hierarchy/transform panel. This is not OBS program output. World SDF glyph
|
||||
rendering, ASSIMP-style mesh decoding/upload, and pixel-accurate gizmo
|
||||
hit-testing remain Fensalir renderer cuts.
|
||||
`scripts/build-obs-stem-plugin.ps1` stages the upstream OBS plugin template
|
||||
SDK under `artifacts/obs-sdk/` and builds the plugin DLL locally.
|
||||
The synthetic
|
||||
|
|
|
|||
Loading…
Reference in a new issue