From d78ce100d69bec027d990be5860eb082044b6e95 Mon Sep 17 00:00:00 2001 From: Erik Date: Sat, 22 Aug 2026 14:10:53 +0200 Subject: [PATCH] test(render): fully warm dense shadow allocation gate --- .../Rendering/DirectionalShadowCasterFrameTests.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/AcDream.App.Tests/Rendering/DirectionalShadowCasterFrameTests.cs b/tests/AcDream.App.Tests/Rendering/DirectionalShadowCasterFrameTests.cs index 1156438c..61e4463f 100644 --- a/tests/AcDream.App.Tests/Rendering/DirectionalShadowCasterFrameTests.cs +++ b/tests/AcDream.App.Tests/Rendering/DirectionalShadowCasterFrameTests.cs @@ -492,10 +492,21 @@ public sealed class DirectionalShadowCasterFrameTests var frame = new DirectionalShadowCasterFrame(); RenderSceneQuery query = new(source, Generation); frame.Build(in query); - source.EnsureTransformChangeCapacity(5_000); + // This is a warmed steady-state gate. One changed frame primes the + // data structures, but the complete parallel App suite can promote + // this path through tiered JIT after that first call. Exercise the + // same dense path for a full measurement-window length before taking + // the allocation counter so runtime warmup is not charged to a frame. + source.EnsureTransformChangeCapacity(10_000); for (int index = 0; index < 75; index++) source.PublishTransformChanges(dynamics[index].Id, 1); frame.Build(in query); + for (int iteration = 0; iteration < 64; iteration++) + { + for (int index = 0; index < 75; index++) + source.PublishTransformChanges(dynamics[index].Id, 1); + frame.Build(in query); + } long before = GC.GetAllocatedBytesForCurrentThread(); for (int iteration = 0; iteration < 64; iteration++)