Expose TubeField budget counters

This commit is contained in:
Meta Vens 2026-05-27 11:51:35 +01:00
commit beece21c95
3 changed files with 11 additions and 3 deletions

View file

@ -551,7 +551,10 @@ public sealed class D3D12Renderer : IAquariumRenderer
$"domains {activeFieldEvidenceFrame.Domains.Count} / claims {activeFieldEvidenceFrame.Claims.Count} / " +
$"resources {activeFieldEvidenceFrame.Resources.Count} resolved {activeFieldResourceStats.Resolved} unsupported {activeFieldResourceStats.Unsupported} / " +
$"candidates {activeFieldEvidenceFrame.Candidates.Count} / packets {activeFieldEvidenceFrame.BackendPackets.Count} / " +
$"planned {activeFieldLoweringPlan.Packets.Count} / deferred {activeFieldLoweringPlan.DeferredRequests.Count} / errors {errorCount}";
$"planned {activeFieldLoweringPlan.Packets.Count} / deferred {activeFieldLoweringPlan.DeferredRequests.Count} / errors {errorCount}" +
(activeFieldEvidenceFrame.TubeSplineLowerings.Count > 0
? $" / tube requested {activeTubeFieldRequestedSegments} dispatched {activeTubeFieldDispatchedSegments} truncated {activeTubeFieldTruncatedSegments} uploads {activeFieldResourceUploadCount} skipped {activeFieldResourceUploadSkippedCount} unplanned {activeTubeFieldUnplannedLowerings}"
: string.Empty);
}
private void UpdateTerminalInputFromDisplay(string value)

View file

@ -251,3 +251,4 @@
{"lesson":"Resource declarations no longer pretend to contain live samples. AquariumFieldEvidenceFrame now has ResourceUploads for per-frame Float32 producer data; validation checks uploads reference declared resources, and D3D12Renderer uploads Float32 data into resolved structured buffers before TubeField compute expansion. This gives Fensalir-owned GPU-resident TubeField resources actual spectrum/sample contents without using CPU tessellation or a fake native handle. Fensalir build, Aquarium.Engine.Tests (27 tests), and headless reload passed.","timestamp":"2026-05-26T23:36:00+01:00","files":["src/Aquarium.Engine.Contracts/Render/AquariumFieldEvidence.cs","src/Aquarium.Engine/Render/D3D12Renderer.cs","tests/Aquarium.Engine.Tests/FieldEvidenceContractTests.cs","state/map.yaml"],"source":"user clarified spectral frames must feed the GPU buffer","topic":"field-resource-float32-uploads"}
{"lesson":"Field resource upload validation now checks upload shape, not only existence. Float32 uploads must target declared StructuredBuffer/CurvePointBuffer resources with Float32 format, 4-byte stride, and sufficient element capacity. Oversized or non-Float uploads are validation errors before renderer upload. Fensalir build, Aquarium.Engine.Tests (29 tests), and headless reload passed.","timestamp":"2026-05-26T23:39:00+01:00","files":["src/Aquarium.Engine.Contracts/Render/AquariumFieldEvidence.cs","tests/Aquarium.Engine.Tests/FieldEvidenceContractTests.cs"],"source":"tightened field resource upload contract","topic":"field-resource-upload-validation"}
{"lesson":"Structured buffer declaration version is content freshness, not shape authority. D3D12FieldResourceRegistry now reuses an existing structured buffer when element count, stride, and access are unchanged, updating the recorded version instead of reallocating GPU memory every frame. This fixed the rolling Mimir spectrum path, where increasing evidence versions and history updates were able to churn the D3D12 resource and trigger DXGI device removal during a longer headless capture. Fensalir build, Aquarium.Engine.Tests, Mimir build/field smokes, and long Mimir headless capture passed after the fix.","timestamp":"2026-05-27T11:37:00+01:00","files":["src/Aquarium.Engine/Render/D3D12FieldResourceRegistry.cs","state/map.yaml"],"source":"rolling Mimir spectrum TubeField verification","topic":"structured-buffer-version-reuse"}
{"lesson":"Fensalir's debug field-evidence summary now exposes TubeField requested, dispatched, truncated, resource-upload, skipped-upload, and unplanned-lowering counters. Mimir's source-lane and subdivision budgets can be tuned from live renderer feedback instead of inferred from planner counts alone. Fensalir build and Aquarium.Engine.Tests passed.","timestamp":"2026-05-27T11:52:00+01:00","files":["src/Aquarium.Engine/Render/D3D12Renderer.cs","state/map.yaml"],"source":"Mimir fixed source-lane budget follow-up","topic":"tubefield-budget-debug-summary"}

View file

@ -97,8 +97,12 @@ next_actions:
executes the packet with ExecuteIndirect. The first material is opaque field
geometry with squared normalized emission, fake Fresnel center-bright/
edge-dark shaping, and requested/dispatched/truncated/indirect-draw segment
reporting. SurfacePage resources now have a first resolver: contracts and
DSL can declare GPU-resident 2D pages with width, height, format, version,
reporting. The debug field-evidence summary exposes TubeField requested,
dispatched, truncated, upload, skipped-upload, and unplanned-lowering
counts so client-side subdivision budgets can be tuned from the live
renderer result instead of guessed. SurfacePage resources now have a first
resolver: contracts and DSL can declare GPU-resident 2D pages with width,
height, format, version,
and optional local source, and the D3D12 registry allocates/imports them as
shader-readable page textures. VolumeTexture resources now have the same
first resolver shape: contracts and DSL can declare GPU-resident 3D