feat(rendering): add borrowed render frame product

Introduce two reusable generation-stamped arenas whose views are token-validated across build, publish, borrow, release, and abort. This is a non-drawing G0 seam for the incremental scene and changes no production consumer.
This commit is contained in:
Erik 2026-07-24 23:59:01 +02:00
parent 9b5a530e7b
commit 8c638654be
3 changed files with 960 additions and 1 deletions

View file

@ -23,7 +23,9 @@ retail-faithful gameplay
| F3 — live/equipped projection | complete | Exact EntityReady/resource teardown, visibility, attachment pose/removal, and active-only final-frame seams now drive generation/incarnation-gated live records. Duplicate CreateObject, pending/loaded rebucket, hidden/appearance, reentrancy, session clear, attachment, and GUID-generation replacement pass 11 focused tests. Production still constructs no render scene. |
| F4 — dynamic indices | complete | The contained scene now maintains outdoor/static, per-cell static/dynamic, special dynamic-route, translucent, selectable, light-candidate, and dirty indices incrementally. Final-frame live/equipped synchronization remains active-only, and active animated statics are synchronized from the scheduler's active workset rather than a resident-world scan. The production scene remains unconstructed and non-drawing. |
| F5 | complete | Exact `81e2f1a5` passed capped and uncapped nine-stop routes plus uncapped dense Arwic. Across the final checkpoints the referee completed 1,663 + 1,677 + 81 comparisons with zero mismatches, zero pending deltas, zero rejected operations, exact binary/source identity, and graceful shutdown. Evidence: `docs/research/2026-07-24-slice-f5-render-scene-shadow-gate.md`. |
| G0G5 | active | F's non-drawing referee is accepted. No production consumer has switched yet; G0 begins the borrowed double-buffered frame product. |
| G0 — borrowed frame product | complete | Two reusable arenas publish exact generation/frame-stamped borrowed views for scene candidates, cell ranges, transforms, classification, light sets, selection, PView/clip references, counts, and source digest. Release/reuse invalidates every copied view; abort never publishes; frame N may build while N-1 is borrowed; the warm path allocates zero bytes. Eight focused tests pass inside the 3,743-App / 8,227-solution Release gate. |
| G1 — scene-query replacement | active | Build the candidate product from the incremental scene and compare it with the current PView partition without changing the draw source. |
| G2G5 | pending | No production consumer has switched. |
The exact pre-F/G runtime rollback anchor remains `e7d9d6fa`. F0 is
non-drawing diagnostic infrastructure and therefore is not a visual-cutover
@ -525,6 +527,18 @@ Rules:
- abort recycles the incomplete arena without publishing it;
- world generation and frame sequence must match at draw.
**Completed 2026-07-24.** `RenderFrameExchange` owns exactly two retained
arenas. A published view is accessible only through a validated borrow token;
release invalidates every struct copy, and arena reuse advances its epoch.
Publication requires a source digest from the same scene generation, while
borrowing requires the exact expected generation and frame sequence. The
non-published arena alone may be reused, so an aborted build cannot destroy the
last completed product. PView/clip products remain borrowed references and all
variable-size payloads use retained arrays. The 1,000-frame warm regression
allocates zero bytes. The product is deliberately uncomposed until G1 supplies
scene-query data; G0 therefore changes no production draw behavior and is not a
visual rollback unit.
### G1 — Replace whole-world partition with scene queries
1. Query outdoor statics directly.