timing refactor
All checks were successful
CI / React UI Build (push) Successful in 10s
CI / Native Windows Build And Tests (push) Successful in 3m1s
CI / Windows Release Package (push) Successful in 3m20s

This commit is contained in:
Aiden
2026-05-12 23:39:57 +10:00
parent 4a049a557a
commit d411453f80
17 changed files with 125 additions and 112 deletions

View File

@@ -11,14 +11,14 @@ Before adding features here, read the guardrails in [Render Cadence Golden Rules
```text
RenderThread
owns a hidden OpenGL context
polls latest input frames without waiting
polls the oldest ready input frame without waiting
uploads input frames into a render-owned GL texture
renders simple BGRA8 motion at selected cadence
queues async PBO readback
publishes completed frames into SystemFrameExchange
InputFrameMailbox
owns latest disposable CPU input slots
owns bounded FIFO CPU input slots
keeps a bounded three-ready-frame input buffer for render
trims frames beyond that bound to avoid runaway input latency
protects the one frame currently being uploaded by render
@@ -26,7 +26,7 @@ InputFrameMailbox
SystemFrameExchange
owns Free / Rendering / Completed / Scheduled slots
drops old completed unscheduled frames when render needs space
preserves completed output frames once they are waiting for playout
protects scheduled frames until DeckLink completion
DeckLinkOutputThread
@@ -286,8 +286,8 @@ Input telemetry:
- `renderFrameMaxMs`: maximum observed render-thread draw duration for this process
- `readbackQueueMs`: time spent queueing the most recent async BGRA8 PBO readback
- `completedReadbackCopyMs`: time spent mapping/copying the most recent completed readback into system-memory frame storage
- `completedDrops`: completed unscheduled system-memory frames dropped so render could reuse the slot
- `acquireMisses`: times render/readback could not acquire a writable system-memory frame slot
- `completedDrops`: completed unscheduled system-memory frames dropped by latest-N acquire paths; expected to stay flat in the cadence compositor output path
- `acquireMisses`: times render/readback could not acquire a writable system-memory frame slot; completed frames waiting for playout are preserved instead of being displaced
- `inputConsumeMisses`: render ticks where no ready input frame was available to upload
- `inputUploadMisses`: input texture upload attempts that reused the previous GL input texture
- `inputReadyFrames`: ready input frames currently queued in `InputFrameMailbox`