Render udpates
This commit is contained in:
@@ -11,7 +11,7 @@ Only the render thread may bind and use its primary OpenGL context.
|
||||
Allowed on the render thread:
|
||||
|
||||
- GL resource creation and destruction for resources it owns
|
||||
- GL shader/program commit from an already-prepared artifact
|
||||
- GL shader/program swap from an already-prepared GL program
|
||||
- drawing the next frame
|
||||
- async readback queueing and completion polling
|
||||
- publishing completed system-memory frames
|
||||
@@ -28,7 +28,7 @@ Not allowed on the render thread:
|
||||
- blocking console logging
|
||||
- config file discovery or parsing
|
||||
|
||||
If future GL preparation needs to happen off-thread, use an explicit shared-context GL prepare thread. Do not smuggle non-render work back into the cadence loop.
|
||||
If GL preparation happens off-thread, use an explicit shared-context GL prepare thread. Do not smuggle non-render work back into the cadence loop.
|
||||
|
||||
## 2. Render Cadence Does Not Chase Buffers
|
||||
|
||||
@@ -63,11 +63,12 @@ If no completed frame is available, record the miss and keep the ownership bound
|
||||
Runtime shader work is split into two phases:
|
||||
|
||||
1. CPU/build phase outside the render thread
|
||||
2. GL commit phase on the render thread
|
||||
2. shared-context GL preparation outside the render thread where practical
|
||||
3. GL program swap on the render thread
|
||||
|
||||
The CPU/build phase may parse manifests, invoke Slang, validate package shape, and prepare CPU-side data.
|
||||
|
||||
The render thread receives a completed artifact and either commits it at a frame boundary or rejects it. A failed artifact must not disturb the current renderer.
|
||||
The render thread receives completed render-layer artifacts, asks the shared-context prepare worker to compile/link changed GL programs, and only swaps in prepared programs at a frame boundary. A failed artifact or failed GL preparation must not disturb the current renderer.
|
||||
|
||||
The display/render layer model is app-owned. It may track requested shaders, build state, display metadata, and render-ready artifacts, but it must not perform GL work or drive render cadence directly.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user