Expand description
CPU → GPU std430 packing for the scatter passes (CEL-73).
Three buffers per the plan’s locked contracts:
ScatterParamsGpu— one 112-byte params block per layer, shared byScatterPlace.slangandScatterCompact.slang.- aux (
pack_scatter_aux) — one 16-byte{path_lo, path_hi, face, pad}entry per realize-batch chunk, parallel to theChunkGpubatch (the descriptor lacks the quadtree path the stable lattice key needs). - vis (
pack_scatter_vis) — one 8-byte{slot, depth}uint2per visible instance, the compact pass’s gather list.
Layouts are locked by tests like chunk_descriptors::chunk_params_layout.
Structs§
- Scatter
AuxGpu - One realize-batch chunk’s scatter aux entry (std430, 16 bytes): the chunk’s
quadtree path split into two words + its face. Parallel to the
ChunkGpubatch (same index), which already carries slot/level/frame/bary. - Scatter
Params Gpu - Per-layer scatter parameters, byte-identical to
struct ScatterParamsinScatterPlace.slang/ScatterCompact.slang(binding 2 / 0).
Functions§
- pack_
scatter_ aux - Pack the aux buffer for a realize batch (parallel to
pack_chunksorder). - pack_
scatter_ params - Pack one
ScatterParamsGpuinto bytes for its per-layer buffer. - pack_
scatter_ vis - Pack the compact pass’s visible list: one
uintslot per drawn instance (same order as the instance buffer /visible_slots).