Fused texel writer: one pass over the staged arrays into the
texture's backing store, in the 3-texel layout documented in the
module header. Replaces the five per-attribute strided writes of the
interleaved era — fewer passes over the data.
Returns the written count, clamped to the texture's capacity
(capacity clamping warns once at acquire time; this clamp keeps the
write memory-safe if a caller slips past it).
opts.fromPoint (depth-sorting Phase 4 Stage 2, the append fast path):
skip writing texels [0, fromPoint) and register the dirty range for
only the [fromPoint, n) suffix. The prefix texels are already correct
on the texture's CPU mirror from the earlier commit that wrote them
(the commit layer only sets fromPoint > 0 when the prefix is provably
byte-identical — prefix lineage + presence matches + intact GPU
buffer), so re-writing and re-uploading them is redundant. Source
arrays are still full-length count; only the loop lower bound and
the dirty-range start move — the length guard below is unchanged.
Fused texel writer: one pass over the staged arrays into the texture's backing store, in the 3-texel layout documented in the module header. Replaces the five per-attribute strided writes of the interleaved era — fewer passes over the data.
Returns the written count, clamped to the texture's capacity (capacity clamping warns once at acquire time; this clamp keeps the write memory-safe if a caller slips past it).
opts.fromPoint(depth-sorting Phase 4 Stage 2, the append fast path): skip writing texels[0, fromPoint)and register the dirty range for only the[fromPoint, n)suffix. The prefix texels are already correct on the texture's CPU mirror from the earlier commit that wrote them (the commit layer only setsfromPoint > 0when the prefix is provably byte-identical — prefix lineage + presence matches + intact GPU buffer), so re-writing and re-uploading them is redundant. Source arrays are still full-lengthcount; only the loop lower bound and the dirty-range start move — the length guard below is unchanged.