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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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