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
57
tests/AcDream.App.Tests/World/LiveEntityTeardownPlanTests.cs
Normal file
57
tests/AcDream.App.Tests/World/LiveEntityTeardownPlanTests.cs
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
using AcDream.App.World;
|
||||
|
||||
namespace AcDream.App.Tests.World;
|
||||
|
||||
public sealed class LiveEntityTeardownPlanTests
|
||||
{
|
||||
[Fact]
|
||||
public void AdvanceRetriesOnlyFailedSteps()
|
||||
{
|
||||
int first = 0;
|
||||
int middle = 0;
|
||||
int last = 0;
|
||||
var plan = new LiveEntityTeardownPlan(
|
||||
[
|
||||
() => first++,
|
||||
() =>
|
||||
{
|
||||
middle++;
|
||||
if (middle == 1)
|
||||
throw new InvalidOperationException("middle failed");
|
||||
},
|
||||
() => last++,
|
||||
]);
|
||||
|
||||
Assert.Throws<AggregateException>(() => plan.Advance());
|
||||
Assert.Equal(2, plan.CompletedCount);
|
||||
|
||||
plan.Advance();
|
||||
|
||||
Assert.True(plan.IsComplete);
|
||||
Assert.Equal(1, first);
|
||||
Assert.Equal(2, middle);
|
||||
Assert.Equal(1, last);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AdvanceAttemptsEveryIndependentFailureInOnePass()
|
||||
{
|
||||
int first = 0;
|
||||
int last = 0;
|
||||
var plan = new LiveEntityTeardownPlan(
|
||||
[
|
||||
() =>
|
||||
{
|
||||
first++;
|
||||
throw new InvalidOperationException("first");
|
||||
},
|
||||
() => last++,
|
||||
]);
|
||||
|
||||
Assert.Throws<AggregateException>(() => plan.Advance());
|
||||
|
||||
Assert.Equal(1, first);
|
||||
Assert.Equal(1, last);
|
||||
Assert.Equal(1, plan.CompletedCount);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue