mirror of
https://github.com/vladtrc/iw4L
synced 2026-10-26 10:19:50 -04:00
9856f91a98
The split of an image variant into `payload` and `usage` is now what sharing keys on. A registry holds the texels an archive entry decodes to — the mip chain in one allocation, laid out as an upload wants it — and the `Image` is built over them where the row is placed. Two materials that want the same file under a different colour space or sampler cost one read, one inflate and one decode, and the second of them a copy of the chain; the last asker copies nothing, because the decode's own buffer becomes the image's. Asking whether a name is a cubemap reads the thirty-two byte IWI header out of the entry instead of inflating the megabyte behind it. The resident-bytes ceiling is charged per payload rather than per batch, so two batches pointing at one buffer hold one allocation between them. Load rows split `produced_bytes` into `prepared_bytes` and `reused_bytes`: only the first is work, and their sum is what the plan served. The merge census names who won a disputed claim by plan id, not only that somebody did. The frame clock closes the row and opens the next at the top of `First`, before anything else runs, so every main-phase interval falls wholly inside one frame; the frame the process exits from is closed at exit and its row carries `partial`. Which spans are a frame's coverage roots is declared by `Span::coverage_root` rather than read off a thread's stack — an executor is free to run a schedule's `begin` and its `end` on two workers — and spans a migration left behind are pruned. A counter measured on another thread is charged to the frame it ran in through `emit_at`, and a sample that finds no row is counted rather than moved to whichever frame is open. `IW4L_PIPELINED_RENDERING=1` runs the render world a frame behind on its own thread, and it is the only thing the switch moves; the manifest records which branch a run took. The report gains `main/render overlap`, read off the intervals rather than off the frame a render stage names as its origin. A `bevy-trace` build writes bevy's own spans as a Chrome trace, which is the only place the render graph's submit can be timed from, and `scheduling.bevy_tracing` says whether a run was one. Glass keeps its shattered material while damaged, scales the authored UV to it, picks its shatter effect by whether the piece is landing, and carries the surface normal on the presentation event. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>