render: add M2 build resource snapshot
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
| M2 placement grouper | Implemented extraction | [`m2-placement-grouper.md`](m2-placement-grouper.md) |
|
||||
| M2 build batch planner | Implemented extraction | [`m2-build-batch-planner.md`](m2-build-batch-planner.md) |
|
||||
| M2 build dispatch planner | Implemented extraction | [`m2-build-dispatch-planner.md`](m2-build-dispatch-planner.md) |
|
||||
| M2 build resource snapshot | Implemented extraction | [`m2-build-resource-snapshot.md`](m2-build-resource-snapshot.md) |
|
||||
| M2 build queue | Implemented extraction | [`m2-build-queue.md`](m2-build-queue.md) |
|
||||
| M2 static batch materializer | Implemented extraction | [`m2-static-batch-materializer.md`](m2-static-batch-materializer.md) |
|
||||
| M2 runtime mesh rebuild classifier | Implemented extraction | [`m2-runtime-mesh-rebuild-classifier.md`](m2-runtime-mesh-rebuild-classifier.md) |
|
||||
|
||||
@@ -50,17 +50,14 @@ SceneTree, files, workers, mutexes, gameplay, network and Editor APIs are forbid
|
||||
| `ACTION_WAIT_FOR_STATIC_MESH` | Constant | Static resource is unresolved and queue must rotate | Immutable | None |
|
||||
| `ACTION_MATERIALIZE_STATIC` | Constant | Build the selected slice from prepared static Mesh | Immutable | None |
|
||||
| `ACTION_ADVANCE_WITHOUT_MATERIALIZATION` | Constant | Empty or terminally missing slice advances without a Node | Immutable | None |
|
||||
| `plan_step(batch_count, animation_pending, has_animated, has_static_mesh, static_missing)` | Pure query | Return action, queue-rotation and serial-transition values | Any thread; call-local result | Raw booleans/count are accepted; non-positive count advances |
|
||||
| `plan_step(batch_count, resource_snapshot)` | Pure query | Return action, queue-rotation and serial-transition values | Any thread; call-local result | Null snapshot waits for static Mesh; non-positive count advances |
|
||||
|
||||
## Inputs and outputs
|
||||
|
||||
| Direction | Contract/data | Producer | Consumer | Ownership | Thread/lifetime |
|
||||
|---|---|---|---|---|---|
|
||||
| Input | Planned batch count | `M2BuildBatchPlanner` through loader | Dispatch planner | Integer copy | One call |
|
||||
| Input | Animation request pending | Animation pipeline through loader | Dispatch planner | Boolean copy | One call |
|
||||
| Input | Animated prototype available | Prototype cache/native loader adapter | Dispatch planner | Boolean copy; no Node reference | One call |
|
||||
| Input | Static Mesh available | Mesh cache/request adapter | Dispatch planner | Boolean copy; no Mesh reference | One call |
|
||||
| Input | Static model terminally missing | Prototype cache through loader | Dispatch planner | Boolean copy | One call |
|
||||
| Input | Typed animated/static availability, pending and missing observations | Loader / `M2BuildResourceSnapshot` | Dispatch planner | Borrowed snapshot; engine references are not read | One call |
|
||||
| Output | Action | Dispatch planner | Loader materializer/wait branch | Immutable StringName | One operation |
|
||||
| Output | `rotate_queue` | Dispatch planner | Loader queue adapter | Detached boolean | One operation |
|
||||
| Output | `increment_batch_serial` | Dispatch planner | Loader progress adapter | Detached boolean | One operation |
|
||||
@@ -116,7 +113,7 @@ sequenceDiagram
|
||||
L->>B: plan_batch
|
||||
L->>L: lookup/request static Mesh when required
|
||||
end
|
||||
L->>D: plan_step(observed scalar state)
|
||||
L->>D: plan_step(batch count, resource snapshot)
|
||||
D-->>L: action, rotate flag, serial flag
|
||||
alt wait action
|
||||
L->>Q: rotate_front
|
||||
@@ -138,6 +135,7 @@ flowchart TB
|
||||
Loader --> Queue[M2BuildQueue]
|
||||
Loader --> Caches[M2 cache/pipeline state]
|
||||
Loader --> Materializers[M2 materializers]
|
||||
Dispatch --> Snapshot[M2BuildResourceSnapshot accessors]
|
||||
Dispatch --> Values[Integers + booleans + StringName]
|
||||
Dispatch -. no dependency .-> Engine[Node / Mesh / ResourceLoader]
|
||||
Dispatch -. no dependency .-> State[Queue / cache / scheduler state]
|
||||
@@ -146,6 +144,8 @@ flowchart TB
|
||||
## Ownership, threading and resources
|
||||
|
||||
- Planner owns call-local comparisons and the returned Dictionary only.
|
||||
- `M2BuildResourceSnapshot` owns the typed call-local observation contract;
|
||||
dispatch reads availability/pending/missing accessors but no engine references.
|
||||
- Loader owns resource lookup/request order, action execution and permit use.
|
||||
- `M2BuildQueue` owns pending jobs, FIFO keys and progress cursors.
|
||||
- Materializers own main-thread scene construction under loader-owned roots.
|
||||
@@ -190,9 +190,9 @@ remain unchanged.
|
||||
|
||||
## Extension points
|
||||
|
||||
A later package may move resource observation/request execution behind a typed
|
||||
service while preserving this scalar action contract. Generic callbacks, signals
|
||||
and a shared state-machine framework remain intentionally excluded.
|
||||
A later package may move resource observation/request execution behind a service
|
||||
that produces `M2BuildResourceSnapshot`. Generic callbacks, signals and a shared
|
||||
state-machine framework remain intentionally excluded.
|
||||
|
||||
## Capability status
|
||||
|
||||
@@ -205,7 +205,6 @@ and a shared state-machine framework remain intentionally excluded.
|
||||
|
||||
## Known gaps and risks
|
||||
|
||||
- Planner consumes raw booleans rather than a typed resource snapshot.
|
||||
- Loader still performs synchronous/native prototype attempts and static request I/O.
|
||||
- Synthetic timing does not measure ResourceLoader, Node or GPU work.
|
||||
- Private traversal, leak, visual and p95/p99 evidence remains unavailable.
|
||||
@@ -215,6 +214,7 @@ and a shared state-machine framework remain intentionally excluded.
|
||||
| Path | Responsibility |
|
||||
|---|---|
|
||||
| `src/render/m2/m2_build_dispatch_planner.gd` | Pure action priority and transition plan |
|
||||
| `src/render/m2/m2_build_resource_snapshot.gd` | Typed per-step resource observation contract |
|
||||
| `src/scenes/streaming/streaming_world_loader.gd` | Resource observation, action execution, permits and engine lifetime |
|
||||
| `src/render/m2/m2_build_batch_planner.gd` | Batch count and cursor plan |
|
||||
| `src/render/m2/m2_build_queue.gd` | Pending jobs, FIFO and cursor ownership |
|
||||
@@ -223,6 +223,7 @@ and a shared state-machine framework remain intentionally excluded.
|
||||
## Related decisions and references
|
||||
|
||||
- [`m2-build-batch-planner.md`](m2-build-batch-planner.md)
|
||||
- [`m2-build-resource-snapshot.md`](m2-build-resource-snapshot.md)
|
||||
- [`m2-build-queue.md`](m2-build-queue.md)
|
||||
- [`m2-static-batch-materializer.md`](m2-static-batch-materializer.md)
|
||||
- [`m2-animated-instance-materializer.md`](m2-animated-instance-materializer.md)
|
||||
|
||||
@@ -257,6 +257,7 @@ queue base, signals and callbacks are intentionally excluded.
|
||||
|
||||
- [`m2-build-batch-planner.md`](m2-build-batch-planner.md)
|
||||
- [`m2-build-dispatch-planner.md`](m2-build-dispatch-planner.md)
|
||||
- [`m2-build-resource-snapshot.md`](m2-build-resource-snapshot.md)
|
||||
- [`m2-static-batch-materializer.md`](m2-static-batch-materializer.md)
|
||||
- [`m2-animated-instance-materializer.md`](m2-animated-instance-materializer.md)
|
||||
- [`world-renderer.md`](world-renderer.md)
|
||||
|
||||
@@ -0,0 +1,226 @@
|
||||
# M2 Build Resource Snapshot
|
||||
|
||||
## Metadata
|
||||
|
||||
| Field | Value |
|
||||
|---|---|
|
||||
| Status | Implemented extraction |
|
||||
| Target/work package | M03 / `M03-RND-M2-BUILD-RESOURCE-SNAPSHOT-001` |
|
||||
| Owners | Per-build-step observed M2 resource references and outcome flags |
|
||||
| Last verified | Worktree `work/sindo-main-codex/m03-m2-build-resource-snapshot`, 2026-07-18 |
|
||||
| Profiles/capabilities | Existing static MultiMesh and animated-instance build paths |
|
||||
|
||||
## Purpose
|
||||
|
||||
Carry the resource observations for one M2 build operation as a typed contract:
|
||||
normalized path, optional animated prototype, pending-animation state, optional
|
||||
static Mesh and terminal missing-model state. The snapshot never owns engine lifetime.
|
||||
|
||||
## Non-goals
|
||||
|
||||
- Locate, request, load, validate or cache M2 resources.
|
||||
- Decide dispatch action, batch count, queue order or permit consumption.
|
||||
- Create, attach or free Nodes, Meshes, MultiMeshes or animated instances.
|
||||
- Change animation allowlists, native candidate rules or cache paths/formats.
|
||||
- Persist observations beyond one build operation.
|
||||
|
||||
## Context and boundaries
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
Loader[StreamingWorldLoader observations] --> Snapshot[M2BuildResourceSnapshot]
|
||||
Snapshot --> Dispatch[M2BuildDispatchPlanner]
|
||||
Snapshot --> Loader
|
||||
Loader --> Animated[M2AnimatedInstanceMaterializer]
|
||||
Loader --> Static[M2StaticBatchMaterializer]
|
||||
```
|
||||
|
||||
The snapshot depends only on `RefCounted`, String, booleans and borrowed Node3D/
|
||||
Mesh references. ResourceLoader, cache/pipeline state, SceneTree mutation,
|
||||
RenderingServer/RIDs, files, workers, mutexes, gameplay, network and Editor APIs
|
||||
are forbidden.
|
||||
|
||||
## Public API
|
||||
|
||||
| Symbol | Kind | Purpose | Thread/lifetime | Errors |
|
||||
|---|---|---|---|---|
|
||||
| Constructor `(normalized_path, animated_prototype, animation_pending)` | Command | Capture first-phase animation observation | Main thread; one build operation | Values retained exactly |
|
||||
| `normalized_relative_path()` | Query | Return observed normalized path | Snapshot lifetime | None |
|
||||
| `animated_prototype()` | Query | Borrow exact animated prototype | Main thread; no ownership transfer | May be null |
|
||||
| `has_animated_prototype()` | Query | Report prototype availability | Any serialized caller | None |
|
||||
| `animation_request_pending()` | Query | Report pending animation request | Any serialized caller | None |
|
||||
| `adopt_static_observation(mesh, missing)` | Command | Replace second-phase static observation | Main thread | Values retained exactly, including contradictory inputs |
|
||||
| `static_mesh()` | Query | Borrow exact prepared Mesh | Main thread; no ownership transfer | May be null |
|
||||
| `has_static_mesh()` | Query | Report static Mesh availability | Any serialized caller | None |
|
||||
| `static_model_missing()` | Query | Report terminal missing outcome | Any serialized caller | None |
|
||||
| `diagnostic_snapshot()` | Query | Return detached path/availability flags | Any serialized caller | Omits engine references |
|
||||
|
||||
## Inputs and outputs
|
||||
|
||||
| Direction | Contract/data | Producer | Consumer | Ownership | Thread/lifetime |
|
||||
|---|---|---|---|---|---|
|
||||
| Input | Normalized relative path | Loader path adapter | Snapshot/diagnostics | Copied String | Snapshot lifetime |
|
||||
| Input | Optional animated prototype | Prototype/native animation path | Snapshot/materializer adapter | Borrowed exact Node3D reference | One build operation |
|
||||
| Input | Animation request pending | Animation pipeline state | Snapshot/dispatch planner | Boolean copy | One build operation |
|
||||
| Input | Optional prepared static Mesh | Mesh cache/request path | Snapshot/materializer adapter | Borrowed exact Mesh reference | One build operation |
|
||||
| Input | Static model terminally missing | Prototype cache state | Snapshot/dispatch planner | Boolean copy | One build operation |
|
||||
| Output | Availability/pending/missing values | Snapshot | Dispatch planner | Scalar reads | One dispatch plan |
|
||||
| Output | Borrowed prototype or Mesh | Snapshot | Loader materializer adapter | No ownership transfer | One materialization call |
|
||||
| Output | Detached diagnostics | Snapshot | Tests/future metrics | Caller-owned Dictionary | Call result |
|
||||
|
||||
The snapshot is released after the build-loop operation. Releasing or replacing
|
||||
it never frees the borrowed Node3D or Mesh.
|
||||
|
||||
## Data flow
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
Path[Normalized M2 path] --> Construct[Create snapshot]
|
||||
Animated[Animated prototype or null] --> Construct
|
||||
Pending[Animation request pending] --> Construct
|
||||
Construct --> PendingCheck{Animation pending?}
|
||||
PendingCheck -->|yes| Dispatch[Dispatch planner]
|
||||
PendingCheck -->|no| Batch[Batch planner]
|
||||
Batch --> StaticNeeded{Positive static batch?}
|
||||
StaticNeeded -->|yes| Adopt[Adopt Mesh and missing observation]
|
||||
StaticNeeded -->|no| Dispatch
|
||||
Adopt --> Dispatch
|
||||
Dispatch --> Borrow[Loader borrows selected resource]
|
||||
```
|
||||
|
||||
## Lifecycle/state
|
||||
|
||||
```mermaid
|
||||
stateDiagram-v2
|
||||
[*] --> AnimationObserved: construct
|
||||
AnimationObserved --> AnimationObserved: animation pending or animated path
|
||||
AnimationObserved --> StaticObserved: adopt static result
|
||||
StaticObserved --> StaticObserved: replace static result
|
||||
AnimationObserved --> Released: operation ends
|
||||
StaticObserved --> Released: operation ends
|
||||
Released --> [*]
|
||||
```
|
||||
|
||||
## Main sequence
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant L as StreamingWorldLoader
|
||||
participant S as M2BuildResourceSnapshot
|
||||
participant B as M2BuildBatchPlanner
|
||||
participant D as M2BuildDispatchPlanner
|
||||
participant M as M2 materializer
|
||||
L->>L: resolve/request animated prototype
|
||||
L->>S: construct(path, prototype, pending)
|
||||
alt animation not pending
|
||||
L->>B: plan batch using snapshot availability
|
||||
opt positive static batch
|
||||
L->>L: lookup/request static Mesh
|
||||
L->>S: adopt_static_observation
|
||||
end
|
||||
end
|
||||
L->>D: plan_step(batch count, snapshot)
|
||||
D-->>L: action plan
|
||||
opt materialization action
|
||||
L->>S: borrow prototype or Mesh
|
||||
L->>M: materialize selected slice
|
||||
end
|
||||
```
|
||||
|
||||
## Dependency diagram
|
||||
|
||||
```mermaid
|
||||
flowchart TB
|
||||
Loader[StreamingWorldLoader] --> Snapshot[M2BuildResourceSnapshot]
|
||||
Dispatch[M2BuildDispatchPlanner] --> Snapshot
|
||||
Snapshot --> Values[String and booleans]
|
||||
Snapshot --> Borrowed[Borrowed Node3D and Mesh]
|
||||
Snapshot -. no dependency .-> IO[ResourceLoader / FileAccess]
|
||||
Snapshot -. no dependency .-> State[Cache / pipeline / queue / scheduler]
|
||||
Snapshot -. no dependency .-> Mutation[SceneTree / RenderingServer]
|
||||
```
|
||||
|
||||
## Ownership, threading and resources
|
||||
|
||||
- Snapshot owns only copied scalar state and temporary references.
|
||||
- Prototype/cache services retain resource state; loader owns observation order.
|
||||
- Scene roots remain loader/tile-owned; Mesh lifetime follows cache/resource refs.
|
||||
- Dispatch planner reads only snapshot accessors and never mutates the snapshot.
|
||||
- Current construction/adoption occurs on renderer main thread.
|
||||
|
||||
## Errors, cancellation and recovery
|
||||
|
||||
| Failure/state | Detection | Behavior | Diagnostic | Recovery |
|
||||
|---|---|---|---|---|
|
||||
| Empty path | Exact String retained | No validation or hidden normalization | Contract fixture | Loader already normalizes input |
|
||||
| Null prototype/Mesh | Availability accessor false | Dispatch uses pending/missing state | Contract fixture | Loader request/cache path retries |
|
||||
| Mesh and missing both true | Exact adoption | Both retained; dispatch gives ready Mesh priority | Contradiction fixture | Loader normally prevents combination |
|
||||
| Static observation replaced | Explicit adoption | Latest Mesh/missing values win | Replacement fixture | None required |
|
||||
| Borrowed Node externally freed | Outside snapshot | Loader validity/lifecycle gates remain authoritative | Shutdown regressions | Tile may cancel/requeue |
|
||||
| Tile cancellation | Outside snapshot | Ephemeral snapshot releases references | Queue/shutdown regressions | Eligible tile may rebuild |
|
||||
|
||||
## Configuration and capabilities
|
||||
|
||||
The snapshot adds no setting. Existing animation enable/allow/deny rules, batch
|
||||
limits, cache paths, render settings and scheduler permits remain external.
|
||||
|
||||
## Persistence, cache and migration
|
||||
|
||||
No observation is serialized. No ADT/M2 cache version changes and no rebake or
|
||||
migration are required.
|
||||
|
||||
## Diagnostics and observability
|
||||
|
||||
`diagnostic_snapshot()` exposes normalized path and four availability/outcome
|
||||
flags without Node/Mesh references. The module emits no logs. Existing loader
|
||||
queue/hitch metrics remain unchanged.
|
||||
|
||||
## Verification
|
||||
|
||||
- `verify_m2_build_resource_snapshot.gd` covers exact path/reference identity,
|
||||
defaults, static adoption/replacement/clear, contradictory flags, detached
|
||||
diagnostics, engine lifetime, loader/dispatch boundaries and bounded timing.
|
||||
- Dispatch, queue, batch, materializer, cache/pipeline, shutdown, facade,
|
||||
internal-access and checkpoint regressions protect adjacent behavior.
|
||||
- Fidelity evidence is exact observation transfer only; no private asset or
|
||||
original-client visual claim is made.
|
||||
|
||||
## Extension points
|
||||
|
||||
A later resource-observation service may produce this snapshot while moving
|
||||
ResourceLoader/cache request ownership out of the loader. The value contract
|
||||
must remain independent of that service and of generic callback frameworks.
|
||||
|
||||
## Capability status
|
||||
|
||||
| Capability | Status | Evidence | Gap/next step |
|
||||
|---|---|---|---|
|
||||
| Typed per-step M2 resource observation | Implemented extraction | Identity/adoption/lifetime/source/timing verifier | Asset-backed traversal pending |
|
||||
| Dispatch decision | Implemented separately | Dispatch planner verifier | Asset-backed traversal pending |
|
||||
| Resource lookup/request execution | Loader-owned | Cache/pipeline regressions | Service extraction pending |
|
||||
| Engine lifetime/materialization | Loader/materializer-owned | Lifetime/materializer regressions | GPU/p95/p99 evidence pending |
|
||||
|
||||
## Known gaps and risks
|
||||
|
||||
- Static observation is mutable during its short two-phase construction.
|
||||
- Raw Node3D/Mesh references remain necessary for current materializer APIs.
|
||||
- Loader still owns synchronous/native prototype attempts and ResourceLoader requests.
|
||||
- Synthetic timing does not measure resource, Node or GPU work.
|
||||
|
||||
## Source map
|
||||
|
||||
| Path | Responsibility |
|
||||
|---|---|
|
||||
| `src/render/m2/m2_build_resource_snapshot.gd` | Typed per-step resource observations and diagnostics |
|
||||
| `src/render/m2/m2_build_dispatch_planner.gd` | Snapshot-to-action planning |
|
||||
| `src/scenes/streaming/streaming_world_loader.gd` | Resource observation/request execution and materializer borrowing |
|
||||
| `src/tools/verify_m2_build_resource_snapshot.gd` | Identity/adoption/lifetime/boundary/timing regression |
|
||||
|
||||
## Related decisions and references
|
||||
|
||||
- [`m2-build-dispatch-planner.md`](m2-build-dispatch-planner.md)
|
||||
- [`m2-build-batch-planner.md`](m2-build-batch-planner.md)
|
||||
- [`m2-build-queue.md`](m2-build-queue.md)
|
||||
- [`world-renderer.md`](world-renderer.md)
|
||||
- [`../../RENDER.md`](../../RENDER.md)
|
||||
- [`../../targets/roadmap/02-rendering-and-graphics.md`](../../targets/roadmap/02-rendering-and-graphics.md)
|
||||
@@ -56,6 +56,8 @@ flowchart LR
|
||||
M2Batch --> Loader
|
||||
Loader --> M2Dispatch[M2BuildDispatchPlanner]
|
||||
M2Dispatch --> Loader
|
||||
Loader --> M2Resources[M2BuildResourceSnapshot]
|
||||
M2Resources --> M2Dispatch
|
||||
Loader --> M2Queue[M2BuildQueue]
|
||||
M2Queue --> Loader
|
||||
Loader --> M2Static[M2StaticBatchMaterializer]
|
||||
@@ -139,6 +141,7 @@ from externally reading/writing loader-private queue, task, cache and tile-state
|
||||
| `M2PlacementGrouper.group_placements` | Internal pure M2 service | Validates and groups ordered tile-local placement transforms by normalized path | Worker/main thread; stateless | Invalid variants/name IDs/empty paths are skipped |
|
||||
| `M2BuildBatchPlanner.plan_batch` | Internal pure M2 service | Selects static/animated batch count and next group cursor | Main/any thread; stateless | Non-positive selected limit clamps to one; empty range completes |
|
||||
| `M2BuildDispatchPlanner.plan_step` | Internal pure M2 service | Selects wait, animated/static materialization or no-Node advancement from observed resource state | Main/any thread; stateless | Pending animation has priority; unresolved static Mesh waits |
|
||||
| `M2BuildResourceSnapshot` | Internal M2 value contract | Carries per-step normalized path, animated/static references and pending/missing observations | Renderer main thread; one build operation | Values retained exactly; release never frees resources |
|
||||
| `M2BuildQueue` / `M2BuildJob` | Internal M2 pending-state service | Own typed root/groups/cursor jobs and FIFO/stale tile keys | Renderer main thread; map session | Invalid enqueue rejected; stale keys drain independently of jobs |
|
||||
| `M2StaticBatchMaterializer.materialize_batch` | Internal M2 scene-materialization service | Builds and attaches one prepared-Mesh MultiMesh transform slice | Renderer main thread; stateless after each call | Invalid/empty input returns null; bounds are caller precondition |
|
||||
| `M2RuntimeMeshRebuildClassifier` | Internal memoized M2 service | Detects billboard/UV-rotation metadata requiring stale cached-mesh rebuild | Renderer main thread; cached until reset | Invalid variants/indices skipped; first path decision wins |
|
||||
@@ -189,6 +192,7 @@ loader configuration remains transitional composition data, not a caller API.
|
||||
| Internal grouping | Tile origin, M2 names and placements | Loader / `M2PlacementGrouper` | Loader worker result/build job | Fresh Dictionary/Transform3D arrays | One grouping task |
|
||||
| Internal batch plan | Transform count/offset, path kind and limits | Loader / `M2BuildBatchPlanner` | Loader materialization/cursor adapter | Fresh scalar Dictionary | One build operation |
|
||||
| Internal M2 dispatch plan | Batch count and observed animation/static resource state | Loader / `M2BuildDispatchPlanner` | Loader queue/materializer/progress adapter | Fresh scalar/action Dictionary | One build operation |
|
||||
| Internal M2 resource observation | Normalized path, optional prototype/Mesh and pending/missing flags | Loader / `M2BuildResourceSnapshot` | Dispatch planner and loader materializer adapter | Snapshot borrows exact engine references | One build operation |
|
||||
| Internal M2 pending build | Tile key, M2 root, grouped transforms and cursors | Loader / `M2BuildQueue` | Loader readiness, planner and materializer adapters | Queue-owned job/keys and strong references | Until finish/cancel/clear/replacement |
|
||||
| Internal static M2 materialization | Parent, prepared Mesh, ordered transform slice and render settings | Loader / `M2StaticBatchMaterializer` | Attached MultiMeshInstance3D | Parent owns node/MultiMesh; exact Mesh reference retained | One main-thread build batch |
|
||||
| Internal WMO placement | Path, MODF placement, tile/index | Loader / `WmoPlacementResolver` | WMO caches, registry and three instance adapters | Value-only String/Transform3D | Lookup/placement lifetime |
|
||||
@@ -253,7 +257,8 @@ flowchart TD
|
||||
M2Grouper --> M2Batch[M2BuildBatchPlanner]
|
||||
M2Grouper --> M2Queue[M2BuildQueue]
|
||||
M2Queue --> M2Batch
|
||||
M2Batch --> M2Dispatch[M2BuildDispatchPlanner]
|
||||
M2Batch --> M2Resources[M2BuildResourceSnapshot]
|
||||
M2Resources --> M2Dispatch[M2BuildDispatchPlanner]
|
||||
M2Dispatch --> M2Static[M2StaticBatchMaterializer]
|
||||
M2Static --> M2
|
||||
R --> WmoPlacement[WmoPlacementResolver]
|
||||
@@ -383,7 +388,9 @@ sequenceDiagram
|
||||
groups enter `M2BuildQueue` as typed pending jobs.
|
||||
- `M2BuildBatchPlanner` is stateless and owns only call-local scalar plans.
|
||||
`M2BuildDispatchPlanner` is stateless and owns only call-local action/transition
|
||||
plans after the loader observes resource availability.
|
||||
plans after the loader observes resource availability. `M2BuildResourceSnapshot`
|
||||
carries those per-step observations and borrows exact prototype/Mesh references
|
||||
without controlling engine lifetime.
|
||||
`M2BuildQueue` owns typed pending jobs, FIFO/stale keys, grouped-transform
|
||||
references and group/offset/serial cursors without freeing engine objects.
|
||||
`M2StaticBatchMaterializer` owns static MultiMesh construction/attachment;
|
||||
@@ -571,6 +578,7 @@ Exact exported settings and cache versions remain documented in [`../../RENDER.m
|
||||
| M2 placement grouper | Implemented extraction | Scene-free validation/order/transform/source/timing contract | Worker/build state, spatial cells and asset-backed p95/p99 remain pending |
|
||||
| M2 build batch planner | Implemented extraction | Scene-free limit/count/cursor/source/timing contract | Spatial cells and asset-backed p95/p99 remain pending |
|
||||
| M2 build dispatch planner | Implemented extraction | Scene-free priority/action/transition/source/timing contract | Resource observation/orchestration and asset-backed traversal remain pending |
|
||||
| M2 build resource snapshot | Implemented extraction | Typed identity/adoption/lifetime/source/timing contract | Resource observation service and asset-backed traversal remain pending |
|
||||
| M2 build queue | Implemented extraction | Typed lifecycle/FIFO/progress/lifetime/source/timing contract | Resource dispatch and asset-backed traversal remain pending |
|
||||
| M2 animation load pipeline state | Implemented extraction | Synthetic lifecycle/FIFO/source/timing contract | Asset-backed traversal/leak/animation-fidelity/p95/p99 pending |
|
||||
| M2 animated scene finalizer | Implemented extraction | Synthetic type/lifetime/material/player/source/timing contract | Asset-backed GLB traversal/material/animation comparison pending |
|
||||
@@ -643,6 +651,7 @@ Exact exported settings and cache versions remain documented in [`../../RENDER.m
|
||||
| `src/render/m2/m2_animated_instance_materializer.gd` | Animated duplicate/render/playback startup and non-empty batch attachment |
|
||||
| `src/render/m2/m2_static_batch_materializer.gd` | Static MultiMesh construction, render setup and attachment |
|
||||
| `src/render/m2/m2_build_dispatch_planner.gd` | M2 wait/materializer/advance action priority and transition plan |
|
||||
| `src/render/m2/m2_build_resource_snapshot.gd` | Typed per-step animated/static observations and borrowed references |
|
||||
| `src/render/m2/m2_build_job.gd` | M2 root/groups references and group/offset/serial progress |
|
||||
| `src/render/m2/m2_build_queue.gd` | Keyed pending jobs and FIFO/stale tile-key lifecycle |
|
||||
| `src/render/m2/m2_mesh_load_pipeline_state.gd` | Static M2 pending Resource paths, terminal statuses and finalize FIFO |
|
||||
@@ -672,6 +681,7 @@ Exact exported settings and cache versions remain documented in [`../../RENDER.m
|
||||
| `src/tools/verify_m2_animated_instance_materializer.gd` | Animated M2 order/render/playback/attachment/boundary/timing regression |
|
||||
| `src/tools/verify_m2_static_batch_materializer.gd` | Static M2 node/Mesh/render/attachment/boundary/timing regression |
|
||||
| `src/tools/verify_m2_build_dispatch_planner.gd` | M2 dispatch priority/action/transition/boundary/timing regression |
|
||||
| `src/tools/verify_m2_build_resource_snapshot.gd` | M2 observation identity/adoption/lifetime/boundary/timing regression |
|
||||
| `src/tools/verify_m2_build_queue.gd` | M2 job/FIFO/progress/lifetime/boundary/timing regression |
|
||||
| `src/tools/verify_m2_mesh_load_pipeline_state.gd` | Static M2 request/terminal/FIFO/boundary/timing regression |
|
||||
| `src/tools/verify_m2_mesh_resource_cache_state.gd` | Static M2 Mesh cache ownership/lifetime/boundary/timing regression |
|
||||
|
||||
Reference in New Issue
Block a user