Fix spectrum source lane budget

This commit is contained in:
Meta Vens 2026-05-27 11:48:18 +01:00
commit b285acf481
6 changed files with 57 additions and 25 deletions

View file

@ -165,3 +165,4 @@
{"ts": "2026-05-27T11:33:22+01:00", "type": "implementation", "status": "ok", "note": "Mimir spectrum upload is now a rolling column matrix instead of a latest-frame row dump. The shared Float32 resource flattens physical columns as history-age/source-lane pairs; Mimir emits one TubeField claim/lowering per source with ColumnStride=sourceCount and ColumnStep.z=0.1 so each source gets its own age trail through the shared GPU buffer."}
{"ts": "2026-05-27T11:38:16+01:00", "type": "implementation", "status": "ok", "note": "Mimir spectrum resource declarations now use fixed history capacity instead of growing with the currently filled trail. The runtime smoke proves 48 bands x 4 source lanes x 40 history capacity = 7680 uploaded floats while only the active history count is emitted through each source lowering. This avoids frame-to-frame GPU buffer resizing while preserving the rolling age trail."}
{"ts": "2026-05-27T11:41:00+01:00", "type": "implementation", "status": "ok", "note": "Mimir now exposes MIMIR_SPECTRUM_TUBE_SUBDIVISIONS as the first runtime cost lever for TubeField overflow. The spectrum upload smoke sets it to 2 and verifies every emitted source-lane TubeSpline lowering uses that Catmull-Rom subdivision count, so Fensalir's requested/dispatched/truncated segment report can be answered without changing code."}
{"ts": "2026-05-27T11:47:48+01:00", "type": "implementation", "status": "ok", "note": "Mimir spectrum upload now has fixed source-lane capacity as well as fixed history capacity. MIMIR_SPECTRUM_SOURCE_LANES sets the lane budget, TubeSpline lowerings use that budget as ColumnStride, surplus sources are truncated and reported in the runtime UI, and --mimir-spectrum-upload-smoke verifies 48 bands x 8 lanes x 40 history capacity = 15360 uploaded floats while emitting only four active TubeField claims/lowerings."}

View file

@ -363,14 +363,16 @@ accepted_design:
GPU-resident Texture2D field resource and binds the TubeField material by
`RampResourceKey`.
Runtime spectrum columns now represent flattened `(history age, source
lane)` pairs. Mimir emits one TubeField claim/lowering per source, each
using `ColumnStride=sourceCount` through the shared Float32 resource so the
generated geometry renders a true age trail at `z = age * 0.1`. The
spectrum resource advertises a fixed history capacity so frame content
versions do not resize the GPU buffer while the rolling trail fills.
`MIMIR_SPECTRUM_TUBE_SUBDIVISIONS` controls the Mimir-requested Catmull-Rom
subdivisions so Fensalir's TubeField truncation report has a direct cost
lever.
lane)` pairs. Mimir emits one TubeField claim/lowering per active source.
The spectrum resource advertises fixed history and source-lane capacities
so frame content versions and source topology changes do not resize the GPU
buffer while the rolling trail fills. `MIMIR_SPECTRUM_SOURCE_LANES` sets
the lane capacity; surplus sources are truncated and reported in the
runtime UI. Lowerings use that capacity as `ColumnStride` through the
shared Float32 resource so each active lane renders a true age trail at
`z = age * 0.1`. `MIMIR_SPECTRUM_TUBE_SUBDIVISIONS` controls the
Mimir-requested Catmull-Rom subdivisions so Fensalir's TubeField
truncation report has a direct cost lever.
- `config/perfect-machine.example.json` declares live owners, sensors,
reservoir views, and runtime policy.
- `src/Mimir.Runtime/Synchronization` now includes the Perfect Machine module