docs(pipeline): MP1b plan - pak format, acdream-bake, PakReader, equivalence

Normative v1 format (ACPK header with dat-iteration stamps, sorted
24-byte TOC entries with crc32, 64-byte-aligned uncompressed blobs,
deterministic ObjectMeshData serialization), the bake CLI that drives
MP1a MeshExtractor in parallel, the mmap zero-copy PakReader, and a
dat-gated live-vs-pak equivalence suite. Scope-fenced to the
ObjectMeshData asset classes (the decode-storm content from the MP0
baseline); terrain/BSP/scenery/degrade blobs are later slices. Also
amends the spec: PakReader lives in AcDream.Content (Content->Core
direction from MP1a makes a Core home circular).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-07-05 21:01:18 +02:00
parent 4122ac7eaf
commit b9ceafd4fd
2 changed files with 121 additions and 4 deletions

View file

@ -174,10 +174,14 @@ Single file `acdream.pak` next to the dats (path via `RuntimeOptions`):
### 6.3 Runtime consumption
- `PakReader` in `AcDream.Core` (Core stays GL-free; rule 2): one
`MemoryMappedFile`, `GetBlob(key)``ReadOnlySpan<byte>` into the view; typed
access via `MemoryMarshal.Cast` over blittable structs. **No locks anywhere**
immutable mapped memory is thread-safe to read by construction.
- `PakReader` in **`AcDream.Content`** (AMENDED 2026-07-05: the spec originally said
Core, but MP1a established the dependency direction Content→Core, and the pak's
blob shapes are the `ObjectMeshData` family living in Content — a Core-resident
reader would be circular. Content is GL-free, so the layering intent is
preserved; Core stays untouched): one `MemoryMappedFile`, `GetBlob(key)`
`ReadOnlySpan<byte>` into the view; typed access via `MemoryMarshal.Cast` over
blittable segments. **No locks anywhere** — immutable mapped memory is
thread-safe to read by construction.
- Streaming workers stop decoding: a landblock load becomes TOC lookups + handing
spans to the GL upload queue. The decode worker pool shrinks to the residual
runtime-decode set (below). Request-key dedup stays in the streaming layer