Skip to content

webidl: webgpu: make the size argument to copyBufferToBuffer optional #4508

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

Merged
merged 3 commits into from
Aug 8, 2025

Conversation

andyleiserson
Copy link
Contributor

This matches the latest spec.

There is also a 3-argument overload of copyBufferToBuffer, which I have not added, as it poses some additional challenges, and I do not immediately need it.

See https://www.w3.org/TR/webgpu/#commands-buffer-copies for context for the following explanation.

The logic in wasm-bindgen that generates unique names for the different overloads does not understand that the 3-argument overload is omitting the 2nd and 4th arguments to the 5-argument overload. So it generates names based on every argument starting with the 2nd, which (1) changes existing names for variants of the 5-argument overload, (2) includes with_gpu_buffer for the 3rd argument in the names even though that has no actual disambiguation purpose.

@andyleiserson
Copy link
Contributor Author

@daxpedda apologies for the ping, do you have a minute to review this? Excluding the generated code, it's a very small change, and having it upstream helps us to avoid tracking local changes to our vendored copy. Thanks!

Copy link
Contributor

@daxpedda daxpedda left a comment

Choose a reason for hiding this comment

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

Just missing a changelog entry.
LGTM otherwise!

@daxpedda daxpedda force-pushed the buf-to-buf-copy-size branch from 9740e9a to 36b0927 Compare August 8, 2025 17:57
@daxpedda daxpedda merged commit f7e0467 into wasm-bindgen:main Aug 8, 2025
66 checks passed
@andyleiserson andyleiserson deleted the buf-to-buf-copy-size branch August 8, 2025 19:19
@andyleiserson andyleiserson mentioned this pull request Aug 8, 2025
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants