Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
* Deprecate async constructors.
[#4402](https://github.com/rustwasm/wasm-bindgen/pull/4402)

* The `size` argument to `GPUCommandEncoder.copyBufferToBuffer` is now optional.
[#4508](https://github.com/wasm-bindgen/wasm-bindgen/pull/4508)

### Fixed

* Detect more failure scenarios when retrieving the Wasm module.
Expand Down
72 changes: 72 additions & 0 deletions crates/web-sys/src/features/gen_GpuCommandEncoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,78 @@ extern "C" {
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn copy_buffer_to_buffer_with_u32_and_u32(
this: &GpuCommandEncoder,
source: &GpuBuffer,
source_offset: u32,
destination: &GpuBuffer,
destination_offset: u32,
) -> Result<(), JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuBuffer")]
# [wasm_bindgen (catch , method , structural , js_class = "GPUCommandEncoder" , js_name = copyBufferToBuffer)]
#[doc = "The `copyBufferToBuffer()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuCommandEncoder`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn copy_buffer_to_buffer_with_f64_and_u32(
this: &GpuCommandEncoder,
source: &GpuBuffer,
source_offset: f64,
destination: &GpuBuffer,
destination_offset: u32,
) -> Result<(), JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuBuffer")]
# [wasm_bindgen (catch , method , structural , js_class = "GPUCommandEncoder" , js_name = copyBufferToBuffer)]
#[doc = "The `copyBufferToBuffer()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuCommandEncoder`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn copy_buffer_to_buffer_with_u32_and_f64(
this: &GpuCommandEncoder,
source: &GpuBuffer,
source_offset: u32,
destination: &GpuBuffer,
destination_offset: f64,
) -> Result<(), JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuBuffer")]
# [wasm_bindgen (catch , method , structural , js_class = "GPUCommandEncoder" , js_name = copyBufferToBuffer)]
#[doc = "The `copyBufferToBuffer()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuCommandEncoder`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn copy_buffer_to_buffer_with_f64_and_f64(
this: &GpuCommandEncoder,
source: &GpuBuffer,
source_offset: f64,
destination: &GpuBuffer,
destination_offset: f64,
) -> Result<(), JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuBuffer")]
# [wasm_bindgen (catch , method , structural , js_class = "GPUCommandEncoder" , js_name = copyBufferToBuffer)]
#[doc = "The `copyBufferToBuffer()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuCommandEncoder`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn copy_buffer_to_buffer_with_u32_and_u32_and_u32(
this: &GpuCommandEncoder,
source: &GpuBuffer,
Expand Down
2 changes: 1 addition & 1 deletion crates/web-sys/webidls/unstable/WebGPU.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ interface GPUCommandEncoder {
GPUSize64 sourceOffset,
GPUBuffer destination,
GPUSize64 destinationOffset,
GPUSize64 size);
optional GPUSize64 size);

[Throws]
undefined copyBufferToTexture(
Expand Down
Loading