acdream/tests/AcDream.App.Tests/Rendering/Wb/ObjectMeshWorkerLifecycleTests.cs
Erik 3718e341be fix #225: stabilize render pacing and frame CPU
Replace scheduler-quantized software sleeps with a reusable Windows high-resolution deadline timer, expose pacing in the frame profiler, and make shutdown wake every persistent mesh worker without losing the shared signal.

Preserve retail alpha order while using a stable radix, skip duplicate deferred-alpha SSBO packing, pack light sets, cache static selection descriptors, and retire historical material groups at the whole-frame boundary. The fixed dense-Caul sample improved from roughly 9-12 ms CPU to 5.3-6.2 ms without reducing visual quality.

Release build succeeds with zero warnings and all 6,300 tests pass with five intentional skips. Three independent retail, architecture, and adversarial reviews are clean; the post-review connected route remains pending because local ACE is offline.

Co-authored-by: OpenAI Codex <codex@openai.com>
2026-07-19 06:29:30 +02:00

34 lines
1.1 KiB
C#

using AcDream.App.Rendering.Wb;
namespace AcDream.App.Tests.Rendering.Wb;
public sealed class ObjectMeshWorkerLifecycleTests
{
[Fact]
public void Shutdown_never_resets_the_shared_worker_wake_signal()
{
Assert.Equal(
ObjectMeshManager.PreparationWorkerWakeAction.Exit,
ObjectMeshManager.DecidePreparationWorkerWake(
isDisposed: true,
hasPendingRequests: false,
stagingAtHighWater: true,
arenaBackpressured: true));
Assert.Equal(
ObjectMeshManager.PreparationWorkerWakeAction.ResetAndWait,
ObjectMeshManager.DecidePreparationWorkerWake(
isDisposed: false,
hasPendingRequests: false,
stagingAtHighWater: false,
arenaBackpressured: false));
Assert.Equal(
ObjectMeshManager.PreparationWorkerWakeAction.Process,
ObjectMeshManager.DecidePreparationWorkerWake(
isDisposed: false,
hasPendingRequests: true,
stagingAtHighWater: false,
arenaBackpressured: false));
}
}