-
Notifications
You must be signed in to change notification settings - Fork 23k
Editorial review: Update docs for Chrome 137 WebGPU additions #39732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editorial review: Update docs for Chrome 137 WebGPU additions #39732
Conversation
|
Preview URLs
External URLs (1)URL:
(comment last updated: 2025-06-03 08:19:22) |
beaufortfrancois
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with nit
files/en-us/web/api/gpucommandencoder/copybuffertobuffer/index.md
Outdated
Show resolved
Hide resolved
|
Do you mind giving this one an editorial review, @hamishwillee? It's a really tiny one. |
| ## Syntax | ||
|
|
||
| ```js-nolint | ||
| copyBufferToBuffer(source, destination) |
There was a problem hiding this comment.
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.
| copyBufferToBuffer(source, destination) | |
| copyBufferToBuffer(source, destination) | |
| copyBufferToBuffer(source, destination, size) |
There was a problem hiding this comment.
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.
hamishwillee
left a comment
There was a problem hiding this 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?
Yes. BCD entry is at mdn/browser-compat-data#26935. |
hamishwillee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good thanks!
* Update docs for Chrome 137 WebGPU additions * Fix nit * Fixes for hamishwillee review
Description
Chrome 137 supports the following WebGPU updates:
sizeparameter when copying the entire buffer. See https://developer.chrome.com/blog/new-in-webgpu-137?hl=en#buffers_copy_without_specifying_offsets_and_size.GPUBindGroupusingcreateBindGroup(), you can specify aGPUTextureViewin place of aGPUExternalTexture. See https://developer.chrome.com/blog/new-in-webgpu-137?hl=en#use_texture_view_for_externaltexture_bindingThis PR updates the docs to include details of both.
Motivation
Additional details
Related issues and pull requests