feat(pipeline): MP0 - wire FrameProfiler into GameWindow + DebugPanel toggle
GameWindow gets one field (_frameProfiler), one FrameBoundary() call at
the top of OnRender, three stage scopes (Update in OnUpdate, Upload
around _wbMeshAdapter?.Tick(), ImGui around _imguiBootstrap.Render()),
and one Dispose() call in teardown before _dats?.Dispose() releases the
GpuFrameTimer query ring. No new feature bodies land in GameWindow.cs —
all profiler logic lives in AcDream.App.Diagnostics.
DebugVM.FrameProf mirrors RenderingDiagnostics.FrameProfEnabled so the
DebugPanel checkbox ("Frame profiler ([frame-prof])") toggles the 5s
report live. Note: the checkbox lives in
AcDream.UI.Abstractions/Panels/Debug/DebugPanel.cs (IPanelRenderer,
backend-agnostic) alongside the other Diagnostics-section checkboxes —
not in AcDream.UI.ImGui, which holds no panel-drawing code per Code
Structure Rule 3.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
73bb8777a9
commit
edbb1ffebd
3 changed files with 35 additions and 2 deletions
|
|
@ -254,6 +254,12 @@ public sealed class DebugPanel : IPanel
|
|||
if (r.Checkbox("Probe auto-walk (ACDREAM_PROBE_AUTOWALK)",
|
||||
ref probeAutoWalk)) _vm.ProbeAutoWalk = probeAutoWalk;
|
||||
|
||||
// MP0 (2026-07-05): permanent frame profiler toggle — not a
|
||||
// throwaway investigation probe, so it lives with the other
|
||||
// always-available diagnostics rather than a dated section.
|
||||
bool frameProf = _vm.FrameProf;
|
||||
if (r.Checkbox("Frame profiler ([frame-prof])", ref frameProf)) _vm.FrameProf = frameProf;
|
||||
|
||||
// ── Indoor rendering diagnostics (2026-05-19) ───────────────
|
||||
// Pinpoint where the EnvCell rendering chain breaks for
|
||||
// hypothesis-driven Phase 2 fix. Spec:
|
||||
|
|
|
|||
|
|
@ -291,6 +291,17 @@ public sealed class DebugVM
|
|||
set => PhysicsDiagnostics.ProbeAutoWalkEnabled = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Runtime mirror of <c>RenderingDiagnostics.FrameProfEnabled</c>
|
||||
/// (env var <c>ACDREAM_FRAME_PROF</c>). Toggling here starts/stops the
|
||||
/// [frame-prof] 5-second report live — no relaunch required.
|
||||
/// </summary>
|
||||
public bool FrameProf
|
||||
{
|
||||
get => RenderingDiagnostics.FrameProfEnabled;
|
||||
set => RenderingDiagnostics.FrameProfEnabled = value;
|
||||
}
|
||||
|
||||
// ── Indoor rendering diagnostics (2026-05-19) ───────────────────
|
||||
// Mirror RenderingDiagnostics statics so DebugPanel checkbox toggles
|
||||
// take effect on the next render frame without relaunching.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue