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>
This commit is contained in:
parent
47d7086a74
commit
3718e341be
17 changed files with 1103 additions and 225 deletions
|
|
@ -11,7 +11,13 @@ public class FrameProfilerReportTests
|
|||
var cpu = new FrameStatsBuffer(16);
|
||||
var gpu = new FrameStatsBuffer(16);
|
||||
var alloc = new FrameStatsBuffer(16);
|
||||
var stages = new[] { new FrameStatsBuffer(16), new FrameStatsBuffer(16), new FrameStatsBuffer(16) };
|
||||
var stages = new[]
|
||||
{
|
||||
new FrameStatsBuffer(16),
|
||||
new FrameStatsBuffer(16),
|
||||
new FrameStatsBuffer(16),
|
||||
new FrameStatsBuffer(16),
|
||||
};
|
||||
for (long i = 1; i <= 10; i++)
|
||||
{
|
||||
cpu.Push(i * 1000); // 1..10 ms in µs
|
||||
|
|
@ -20,6 +26,7 @@ public class FrameProfilerReportTests
|
|||
stages[0].Push(i * 200);
|
||||
stages[1].Push(i * 50);
|
||||
stages[2].Push(i * 10);
|
||||
stages[3].Push(i * 300);
|
||||
}
|
||||
|
||||
string line = FrameProfiler.FormatReport(
|
||||
|
|
@ -33,6 +40,7 @@ public class FrameProfilerReportTests
|
|||
Assert.Contains("alloc_kb p50=5.0 max=10.0", line);
|
||||
Assert.Contains("gc=3/1/0", line);
|
||||
Assert.Contains("upd p50=1.0", line); // stage 0: 200µs·5 = 1.0 ms
|
||||
Assert.Contains("pace p50=1.5", line);
|
||||
Assert.DoesNotContain(",0", line.Replace("gc=3/1/0", "")); // no comma decimals (invariant culture)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue