submit method
Ends the pass and hands it to the queue.
Passes execute in submission order, and that — not the order passes were built in — is the ordering the frame graph derives and this engine relies on. Nothing may be recorded afterwards.
Implementation
@override
void submit() {
if (_submitted) throw StateError('this pass has already been submitted');
_submitted = true;
_pass.end();
_device.guard(
'the submitted pass',
() => _device.gpuDevice.queue.submit(
<GPUCommandBuffer>[_encoder.finish()].toJS,
),
);
// **Nothing to destroy.** The transient vertices, indices and uniform
// blocks this pass wrote are ranges of the device's frame arenas, which are
// rewound at `beginFrame` rather than freed here — see
// `webgpu_resources.dart` for why that is safe under a frame the GPU has
// not finished with, and for what the WebGL2 backend does instead.
}