v136 · miscellaneous

WebGPU: copyBufferToBuffer overload

Functionality added to the WebGPU spec after its first shipment in a browser. The GPUCommandEncoder copyBufferToBuffer() method now includes a simpler way to copy entire buffers using a new overload with optional offsets and size parameters.

concepts

  1. Copy Overload

    Whole-buffer copy overload — no offsets/size required.

  2. Migration diff

    Same buffer copy in both forms, both executed, results compared byte-for-byte — the migration checklist a reviewer would want.

  3. Copy Graph

    Three buffers in a pipeline A → B → C with editable per-edge offsets/sizes. Leave any value blank to use the whole-buffer overload; the bytes panel shows the result.

  4. Buffer Readback Tool

    Enter comma-separated float values, copy them to a destination GPU buffer using the new 2-argument copyBufferToBuffer(src, dst) overload, then map and read the bytes back — verifying the result matches the classic 5-argument form side by side.

why it shipped

To simplify the copy of entire buffers, a new overload has been added to the GPUCommandEncoder copyBufferToBuffer() method, allowing developers to omit offsets and size parameters.

references