Renderer · type
ComputeContext
What it is handed at each dispatch.
Explained in Hello world.
type ComputeContext =import type { ComputeContext } from '@driftengine/core';In depth
The engine opens the pass and hands it over, rather than handing over the command encoder.
A definition holding the encoder could open a compute pass while a render pass was open, which
WebGPU forbids and which reports itself at submit rather than at the call that caused it —
the failure shape the 2026-08-14 rule is about, where the result is no picture from a frame
that recorded correctly. Handing over the pass keeps that invariant in one place instead of in
every contributor.
A definition that needs an encoder of its own for a readback still has one: it holds device
from init, and a copyBufferToBuffer submitted afterwards sees this dispatch's result,
because submission order is execution order.