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>
23 lines
824 B
C#
23 lines
824 B
C#
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));
|
|
}
|
|
}
|