Skip to content

Conversation

@chrisdavidmills
Copy link
Contributor


Description

Chrome 137 supports the following WebGPU updates:

This PR updates the docs to include details of both.

Motivation

Additional details

Related issues and pull requests

@chrisdavidmills chrisdavidmills requested a review from a team as a code owner May 29, 2025 15:17
@chrisdavidmills chrisdavidmills requested review from sideshowbarker and removed request for a team and sideshowbarker May 29, 2025 15:17
@github-actions github-actions bot added the Content:WebAPI Web API docs label May 29, 2025
@chrisdavidmills chrisdavidmills changed the title Update docs for Chrome 137 WebGPU additions Technical review: Update docs for Chrome 137 WebGPU additions May 29, 2025
@github-actions github-actions bot added the size/s [PR only] 6-50 LoC changed label May 29, 2025
@github-actions
Copy link
Contributor

github-actions bot commented May 29, 2025

Preview URLs

External URLs (1)

URL: /en-US/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer
Title: GPUCommandEncoder: copyBufferToBuffer() method

(comment last updated: 2025-06-03 08:19:22)

Copy link
Contributor

@beaufortfrancois beaufortfrancois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nit

@chrisdavidmills chrisdavidmills changed the title Technical review: Update docs for Chrome 137 WebGPU additions Editorial review: Update docs for Chrome 137 WebGPU additions Jun 2, 2025
@chrisdavidmills
Copy link
Contributor Author

Do you mind giving this one an editorial review, @hamishwillee? It's a really tiny one.

## Syntax

```js-nolint
copyBufferToBuffer(source, destination)
Copy link
Collaborator

@hamishwillee hamishwillee Jun 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spec says description does not indicate that size is optional in https://gpuweb.github.io/gpuweb/#commands-buffer-copies , but does indicate it in the IDL https://gpuweb.github.io/gpuweb/#gpucommandencoder

So, I think that there are two options, one for copying the whole buffer from 0, and one for copying part of the buffer from 0. I think the note below is still fine though, because it refers to copying the whole buffer.
Might be worth some comment on this case with size though.

Suggested change
copyBufferToBuffer(source, destination)
copyBufferToBuffer(source, destination)
copyBufferToBuffer(source, destination, size)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, good call. I had grokked this, but I wasn't sure it needed to be said. I think you are right, though; it's good to be explicit about all possible cases.

I've added the case to the syntax and added an explanation to the note.

I also tested this case to make sure it works.

Copy link
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs if fine modulo any changes coming out of https://github.com/mdn/content/pull/39732/files#r2122324375

This looks like a BCD change right? I.e. previously this was not supported?
Can you link the BCD entry?

@chrisdavidmills
Copy link
Contributor Author

This looks like a BCD change right? I.e. previously this was not supported? Can you link the BCD entry?

Yes. BCD entry is at mdn/browser-compat-data#26935.

Copy link
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good thanks!

@hamishwillee hamishwillee merged commit 1e1e0c4 into mdn:main Jun 3, 2025
8 checks passed
@chrisdavidmills chrisdavidmills deleted the Chrome-137-webgpu-updates branch June 4, 2025 14:25
estelle pushed a commit that referenced this pull request Jun 6, 2025
* Update docs for Chrome 137 WebGPU additions

* Fix nit

* Fixes for hamishwillee review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants