fix(rendering): bound portal resource lifetime
Separate logical ownership, render publication, and GPU retirement across live entities, landblocks, particles, textures, mesh arenas, portal/UI teardown, and per-frame scratch storage. Add bounded DAT/texture caches, upload budgets, three-frame fence retirement, exact-incarnation appearance reconciliation, frame pacing, and extensive lifetime conformance coverage.\n\nThe seven-destination connected route now cuts peak working/private memory roughly in half, returns Caul to 125-153 FPS locally, and produces no WER or AMD reset.\n\nCo-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
parent
3971997689
commit
749e8ceeb1
225 changed files with 29107 additions and 3914 deletions
|
|
@ -179,6 +179,36 @@ public class ChatWindowControllerTests
|
|||
Assert.Contains(ctrl!.Input, bar!.Children);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TranscriptLayout_IsReusedUntilContentOrWidthChanges()
|
||||
{
|
||||
var (rootInfo, layout, vm) = BuildTestTree();
|
||||
var bus = new CaptureBus();
|
||||
var ctrl = ChatWindowController.Bind(
|
||||
rootInfo, layout, vm, () => bus, null, null, NoTex)!;
|
||||
|
||||
vm.ShowSystemMessage("one wrapped transcript line");
|
||||
IReadOnlyList<UiText.Line> first = ctrl.Transcript.LinesProvider();
|
||||
IReadOnlyList<UiText.Line> unchanged = ctrl.Transcript.LinesProvider();
|
||||
|
||||
Assert.Same(first, unchanged);
|
||||
Assert.Equal(1, ctrl.TranscriptLayoutBuildCount);
|
||||
|
||||
vm.ShowSystemMessage("second line");
|
||||
IReadOnlyList<UiText.Line> appended = ctrl.Transcript.LinesProvider();
|
||||
Assert.NotSame(first, appended);
|
||||
Assert.Equal(2, ctrl.TranscriptLayoutBuildCount);
|
||||
|
||||
ctrl.Transcript.Width -= 40f;
|
||||
IReadOnlyList<UiText.Line> resized = ctrl.Transcript.LinesProvider();
|
||||
Assert.NotSame(appended, resized);
|
||||
Assert.Equal(3, ctrl.TranscriptLayoutBuildCount);
|
||||
|
||||
vm.Clear();
|
||||
Assert.Empty(ctrl.Transcript.LinesProvider());
|
||||
Assert.Equal(4, ctrl.TranscriptLayoutBuildCount);
|
||||
}
|
||||
|
||||
// ── Test 4: Input.OnSubmit publishes SendChatCmd via the capture bus ─────
|
||||
|
||||
[Fact]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue