Organisation
This commit is contained in:
@@ -61,18 +61,18 @@ set(APP_SOURCES
|
|||||||
"${APP_DIR}/gl/renderer/GlScopedObjects.h"
|
"${APP_DIR}/gl/renderer/GlScopedObjects.h"
|
||||||
"${APP_DIR}/gl/shader/GlShaderSources.cpp"
|
"${APP_DIR}/gl/shader/GlShaderSources.cpp"
|
||||||
"${APP_DIR}/gl/shader/GlShaderSources.h"
|
"${APP_DIR}/gl/shader/GlShaderSources.h"
|
||||||
"${APP_DIR}/gl/OpenGLComposite.cpp"
|
"${APP_DIR}/gl/composite/OpenGLComposite.cpp"
|
||||||
"${APP_DIR}/gl/OpenGLComposite.h"
|
"${APP_DIR}/gl/composite/OpenGLComposite.h"
|
||||||
"${APP_DIR}/gl/OpenGLCompositeRuntimeControls.cpp"
|
"${APP_DIR}/gl/composite/OpenGLCompositeRuntimeControls.cpp"
|
||||||
"${APP_DIR}/gl/RenderCommandQueue.cpp"
|
"${APP_DIR}/gl/threading/RenderCommandQueue.cpp"
|
||||||
"${APP_DIR}/gl/RenderCommandQueue.h"
|
"${APP_DIR}/gl/threading/RenderCommandQueue.h"
|
||||||
"${APP_DIR}/gl/RenderEngine.cpp"
|
"${APP_DIR}/gl/RenderEngine.cpp"
|
||||||
"${APP_DIR}/gl/RenderEngine.h"
|
"${APP_DIR}/gl/RenderEngine.h"
|
||||||
"${APP_DIR}/gl/RenderFrameState.h"
|
"${APP_DIR}/gl/frame/RenderFrameState.h"
|
||||||
"${APP_DIR}/gl/RenderFrameStateResolver.cpp"
|
"${APP_DIR}/gl/frame/RenderFrameStateResolver.cpp"
|
||||||
"${APP_DIR}/gl/RenderFrameStateResolver.h"
|
"${APP_DIR}/gl/frame/RenderFrameStateResolver.h"
|
||||||
"${APP_DIR}/gl/RuntimeUpdateController.cpp"
|
"${APP_DIR}/gl/frame/RuntimeUpdateController.cpp"
|
||||||
"${APP_DIR}/gl/RuntimeUpdateController.h"
|
"${APP_DIR}/gl/frame/RuntimeUpdateController.h"
|
||||||
"${APP_DIR}/gl/pipeline/OpenGLRenderPass.cpp"
|
"${APP_DIR}/gl/pipeline/OpenGLRenderPass.cpp"
|
||||||
"${APP_DIR}/gl/pipeline/OpenGLRenderPass.h"
|
"${APP_DIR}/gl/pipeline/OpenGLRenderPass.h"
|
||||||
"${APP_DIR}/gl/pipeline/OpenGLRenderPipeline.cpp"
|
"${APP_DIR}/gl/pipeline/OpenGLRenderPipeline.cpp"
|
||||||
@@ -173,9 +173,12 @@ target_include_directories(LoopThroughWithOpenGLCompositing PRIVATE
|
|||||||
"${APP_DIR}"
|
"${APP_DIR}"
|
||||||
"${APP_DIR}/control"
|
"${APP_DIR}/control"
|
||||||
"${APP_DIR}/gl"
|
"${APP_DIR}/gl"
|
||||||
|
"${APP_DIR}/gl/composite"
|
||||||
|
"${APP_DIR}/gl/frame"
|
||||||
"${APP_DIR}/gl/pipeline"
|
"${APP_DIR}/gl/pipeline"
|
||||||
"${APP_DIR}/gl/renderer"
|
"${APP_DIR}/gl/renderer"
|
||||||
"${APP_DIR}/gl/shader"
|
"${APP_DIR}/gl/shader"
|
||||||
|
"${APP_DIR}/gl/threading"
|
||||||
"${APP_DIR}/platform"
|
"${APP_DIR}/platform"
|
||||||
"${APP_DIR}/runtime"
|
"${APP_DIR}/runtime"
|
||||||
"${APP_DIR}/runtime/coordination"
|
"${APP_DIR}/runtime/coordination"
|
||||||
@@ -394,13 +397,14 @@ endif()
|
|||||||
add_test(NAME Std140BufferTests COMMAND Std140BufferTests)
|
add_test(NAME Std140BufferTests COMMAND Std140BufferTests)
|
||||||
|
|
||||||
add_executable(RenderCommandQueueTests
|
add_executable(RenderCommandQueueTests
|
||||||
"${APP_DIR}/gl/RenderCommandQueue.cpp"
|
"${APP_DIR}/gl/threading/RenderCommandQueue.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/tests/RenderCommandQueueTests.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/tests/RenderCommandQueueTests.cpp"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(RenderCommandQueueTests PRIVATE
|
target_include_directories(RenderCommandQueueTests PRIVATE
|
||||||
"${APP_DIR}"
|
"${APP_DIR}"
|
||||||
"${APP_DIR}/gl"
|
"${APP_DIR}/gl"
|
||||||
|
"${APP_DIR}/gl/threading"
|
||||||
"${APP_DIR}/videoio"
|
"${APP_DIR}/videoio"
|
||||||
"${APP_DIR}/videoio/decklink"
|
"${APP_DIR}/videoio/decklink"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ Relevant code:
|
|||||||
|
|
||||||
- [RenderEngine.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/RenderEngine.cpp:36)
|
- [RenderEngine.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/RenderEngine.cpp:36)
|
||||||
- [OpenGLVideoIOBridge.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/pipeline/OpenGLVideoIOBridge.cpp:11)
|
- [OpenGLVideoIOBridge.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/pipeline/OpenGLVideoIOBridge.cpp:11)
|
||||||
- [OpenGLComposite.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLComposite.cpp:168)
|
- [OpenGLComposite.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/composite/OpenGLComposite.cpp:168)
|
||||||
|
|
||||||
This removes cross-thread GL context borrowing as the central correctness model. The remaining timing risk is that output frame production is still synchronous from the DeckLink completion path, so a render/readback spike can still reduce playout headroom.
|
This removes cross-thread GL context borrowing as the central correctness model. The remaining timing risk is that output frame production is still synchronous from the DeckLink completion path, so a render/readback spike can still reduce playout headroom.
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ Failures are often surfaced via `MessageBoxA`, while background services mainly
|
|||||||
|
|
||||||
Relevant code:
|
Relevant code:
|
||||||
|
|
||||||
- [OpenGLComposite.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLComposite.cpp:314)
|
- [OpenGLComposite.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/composite/OpenGLComposite.cpp:314)
|
||||||
- [DeckLinkSession.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/videoio/decklink/DeckLinkSession.cpp:478)
|
- [DeckLinkSession.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/videoio/decklink/DeckLinkSession.cpp:478)
|
||||||
- [RuntimeServices.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/control/RuntimeServices.cpp:205)
|
- [RuntimeServices.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/control/RuntimeServices.cpp:205)
|
||||||
|
|
||||||
@@ -316,7 +316,7 @@ The desktop preview is rate-limited, but still presented from inside the render
|
|||||||
Relevant code:
|
Relevant code:
|
||||||
|
|
||||||
- [OpenGLRenderPipeline.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/pipeline/OpenGLRenderPipeline.cpp:54)
|
- [OpenGLRenderPipeline.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/pipeline/OpenGLRenderPipeline.cpp:54)
|
||||||
- [OpenGLComposite.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLComposite.cpp:235)
|
- [OpenGLComposite.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/composite/OpenGLComposite.cpp:235)
|
||||||
|
|
||||||
This means preview presentation can still consume time on the same path that is trying to meet output deadlines.
|
This means preview presentation can still consume time on the same path that is trying to meet output deadlines.
|
||||||
|
|
||||||
|
|||||||
@@ -58,8 +58,8 @@ The following current code paths are the strongest evidence for the split propos
|
|||||||
- `RuntimeHost.h`
|
- `RuntimeHost.h`
|
||||||
- `RuntimeHost.cpp`
|
- `RuntimeHost.cpp`
|
||||||
- `OpenGLComposite` is both app orchestrator and render/runtime coordinator:
|
- `OpenGLComposite` is both app orchestrator and render/runtime coordinator:
|
||||||
- [OpenGLComposite.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLComposite.cpp:106)
|
- [OpenGLComposite.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/composite/OpenGLComposite.cpp:106)
|
||||||
- [OpenGLComposite.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLComposite.cpp:283)
|
- [OpenGLComposite.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/composite/OpenGLComposite.cpp:283)
|
||||||
- `RuntimeServices` mixes service orchestration with polling and deferred state work:
|
- `RuntimeServices` mixes service orchestration with polling and deferred state work:
|
||||||
- [RuntimeServices.h](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/control/RuntimeServices.h:46)
|
- [RuntimeServices.h](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/control/RuntimeServices.h:46)
|
||||||
- [RuntimeServices.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/control/RuntimeServices.cpp:194)
|
- [RuntimeServices.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/control/RuntimeServices.cpp:194)
|
||||||
|
|||||||
@@ -345,9 +345,9 @@ The current groundwork is intended to let these lanes proceed in parallel with l
|
|||||||
| Lane | Primary files | Goal |
|
| Lane | Primary files | Goal |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| A. Live-state behavior | `runtime/live/RuntimeLiveState.*`, `tests/RuntimeLiveStateTests.cpp` | Implemented for Phase 3: stale completion, smoothing, trigger behavior, and overlay settle policy are covered by focused tests. |
|
| A. Live-state behavior | `runtime/live/RuntimeLiveState.*`, `tests/RuntimeLiveStateTests.cpp` | Implemented for Phase 3: stale completion, smoothing, trigger behavior, and overlay settle policy are covered by focused tests. |
|
||||||
| B. Render-state composition | `runtime/live/RenderStateComposer.*`, `gl/RenderFrameStateResolver.*`, `gl/RenderEngine.*` | Implemented for Phase 3: value composition and frame-state selection sit outside GL drawing while GL calls remain in `RenderEngine`. |
|
| B. Render-state composition | `runtime/live/RenderStateComposer.*`, `gl/frame/RenderFrameStateResolver.*`, `gl/RenderEngine.*` | Implemented for Phase 3: value composition and frame-state selection sit outside GL drawing while GL calls remain in `RenderEngine`. |
|
||||||
| C. Service bridge | `control/RuntimeServices.*`, `control/RuntimeServiceLiveBridge.*`, `control/ControlServices.*` | Implemented for Phase 3: `OpenGLComposite::renderEffect()` no longer drains OSC update/completion queues directly. |
|
| C. Service bridge | `control/RuntimeServices.*`, `control/RuntimeServiceLiveBridge.*`, `control/ControlServices.*` | Implemented for Phase 3: `OpenGLComposite::renderEffect()` no longer drains OSC update/completion queues directly. |
|
||||||
| D. App-frame orchestration | `gl/OpenGLComposite.*`, `gl/RuntimeUpdateController.*` | Implemented for Phase 3: render-effect glue is a narrow runtime-work, frame-input, render-frame sequence. |
|
| D. App-frame orchestration | `gl/composite/OpenGLComposite.*`, `gl/frame/RuntimeUpdateController.*` | Implemented for Phase 3: render-effect glue is a narrow runtime-work, frame-input, render-frame sequence. |
|
||||||
| E. Persistence boundary | `runtime/coordination/RuntimeCoordinator.*`, `runtime/store/*`, event tests | Implemented for Phase 3: persistence request publication is explicit and ready for a later background writer. |
|
| E. Persistence boundary | `runtime/coordination/RuntimeCoordinator.*`, `runtime/store/*`, event tests | Implemented for Phase 3: persistence request publication is explicit and ready for a later background writer. |
|
||||||
|
|
||||||
## Phase 3 Exit Criteria
|
## Phase 3 Exit Criteria
|
||||||
|
|||||||
@@ -508,8 +508,8 @@ The goal is for transports to emit actions, even if temporary adapters still cal
|
|||||||
|
|
||||||
`OpenGLComposite` currently owns `RuntimeServices` startup and consumption:
|
`OpenGLComposite` currently owns `RuntimeServices` startup and consumption:
|
||||||
|
|
||||||
- [OpenGLComposite.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLComposite.cpp:312)
|
- [OpenGLComposite.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/composite/OpenGLComposite.cpp:312)
|
||||||
- [OpenGLComposite.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLComposite.cpp:723)
|
- [OpenGLComposite.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/composite/OpenGLComposite.cpp:723)
|
||||||
|
|
||||||
That should move toward a composition root or subsystem host arrangement where render is no longer the owner of control ingress.
|
That should move toward a composition root or subsystem host arrangement where render is no longer the owner of control ingress.
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ In the Phase 1 terminology, `RenderEngine` consumes snapshots plus render-local
|
|||||||
|
|
||||||
The current rendering path is split across several classes:
|
The current rendering path is split across several classes:
|
||||||
|
|
||||||
- [OpenGLComposite.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLComposite.cpp:86) constructs the renderer, render pipeline, shader programs, runtime services, and video bridge in one owner.
|
- [OpenGLComposite.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/composite/OpenGLComposite.cpp:86) constructs the renderer, render pipeline, shader programs, runtime services, and video bridge in one owner.
|
||||||
- [OpenGLRenderPipeline.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/pipeline/OpenGLRenderPipeline.cpp:31) performs pass execution, pack/readback, preview paint, and performance stat publication.
|
- [OpenGLRenderPipeline.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/pipeline/OpenGLRenderPipeline.cpp:31) performs pass execution, pack/readback, preview paint, and performance stat publication.
|
||||||
- [OpenGLVideoIOBridge.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/pipeline/OpenGLVideoIOBridge.cpp:58) accepts capture frames and still performs render work from the playout completion callback path.
|
- [OpenGLVideoIOBridge.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/pipeline/OpenGLVideoIOBridge.cpp:58) accepts capture frames and still performs render work from the playout completion callback path.
|
||||||
- `RenderFrameStateResolver` and `RenderStateComposer` now keep frame-state selection and live value composition outside GL drawing, while `RenderEngine` still owns the current GL resource and draw path.
|
- `RenderFrameStateResolver` and `RenderStateComposer` now keep frame-state selection and live value composition outside GL drawing, while `RenderEngine` still owns the current GL resource and draw path.
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Before the Phase 1 runtime split, the app's mutation path was split across sever
|
|||||||
- `RuntimeHost.h`
|
- `RuntimeHost.h`
|
||||||
- `RuntimeHost.cpp`
|
- `RuntimeHost.cpp`
|
||||||
- `OpenGLComposite` currently acts like an orchestration shell and a mutation coordinator at the same time:
|
- `OpenGLComposite` currently acts like an orchestration shell and a mutation coordinator at the same time:
|
||||||
- [OpenGLCompositeRuntimeControls.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLCompositeRuntimeControls.cpp:1)
|
- [OpenGLCompositeRuntimeControls.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/composite/OpenGLCompositeRuntimeControls.cpp:1)
|
||||||
- `RuntimeServices` still owns some deferred control flow around OSC commit and polling:
|
- `RuntimeServices` still owns some deferred control flow around OSC commit and polling:
|
||||||
- [RuntimeServices.h](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/control/RuntimeServices.h:46)
|
- [RuntimeServices.h](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/control/RuntimeServices.h:46)
|
||||||
|
|
||||||
@@ -369,7 +369,7 @@ currently do this pattern:
|
|||||||
2. decide whether to call `ReloadShader(...)`
|
2. decide whether to call `ReloadShader(...)`
|
||||||
3. call `broadcastRuntimeState()`
|
3. call `broadcastRuntimeState()`
|
||||||
|
|
||||||
See [OpenGLCompositeRuntimeControls.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLCompositeRuntimeControls.cpp:1).
|
See [OpenGLCompositeRuntimeControls.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/composite/OpenGLCompositeRuntimeControls.cpp:1).
|
||||||
|
|
||||||
That "call host, then decide reload/broadcast policy" logic is a direct candidate for migration into `RuntimeCoordinator`.
|
That "call host, then decide reload/broadcast policy" logic is a direct candidate for migration into `RuntimeCoordinator`.
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ Before the Phase 1 runtime split, the closest behavior lived in:
|
|||||||
- `RuntimeHost::TryRefreshCachedLayerStates(...)`
|
- `RuntimeHost::TryRefreshCachedLayerStates(...)`
|
||||||
- `RuntimeHost::RefreshDynamicRenderStateFields(...)`
|
- `RuntimeHost::RefreshDynamicRenderStateFields(...)`
|
||||||
- `RuntimeHost::BuildLayerRenderStatesLocked(...)`
|
- `RuntimeHost::BuildLayerRenderStatesLocked(...)`
|
||||||
- the render-side cache usage in [OpenGLComposite.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLComposite.cpp:589)
|
- the render-side cache usage in [OpenGLComposite.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/composite/OpenGLComposite.cpp:589)
|
||||||
|
|
||||||
`RuntimeSnapshotProvider` should absorb that responsibility, but in a cleaner and more publish-oriented way.
|
`RuntimeSnapshotProvider` should absorb that responsibility, but in a cleaner and more publish-oriented way.
|
||||||
|
|
||||||
@@ -381,7 +381,7 @@ The migrated runtime path is:
|
|||||||
4. apply render-local overlay state
|
4. apply render-local overlay state
|
||||||
5. attach frame context
|
5. attach frame context
|
||||||
|
|
||||||
That is a much cleaner split than the current mixed lock/cache/fallback flow in [OpenGLComposite.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLComposite.cpp:589).
|
That is a much cleaner split than the current mixed lock/cache/fallback flow in [OpenGLComposite.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/composite/OpenGLComposite.cpp:589).
|
||||||
|
|
||||||
## Migration Plan
|
## Migration Plan
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user