bindPipeline method
Binds the pair of stages the following draws run.
Bindings do not survive this call, on any backend. Every buffer, uniform block and texture binding is forgotten, as clearBindings forgets them, even when the same pipeline is bound again. The flutter_gpu backend must: its pass replays every binding it has ever been handed at each draw, keyed by the shader that bound it, and a stale block from the previous pipeline's shader can land on a slot the new pipeline reads. Until 0.8.0 the rule said "free to drop", and the software rasteriser kept everything, so a draw that forgot a block read the previous draw's there and drew a plausible picture while Metal failed. Every site in this engine therefore binds what a draw needs after binding its pipeline, never before.
A slot the stage declares and the draw leaves unbound is the caller's mistake, and never another draw's resource. A backend that can see it (WebGL2 and WebGPU reflect every stage) names it in its debug errors; one that cannot must at least not serve it something bound for a different slot or a different draw.
Implementation
@override
void bindPipeline(PipelineHandle pipeline) {
_pipeline = pipeline.backend as WebGpuPipeline;
// Bindings do not survive a pipeline change — the contract states it, and
// this honours it literally rather than by accident.
_forgetBindings();
}