render: extract M2 build queue
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
| M2 placement transform resolver | Implemented | [`m2-placement-transform-resolver.md`](m2-placement-transform-resolver.md) |
|
||||
| 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 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) |
|
||||
| M2 animated scene finalizer | Implemented extraction | [`m2-animated-scene-finalizer.md`](m2-animated-scene-finalizer.md) |
|
||||
|
||||
@@ -102,8 +102,8 @@ sequenceDiagram
|
||||
## Ownership, threading and resources
|
||||
|
||||
- The planner owns only call-local scalar values and the returned Dictionary.
|
||||
- The loader owns build-job Dictionaries, queue ordering, tile checks, resource
|
||||
readiness/retry, serial numbers and group-index mutation.
|
||||
- `M2BuildQueue` owns typed jobs, FIFO ordering, serial numbers and group/offset
|
||||
cursors. The loader owns tile checks, resource readiness/retry and adoption calls.
|
||||
- Materializers own main-thread Node/MultiMesh construction under loader roots.
|
||||
- The scheduler owns the frame-local `M2_BUILD` counter.
|
||||
- Pure planning is thread-safe, though the current adapter calls it on main thread.
|
||||
@@ -149,8 +149,8 @@ queue depth, build activity and hitch observability.
|
||||
|
||||
## Extension points
|
||||
|
||||
- A later package may define typed build-job state once queue/resource transitions
|
||||
are extracted together with explicit cancellation and recovery.
|
||||
- A later package may extract resource readiness/dispatch while retaining the
|
||||
typed build-job and FIFO contracts defined by `M2BuildQueue`.
|
||||
- Spatial-cell batching must use measured culling/performance evidence and must
|
||||
not silently change this model-path batch cursor.
|
||||
|
||||
@@ -159,12 +159,14 @@ queue depth, build activity and hitch observability.
|
||||
| Capability | Status | Evidence | Gap/next step |
|
||||
|---|---|---|---|
|
||||
| Static/animated batch cursor planning | Implemented extraction | Contract/source/timing verifier | Asset-backed p95/p99 pending |
|
||||
| Build queue/resource state machine | Remains in loader | Existing lifecycle regressions | Stateful extraction pending |
|
||||
| Typed build queue/cursor state | Implemented extraction | M2 build queue lifecycle verifier | Asset-backed traversal pending |
|
||||
| Resource readiness/dispatch | Remains in loader | Existing lifecycle regressions | Stateful extraction pending |
|
||||
| Spatial-cell batching | Planned | Renderer roadmap | Culling evidence/design pending |
|
||||
|
||||
## Known gaps and risks
|
||||
|
||||
- The result remains a Dictionary while loader build jobs are untyped Dictionaries.
|
||||
- The planner result remains a Dictionary; `M2BuildQueue` adopts its scalar
|
||||
cursor values through one explicit progress call.
|
||||
- Negative offsets are preserved rather than rejected to avoid a hidden behavior change.
|
||||
- Planning timing does not measure resource loading or materialization.
|
||||
- Private asset-backed p95/p99 and visual comparison remain unavailable.
|
||||
@@ -174,7 +176,8 @@ queue depth, build activity and hitch observability.
|
||||
| Path | Responsibility |
|
||||
|---|---|
|
||||
| `src/render/m2/m2_build_batch_planner.gd` | Pure limit/count/cursor planning |
|
||||
| `src/scenes/streaming/streaming_world_loader.gd` | Build job, queue, resource readiness, materializer adapters and budgets |
|
||||
| `src/render/m2/m2_build_queue.gd` | Typed pending jobs, FIFO order and cursor ownership |
|
||||
| `src/scenes/streaming/streaming_world_loader.gd` | Tile checks, resource readiness, progress adoption, materializer adapters and budgets |
|
||||
| `src/render/m2/m2_static_batch_materializer.gd` | Planned static-slice MultiMesh construction and attachment |
|
||||
| `src/render/m2/m2_animation_playback_controller.gd` | Animated-instance phase/selection/native/imported playback |
|
||||
| `src/render/m2/m2_animated_instance_materializer.gd` | Planned animated-slice duplication, playback startup and attachment |
|
||||
|
||||
@@ -0,0 +1,258 @@
|
||||
# M2 Build Queue
|
||||
|
||||
## Metadata
|
||||
|
||||
| Field | Value |
|
||||
|---|---|
|
||||
| Status | Implemented |
|
||||
| Target/work package | M03 / `M03-RND-M2-BUILD-QUEUE-001` |
|
||||
| Owners | Pending M2 build-job records, FIFO tile keys and build cursors |
|
||||
| Last verified | Worktree `work/sindo-main-codex/m03-m2-build-queue`, 2026-07-18 |
|
||||
| Profiles/capabilities | Existing static MultiMesh and animated-instance build paths |
|
||||
|
||||
## Purpose
|
||||
|
||||
Own typed pending M2 build state outside `StreamingWorldLoader`: a keyed job
|
||||
retains its M2 root, grouped transforms, insertion-order group keys and three
|
||||
progress cursors, while a separate FIFO retains scheduling order and stale keys.
|
||||
|
||||
## Non-goals
|
||||
|
||||
- Decide tile eligibility, detail radius, resource readiness or retries.
|
||||
- Consume scheduler permits or plan batch sizes.
|
||||
- Create, attach or free Nodes, Meshes, MultiMeshes or animated instances.
|
||||
- Load/cache resources, group placements or mutate tile state.
|
||||
- Change model order, transform order, render settings or visible output.
|
||||
|
||||
## Context and boundaries
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
Groups[M2PlacementGrouper result] --> Loader[StreamingWorldLoader adapter]
|
||||
Loader --> Queue[M2BuildQueue]
|
||||
Queue --> Job[M2BuildJob]
|
||||
Queue --> Loader
|
||||
Loader --> Planner[M2BuildBatchPlanner]
|
||||
Loader --> Static[M2StaticBatchMaterializer]
|
||||
Loader --> Animated[M2AnimatedInstanceMaterializer]
|
||||
Loader --> Scheduler[RenderBudgetScheduler]
|
||||
```
|
||||
|
||||
Allowed dependencies are String, Dictionary, Array, RefCounted and a strong
|
||||
Node3D reference. SceneTree destruction, materializers, Mesh/MultiMesh,
|
||||
RenderingServer/RIDs, ResourceLoader/files, workers/mutexes, scheduler policy,
|
||||
gameplay, network and Editor APIs are forbidden.
|
||||
|
||||
## Public API
|
||||
|
||||
### `M2BuildJob`
|
||||
|
||||
| Symbol | Kind | Purpose | Thread/lifetime | Errors |
|
||||
|---|---|---|---|---|
|
||||
| `tile_key()` | Query | Immutable keyed identity | Main thread; job lifetime | None |
|
||||
| `root()` | Query | Borrow strongly retained M2 root | Main thread; no ownership transfer | May be externally invalidated |
|
||||
| `groups()` | Query | Borrow exact grouped-transform Dictionary | Main thread; job lifetime | None |
|
||||
| `group_keys()` | Query | Borrow enqueue-time insertion-order key snapshot | Main thread; job lifetime | None |
|
||||
| `group_index()` | Query | Current model-path cursor | Main thread | None |
|
||||
| `transform_offset()` | Query | Current transform cursor within group | Main thread | None |
|
||||
| `batch_serial()` | Query | Current batch naming serial | Main thread | None |
|
||||
| `adopt_progress(group_index, offset, serial)` | Command | Atomically replace all progress values | Main thread | Raw integer semantics retained |
|
||||
| `diagnostic_snapshot()` | Query | Detached scalar/count state | Any serialized caller | Omits engine references |
|
||||
|
||||
### `M2BuildQueue`
|
||||
|
||||
| Symbol | Kind | Purpose | Thread/lifetime | Errors |
|
||||
|---|---|---|---|---|
|
||||
| `enqueue(tile_key, root, groups)` | Command | Replace keyed job and append FIFO key | Main thread; until erase/clear | Invalid/empty input returns false |
|
||||
| `has_pending/front_key/pop_front/rotate_front` | Commands/queries | Inspect, drain or rotate FIFO independently of job validity | Main thread | Empty returns false/empty String |
|
||||
| `has_job/job_for` | Queries | Inspect keyed record, including stale-key distinction | Main thread | Missing returns false/null |
|
||||
| `root_for/groups_for/group_keys_for` | Queries | Borrow current job inputs | Main thread | Stale returns null/empty collection |
|
||||
| `group_index_for/transform_offset_for/batch_serial_for` | Queries | Read current progress | Main thread | Stale returns zero |
|
||||
| `adopt_progress(tile_key, group_index, offset, serial)` | Command | Atomically update current job progress | Main thread | Stale returns false |
|
||||
| `erase_job(tile_key)` | Command | Remove keyed job but preserve FIFO keys | Main thread | Unknown returns false |
|
||||
| `job_keys()` | Query | Detached active-key snapshot for loader cleanup | Main thread | Empty returns empty Array |
|
||||
| `clear()` | Command | Release all job and FIFO references | Main thread | Idempotent; never frees Nodes |
|
||||
| `pending_count/active_job_count` | Queries | FIFO and keyed-job metrics | Main thread | None |
|
||||
| `diagnostic_snapshot()` | Query | Detached FIFO and sorted job diagnostics | Main thread | None |
|
||||
|
||||
## Inputs and outputs
|
||||
|
||||
| Direction | Contract/data | Producer | Consumer | Ownership | Thread/lifetime |
|
||||
|---|---|---|---|---|---|
|
||||
| Input | Tile key and M2 root | Loader group-result finalizer | Queue/job | Copied String; strong borrowed Node reference | Until erase/clear |
|
||||
| Input | Grouped transforms Dictionary | M2PlacementGrouper through loader mailbox | Job | Exact strong reference | Job lifetime |
|
||||
| Input | `groups.keys()` order | Job constructor | Loader group selection | Job-owned Array snapshot | Job lifetime |
|
||||
| Input | Next group/offset/serial | Planner/materializer adapter | Job progress | Copied integers | Until next adoption |
|
||||
| Output | Front/rotated/popped tile key | Queue | Loader scheduling loop | Copied String | One drain step |
|
||||
| Output | Borrowed root/groups/group keys | Job/queue | Loader readiness/materialization | No ownership transfer | One drain step |
|
||||
| Output | Detached diagnostics/key snapshots | Queue/job | Tests/metrics/cleanup adapter | Caller-owned collections | Call result |
|
||||
|
||||
Side effects are keyed/FIFO collection mutation, strong-reference retention and
|
||||
cursor mutation. No engine object is created, destroyed or attached.
|
||||
|
||||
## Data flow
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
Enqueue[Tile key, root and grouped transforms] --> Job[Create or replace M2BuildJob]
|
||||
Enqueue --> FIFO[Append tile key to FIFO]
|
||||
FIFO --> Front[Borrow front key]
|
||||
Front --> Current{Current keyed job exists?}
|
||||
Current -->|no| Pop[Pop stale key]
|
||||
Current -->|yes| Loader[Loader eligibility/readiness/materialization]
|
||||
Loader -->|resource pending| Rotate[Move front key to tail]
|
||||
Loader -->|operation complete| Progress[Adopt group, offset and serial]
|
||||
Loader -->|finish/cancel| Erase[Erase job only]
|
||||
Erase --> Pop
|
||||
```
|
||||
|
||||
## Lifecycle/state
|
||||
|
||||
```mermaid
|
||||
stateDiagram-v2
|
||||
[*] --> Absent
|
||||
Absent --> Queued: enqueue valid job and FIFO key
|
||||
Queued --> Rotated: resource pending
|
||||
Rotated --> Queued: returns to FIFO front
|
||||
Queued --> Progressed: adopt progress
|
||||
Progressed --> Queued: group remains
|
||||
Queued --> StaleQueued: erase job before FIFO pop
|
||||
Progressed --> StaleQueued: finish or cancel
|
||||
StaleQueued --> Absent: pop stale key
|
||||
Queued --> Absent: clear
|
||||
StaleQueued --> Absent: clear
|
||||
```
|
||||
|
||||
Duplicate enqueue replaces the current keyed job and adds another FIFO entry;
|
||||
later erase can therefore leave multiple stale entries, matching historical raw state.
|
||||
|
||||
## Main sequence
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant G as M2 group-result drain
|
||||
participant Q as M2BuildQueue
|
||||
participant L as StreamingWorldLoader
|
||||
participant P as M2BuildBatchPlanner
|
||||
participant M as M2 materializer
|
||||
G->>Q: enqueue(tile key, root, groups)
|
||||
L->>Q: front_key and has_job
|
||||
Q-->>L: borrowed root/groups/keys and cursors
|
||||
L->>P: plan selected transform slice
|
||||
alt resource pending
|
||||
L->>Q: rotate_front
|
||||
else materializable
|
||||
L->>M: materialize selected slice
|
||||
L->>Q: adopt_progress(next index, offset, serial)
|
||||
else cancelled or complete
|
||||
L->>L: free/queue-free root if required
|
||||
L->>Q: erase_job
|
||||
L->>Q: pop_front
|
||||
end
|
||||
```
|
||||
|
||||
## Dependency diagram
|
||||
|
||||
```mermaid
|
||||
flowchart TB
|
||||
Loader[StreamingWorldLoader] --> Queue[M2BuildQueue]
|
||||
Queue --> Job[M2BuildJob]
|
||||
Job --> EngineBase[Node3D strong reference]
|
||||
Loader --> Planner[M2BuildBatchPlanner]
|
||||
Loader --> Materializers[Static and animated materializers]
|
||||
Loader --> Scheduler[RenderBudgetScheduler]
|
||||
Queue -. no dependency .-> SceneMutation[SceneTree destruction/attachment]
|
||||
Queue -. no dependency .-> Resources[Mesh / MultiMesh / ResourceLoader]
|
||||
```
|
||||
|
||||
## Ownership, threading and resources
|
||||
|
||||
- Queue owns keyed job records and FIFO String entries.
|
||||
- Job retains the exact groups Dictionary, a fresh group-key snapshot and root.
|
||||
- Root ownership remains with the loader/tile SceneTree; queue release never frees it.
|
||||
- Loader validates `is_instance_valid`, frees empty/aborted roots and mutates tile state.
|
||||
- All current operations run on the renderer main thread; no mutex is required.
|
||||
- Group worker results cross their existing mutex mailbox before enqueue.
|
||||
|
||||
## Errors, cancellation and recovery
|
||||
|
||||
| Failure/state | Detection | Behavior | Diagnostic | Recovery |
|
||||
|---|---|---|---|---|
|
||||
| Invalid enqueue input | Entry guard | Reject without mutation | Contract fixture | Correct caller composition |
|
||||
| Duplicate tile key | Keyed assignment | Replace job and append FIFO key | Duplicate fixture | Stale entries drain normally |
|
||||
| Stale FIFO key | `has_job == false` | Loader pops and continues without permit | Stale fixture | No action required |
|
||||
| Resource pending | Loader cache state | Rotate one front key and consume existing permit | Rotation fixture/build diagnostics | Retry when key returns front |
|
||||
| Root externally invalid | Loader validity check | Erase job and pop key | Loader source contract | Tile may regroup/requeue later |
|
||||
| Tile cancelled | Loader policy | Queue-free root, erase job; FIFO key drains/pops | Shutdown/lifetime regression | Eligible tile may requeue |
|
||||
| World clear | Loader job-key snapshot | Cancel roots, then clear queue | Shutdown regression | New map starts empty |
|
||||
|
||||
## Configuration and capabilities
|
||||
|
||||
The queue introduces no settings. Existing static/animated batch limits,
|
||||
visibility/shadow settings, resource caches and `M2_BUILD` permits remain loader,
|
||||
planner, materializer and scheduler contracts.
|
||||
|
||||
## Persistence, cache and migration
|
||||
|
||||
No state is serialized. No ADT/M2 cache format or version changes; no rebake or
|
||||
migration is required.
|
||||
|
||||
## Diagnostics and observability
|
||||
|
||||
- `pending_count` preserves the existing FIFO-backed `m2_build` queue metric.
|
||||
- `active_job_count` distinguishes keyed jobs from stale/duplicate FIFO entries.
|
||||
- Diagnostic snapshots retain FIFO order and sort job records by tile key.
|
||||
- Job diagnostics expose cursors/counts but never root/groups references.
|
||||
- The module emits no logs.
|
||||
|
||||
## Verification
|
||||
|
||||
- `verify_m2_build_queue.gd` covers invalid input, exact groups/root retention,
|
||||
FIFO, duplicate replacement, rotation, stale entries, atomic progress, erase/
|
||||
clear engine lifetime, detached sorted diagnostics and loader boundaries.
|
||||
- Planner, static/animated materializer, Mesh pipeline/cache/prototype, shutdown,
|
||||
facade, internal-access and checkpoint regressions protect adjacent behavior.
|
||||
- Fidelity evidence is exact state-transition extraction; visual rules are not changed.
|
||||
- Performance budget: 100 cycles of 256 enqueue/rotate/erase operations under one second.
|
||||
- No original-client or proprietary asset comparison is claimed for bookkeeping state.
|
||||
|
||||
## Extension points
|
||||
|
||||
Remaining resource readiness and dispatch logic may later move behind explicit
|
||||
commands once its cancellation semantics are independently fixed. A generic
|
||||
queue base, signals and callbacks are intentionally excluded.
|
||||
|
||||
## Capability status
|
||||
|
||||
| Capability | Status | Evidence | Gap/next step |
|
||||
|---|---|---|---|
|
||||
| Typed keyed M2 jobs and FIFO | Implemented extraction | Lifecycle/order/source/timing verifier | Asset-backed traversal pending |
|
||||
| Cursor/serial ownership | Implemented extraction | Atomic progress fixtures | Typed batch-plan result remains Dictionary |
|
||||
| Root destruction | Existing loader-owned | Lifetime/source/shutdown regressions | Keep outside state service |
|
||||
| Resource readiness/dispatch | Existing loader-owned | Adjacent cache/build tests | Safe extraction remains |
|
||||
|
||||
## Known gaps and risks
|
||||
|
||||
- Grouped transforms remain untyped Dictionary/Array data.
|
||||
- Queue permits duplicate and stale FIFO keys intentionally for compatibility.
|
||||
- Job accessors return borrowed mutable groups/key collections; current loader is the sole consumer.
|
||||
- Private asset traversal, long-flight p95/p99 and leak evidence remain unavailable.
|
||||
|
||||
## Source map
|
||||
|
||||
| Path | Responsibility |
|
||||
|---|---|
|
||||
| `src/render/m2/m2_build_job.gd` | Strong root/groups references, key snapshot and progress cursors |
|
||||
| `src/render/m2/m2_build_queue.gd` | Keyed job ownership, FIFO/stale/rotation lifecycle and diagnostics |
|
||||
| `src/scenes/streaming/streaming_world_loader.gd` | Eligibility, readiness, permits, materialization, tile state and root cleanup |
|
||||
| `src/render/m2/m2_build_batch_planner.gd` | Batch count and cursor-plan calculation |
|
||||
| `src/tools/verify_m2_build_queue.gd` | Lifecycle/order/lifetime/boundary/timing regression |
|
||||
|
||||
## Related decisions and references
|
||||
|
||||
- [`m2-build-batch-planner.md`](m2-build-batch-planner.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)
|
||||
- [`../../RENDER.md`](../../RENDER.md)
|
||||
- [`../../targets/roadmap/02-rendering-and-graphics.md`](../../targets/roadmap/02-rendering-and-graphics.md)
|
||||
@@ -54,6 +54,8 @@ flowchart LR
|
||||
M2Transform --> Loader
|
||||
Loader --> M2Batch[M2BuildBatchPlanner]
|
||||
M2Batch --> Loader
|
||||
Loader --> M2Queue[M2BuildQueue]
|
||||
M2Queue --> Loader
|
||||
Loader --> M2Static[M2StaticBatchMaterializer]
|
||||
M2Static --> Scene
|
||||
Loader --> WmoPlacement[WmoPlacementResolver]
|
||||
@@ -134,6 +136,7 @@ from externally reading/writing loader-private queue, task, cache and tile-state
|
||||
| `M2PlacementTransformResolver.resolve_basis/resolve_origin_offset` | Internal pure M2 service | Resolves regular and calibrated model-specific ADT placement transforms | Worker/main thread; stateless | Unknown paths use regular basis and zero offset |
|
||||
| `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 |
|
||||
| `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 |
|
||||
| `M2AnimationLoadPipelineState` | Internal M2 async-state service | Owns animated scene pending request records and terminal finalize FIFO | Renderer main thread; map/session | Empty/duplicate/unknown transitions rejected |
|
||||
@@ -182,6 +185,7 @@ loader configuration remains transitional composition data, not a caller API.
|
||||
| Internal transform | Rotation/path/scale | Loader or grouper / `M2PlacementTransformResolver` | Group/placeholder/instance transforms | Value-only Basis/Vector3 | One placement |
|
||||
| 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 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 |
|
||||
| Internal WMO ownership | Resolved placement key and tile/global reference key | Loader / `WmoPlacementRegistry` | Loader create/retain/final-free decisions | Registry-owned String sets; detached diagnostics | Map session or final release |
|
||||
@@ -243,6 +247,8 @@ flowchart TD
|
||||
M2Registry --> M2Grouper[M2PlacementGrouper]
|
||||
M2Transform[M2PlacementTransformResolver] --> M2Grouper
|
||||
M2Grouper --> M2Batch[M2BuildBatchPlanner]
|
||||
M2Grouper --> M2Queue[M2BuildQueue]
|
||||
M2Queue --> M2Batch
|
||||
M2Batch --> M2Static[M2StaticBatchMaterializer]
|
||||
M2Static --> M2
|
||||
R --> WmoPlacement[WmoPlacementResolver]
|
||||
@@ -368,11 +374,14 @@ sequenceDiagram
|
||||
grouper owns worker-path final transforms; direct placeholder/instance
|
||||
transforms and every build/render side effect remain loader-owned.
|
||||
- `M2PlacementGrouper` is stateless and owns only call-local grouped transforms.
|
||||
The loader retains tasks, mutex/result queues, stale checks and build state.
|
||||
The loader retains tasks, mutex/result queues and stale-result checks; accepted
|
||||
groups enter `M2BuildQueue` as typed pending jobs.
|
||||
- `M2BuildBatchPlanner` is stateless and owns only call-local scalar plans.
|
||||
`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;
|
||||
the loader retains queue/resource transitions, cursor adoption, animated/static
|
||||
dispatch, budgets and Editor ownership.
|
||||
the loader retains resource transitions, cursor-adoption decisions,
|
||||
animated/static dispatch, root cleanup, budgets and Editor ownership.
|
||||
- `WmoPlacementResolver` is stateless and owns only call-local cache-key,
|
||||
identity and transform values. `WmoPlacementRegistry` owns only placement-key
|
||||
reference sets. `WmoRenderBuildStepPlanner` owns only a call-local operation
|
||||
@@ -554,6 +563,7 @@ Exact exported settings and cache versions remain documented in [`../../RENDER.m
|
||||
| M2 placement transform resolver | Implemented extraction | Scene-free formula/source/timing contract across three consumers | Asset-backed visual recheck and general placement parity pending |
|
||||
| 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 | Queue/resource state, spatial cells and asset-backed p95/p99 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 |
|
||||
| M2 animation playback controller | Implemented extraction | Synthetic phase/selection/loop/native-copy/source/timing contract | Asset-backed animation timing/name/native comparison pending |
|
||||
@@ -624,6 +634,8 @@ Exact exported settings and cache versions remain documented in [`../../RENDER.m
|
||||
| `src/render/m2/m2_animation_playback_controller.gd` | Per-instance phase, selection, native copy/start and imported playback |
|
||||
| `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_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 |
|
||||
| `src/render/m2/m2_mesh_resource_cache_state.gd` | Prepared static M2 Mesh references and final-shutdown release |
|
||||
| `src/render/m2/m2_mesh_resource_extractor.gd` | First-Mesh selection and temporary PackedScene instance lifetime |
|
||||
@@ -650,6 +662,7 @@ Exact exported settings and cache versions remain documented in [`../../RENDER.m
|
||||
| `src/tools/verify_m2_animation_playback_controller.gd` | Animated M2 phase/selection/playback/native/boundary/timing regression |
|
||||
| `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_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 |
|
||||
| `src/tools/verify_m2_mesh_resource_extractor.gd` | M2 direct/PackedScene/subtree order/lifetime/boundary/timing regression |
|
||||
|
||||
Reference in New Issue
Block a user