Resets the frame's slot counter (see the module header) — called once per
frame by the renderer, before any view is recorded. A renderer with
batching: null calls nothing at all, which is the byte-identity half of
the contract.
Destroys the GPU handles on a live device (§83).
Uploads batch into this frame's next slot and records its single
indexed draw into pass — the vertex-buffer bind, the index-buffer bind
and the drawIndexed.
Everything a draw shares with the ordinary path stays with the caller: the pipeline, the group-0 uniform block (identity model — positions arrive in world space — and the batch's colour), the group-1 texture bind, the stencil reference, and §84's counting. A later ordinary draw needs no restore: vertex and index bindings are re-issued per draw on this backend anyway, which is one more place the pass-command model is structurally safer than GL's ambient state.
Drops the GPU handles without touching the device (§61 device loss).
Plans and assembles the batch starting at items[from], or null when
that item does not start one — RenderBatcher.next, forwarded verbatim,
layerMask included for gl-batch.ts's recorded reason (the renderer no
longer passes one over a pre-filtered view list; a caller batching an
unfiltered frame list still may).
OptionallayerMask: number
The batching support a WebgpuRenderer draws through when an application assigns one — the interface, so the renderer names no implementation and this module drops out of a bundle that never asks for it (
gl-batch.ts'sRenderBatching, restated for this backend's contract).Implemented by WgpuBatching; construct one with createWgpuBatching. Named
WgpuRenderBatchingbecause the WebGL backend exportsRenderBatchingfor its own, GL-shaped contract (draw(gl, program, …)), and one name for two per-backend interfaces across the workspace is theWgpuCacheableTextureconfusion again.