test(ci): harden scheduling and allocation gates
All checks were successful
CI / linux-portable (push) Successful in 3m30s
CI / windows-gate (push) Successful in 6m15s
CI / release (push) Successful in 2m11s

This commit is contained in:
Erik 2026-08-27 19:28:10 +02:00
parent c4608b1127
commit d123c4b67c
11 changed files with 101 additions and 87 deletions

View file

@ -371,11 +371,10 @@ public sealed class DirectionalShadowPreparedDrawTests
Assert.Equal([0, 1], product.DynamicTransformSlots.ToArray());
product.RefreshDynamicTransforms(changed);
long before = GC.GetAllocatedBytesForCurrentThread();
for (int iteration = 0; iteration < 256; iteration++)
product.RefreshDynamicTransforms(changed);
long allocated = GC.GetAllocatedBytesForCurrentThread() - before;
Assert.Equal(0, allocated);
ZeroAllocationProbe.AssertAllocatesNothing(
"DirectionalShadowPreparedDraws.RefreshDynamicTransforms",
() => product.RefreshDynamicTransforms(changed),
batchSize: 256);
RenderProjectionRecord wrongId = current with
{
@ -508,16 +507,12 @@ public sealed class DirectionalShadowPreparedDrawTests
product.Transforms[0]);
AssertMatrixBitsEqual(movedPart * movedRoot, product.Transforms[1]);
long beforeDense = GC.GetAllocatedBytesForCurrentThread();
for (int iteration = 0; iteration < 256; iteration++)
{
product.RefreshDynamicTransforms(
ZeroAllocationProbe.AssertAllocatesNothing(
"DirectionalShadowPreparedDraws.RefreshDynamicTransforms dense",
() => product.RefreshDynamicTransforms(
reversedDenseChanges,
denseRefresh: true);
}
long denseAllocated =
GC.GetAllocatedBytesForCurrentThread() - beforeDense;
Assert.Equal(0, denseAllocated);
denseRefresh: true),
batchSize: 256);
Assert.True(product.TryBegin(generation, 14, estimatedInstances: 0));
product.Complete(generation, 14, in stats);
@ -619,9 +614,14 @@ public sealed class DirectionalShadowPreparedDrawTests
RenderSceneGeneration generation = RenderSceneGeneration.FromRaw(9);
BuildVariedTopology(product, generation, buildSequence: 1, drawCount);
long before = GC.GetAllocatedBytesForCurrentThread();
BuildVariedTopology(product, generation, buildSequence: 2, drawCount);
long allocated = GC.GetAllocatedBytesForCurrentThread() - before;
ulong buildSequence = 1;
long allocated = ZeroAllocationProbe.MeasureWarmed(
() => BuildVariedTopology(
product,
generation,
++buildSequence,
drawCount),
batchSize: 1);
Assert.Equal(drawCount, product.Stats.PreparedInstances);
// One small constant covers the sort's comparison-delegate wrapper.