drawIndirect method
An indexed draw whose counts arguments holds at offsetInBytes — see
drawIndexedIndirectArguments for the twenty bytes — against the bound
index buffer. The buffer must have been made with
BufferUsage.indirect. DeviceFeature.indirectDraw; a non-zero first
instance needs DeviceFeature.indirectFirstInstance as well.
That second rule cannot be checked at the call. The arguments live
on the GPU, written by a pass the CPU never reads back, so no backend
can refuse them here. On a device without indirectFirstInstance a
draw whose arguments name a non-zero first instance is undefined —
WebGPU skips it without a word. Ask before writing one.
Implementation
@override
void drawIndirect(StorageBuffer arguments, {int offsetInBytes = 0}) => _gated(
DeviceFeature.indirectDraw,
'drawIndirect',
(arguments: arguments, offsetInBytes: offsetInBytes),
);