demo · v136
copyBufferToBuffer overload
copyBufferToBuffer now accepts a 3-arg shorthand — offset and size default to 0 and "whole buffer". Click below to copy a buffer with the short form, read it back, and verify.
Probing…
src buffer—
readback—
match—
the code
// 136+: short overload — offsets default to 0, size = entire buffer
encoder.copyBufferToBuffer(src, dst); // shortest
encoder.copyBufferToBuffer(src, dst, src.size); // with explicit size
// Long form still works
encoder.copyBufferToBuffer(src, 0, dst, 0, src.size);
see also
- WebGPU copyBufferToBuffer overload — feature index
- ChromeStatus entry
- WebGPU spec