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
|
|
@ -0,0 +1,23 @@
|
|||
using AcDream.App.Rendering;
|
||||
|
||||
namespace AcDream.App.Tests.Rendering;
|
||||
|
||||
public sealed class DynamicBufferCapacityTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData(0, 1, 4096)]
|
||||
[InlineData(4096, 4096, 4096)]
|
||||
[InlineData(4096, 4097, 8192)]
|
||||
[InlineData(8192, 9000, 16384)]
|
||||
[InlineData(0, 8193, 12288)]
|
||||
public void Grow_UsesAlignedGeometricCapacity(int current, int required, int expected)
|
||||
=> Assert.Equal(expected, DynamicBufferCapacity.Grow(current, required));
|
||||
|
||||
[Fact]
|
||||
public void Grow_RejectsInvalidInputs()
|
||||
{
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => DynamicBufferCapacity.Grow(-1, 1));
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => DynamicBufferCapacity.Grow(0, -1));
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => DynamicBufferCapacity.Grow(0, 1, 0));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue