test(render): fully warm dense shadow allocation gate

This commit is contained in:
Erik 2026-08-22 14:10:53 +02:00
parent a7b18364cd
commit d78ce100d6

View file

@ -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++)