From 7143bbe882bf0bd01dbfb1d5a43e5004f7bf854a Mon Sep 17 00:00:00 2001 From: Tom Schuster Date: Sun, 12 Apr 2026 20:00:46 +0200 Subject: [PATCH] Re-vendor WebGPU (#9090) --- CHANGELOG.md | 6 + wgpu-hal/Cargo.toml | 1 + wgpu-hal/src/gles/queue.rs | 8 + wgpu-types/src/texture/external_image.rs | 4 - wgpu/src/backend/webgpu.rs | 369 ++++++++++-------- wgpu/src/backend/webgpu/webgpu_sys/gen_Gpu.rs | 10 +- .../webgpu/webgpu_sys/gen_GpuAdapter.rs | 27 +- .../webgpu/webgpu_sys/gen_GpuAdapterInfo.rs | 35 +- .../webgpu/webgpu_sys/gen_GpuAddressMode.rs | 2 +- .../webgpu_sys/gen_GpuAutoLayoutMode.rs | 2 +- .../webgpu/webgpu_sys/gen_GpuBindGroup.rs | 2 +- .../webgpu_sys/gen_GpuBindGroupDescriptor.rs | 16 +- .../webgpu_sys/gen_GpuBindGroupEntry.rs | 129 +++++- .../webgpu_sys/gen_GpuBindGroupLayout.rs | 2 +- .../gen_GpuBindGroupLayoutDescriptor.rs | 18 +- .../webgpu_sys/gen_GpuBindGroupLayoutEntry.rs | 2 +- .../webgpu_sys/gen_GpuBlendComponent.rs | 2 +- .../webgpu/webgpu_sys/gen_GpuBlendFactor.rs | 2 +- .../webgpu_sys/gen_GpuBlendOperation.rs | 2 +- .../webgpu/webgpu_sys/gen_GpuBlendState.rs | 2 +- .../webgpu/webgpu_sys/gen_GpuBuffer.rs | 24 +- .../webgpu/webgpu_sys/gen_GpuBufferBinding.rs | 28 +- .../webgpu_sys/gen_GpuBufferBindingLayout.rs | 15 +- .../webgpu_sys/gen_GpuBufferBindingType.rs | 2 +- .../webgpu_sys/gen_GpuBufferDescriptor.rs | 30 +- .../webgpu_sys/gen_GpuBufferMapState.rs | 2 +- .../webgpu_sys/gen_GpuCanvasAlphaMode.rs | 2 +- .../webgpu_sys/gen_GpuCanvasConfiguration.rs | 10 +- .../webgpu/webgpu_sys/gen_GpuCanvasContext.rs | 2 +- .../webgpu_sys/gen_GpuCanvasToneMapping.rs | 2 +- .../gen_GpuCanvasToneMappingMode.rs | 2 +- .../webgpu/webgpu_sys/gen_GpuColorDict.rs | 2 +- .../webgpu_sys/gen_GpuColorTargetState.rs | 2 +- .../webgpu/webgpu_sys/gen_GpuCommandBuffer.rs | 2 +- .../gen_GpuCommandBufferDescriptor.rs | 2 +- .../webgpu_sys/gen_GpuCommandEncoder.rs | 8 +- .../gen_GpuCommandEncoderDescriptor.rs | 2 +- .../webgpu_sys/gen_GpuCompareFunction.rs | 2 +- .../webgpu_sys/gen_GpuCompilationInfo.rs | 6 +- .../webgpu_sys/gen_GpuCompilationMessage.rs | 2 +- .../gen_GpuCompilationMessageType.rs | 2 +- .../gen_GpuComputePassDescriptor.rs | 2 +- .../webgpu_sys/gen_GpuComputePassEncoder.rs | 4 +- .../gen_GpuComputePassTimestampWrites.rs | 2 +- .../webgpu_sys/gen_GpuComputePipeline.rs | 2 +- .../gen_GpuComputePipelineDescriptor.rs | 43 +- .../gen_GpuCopyExternalImageDestInfo.rs | 18 +- .../gen_GpuCopyExternalImageSourceInfo.rs | 174 ++++++++- .../webgpu/webgpu_sys/gen_GpuCullMode.rs | 2 +- .../webgpu_sys/gen_GpuDepthStencilState.rs | 2 +- .../webgpu/webgpu_sys/gen_GpuDevice.rs | 18 +- .../webgpu_sys/gen_GpuDeviceDescriptor.rs | 29 +- .../webgpu_sys/gen_GpuDeviceLostInfo.rs | 2 +- .../webgpu_sys/gen_GpuDeviceLostReason.rs | 2 +- .../backend/webgpu/webgpu_sys/gen_GpuError.rs | 2 +- .../webgpu/webgpu_sys/gen_GpuErrorFilter.rs | 2 +- .../webgpu/webgpu_sys/gen_GpuExtent3dDict.rs | 2 +- .../webgpu_sys/gen_GpuExternalTexture.rs | 2 +- .../gen_GpuExternalTextureBindingLayout.rs | 2 +- .../gen_GpuExternalTextureDescriptor.rs | 36 +- .../webgpu/webgpu_sys/gen_GpuFeatureName.rs | 8 +- .../webgpu/webgpu_sys/gen_GpuFilterMode.rs | 2 +- .../webgpu/webgpu_sys/gen_GpuFragmentState.rs | 27 +- .../webgpu/webgpu_sys/gen_GpuFrontFace.rs | 2 +- .../webgpu/webgpu_sys/gen_GpuIndexFormat.rs | 2 +- .../webgpu/webgpu_sys/gen_GpuLoadOp.rs | 2 +- .../webgpu_sys/gen_GpuMipmapFilterMode.rs | 2 +- .../webgpu_sys/gen_GpuMultisampleState.rs | 2 +- .../webgpu_sys/gen_GpuObjectDescriptorBase.rs | 2 +- .../webgpu/webgpu_sys/gen_GpuOrigin2dDict.rs | 2 +- .../webgpu/webgpu_sys/gen_GpuOrigin3dDict.rs | 2 +- .../webgpu_sys/gen_GpuOutOfMemoryError.rs | 2 +- .../gen_GpuPipelineDescriptorBase.rs | 39 +- .../webgpu_sys/gen_GpuPipelineLayout.rs | 2 +- .../gen_GpuPipelineLayoutDescriptor.rs | 21 +- .../webgpu_sys/gen_GpuPowerPreference.rs | 2 +- .../webgpu_sys/gen_GpuPrimitiveState.rs | 2 +- .../webgpu_sys/gen_GpuPrimitiveTopology.rs | 2 +- .../webgpu_sys/gen_GpuProgrammableStage.rs | 9 +- .../webgpu/webgpu_sys/gen_GpuQuerySet.rs | 2 +- .../webgpu_sys/gen_GpuQuerySetDescriptor.rs | 2 +- .../webgpu/webgpu_sys/gen_GpuQueryType.rs | 2 +- .../backend/webgpu/webgpu_sys/gen_GpuQueue.rs | 16 +- .../webgpu_sys/gen_GpuQueueDescriptor.rs | 2 +- .../webgpu/webgpu_sys/gen_GpuRenderBundle.rs | 2 +- .../gen_GpuRenderBundleDescriptor.rs | 2 +- .../webgpu_sys/gen_GpuRenderBundleEncoder.rs | 4 +- .../gen_GpuRenderBundleEncoderDescriptor.rs | 12 +- .../gen_GpuRenderPassColorAttachment.rs | 75 +++- ...gen_GpuRenderPassDepthStencilAttachment.rs | 39 +- .../webgpu_sys/gen_GpuRenderPassDescriptor.rs | 37 +- .../webgpu_sys/gen_GpuRenderPassEncoder.rs | 10 +- .../gen_GpuRenderPassTimestampWrites.rs | 2 +- .../webgpu_sys/gen_GpuRenderPipeline.rs | 2 +- .../gen_GpuRenderPipelineDescriptor.rs | 43 +- .../gen_GpuRequestAdapterOptions.rs | 2 +- .../webgpu/webgpu_sys/gen_GpuSampler.rs | 2 +- .../webgpu_sys/gen_GpuSamplerBindingLayout.rs | 2 +- .../webgpu_sys/gen_GpuSamplerBindingType.rs | 2 +- .../webgpu_sys/gen_GpuSamplerDescriptor.rs | 2 +- .../webgpu/webgpu_sys/gen_GpuShaderModule.rs | 6 +- .../gen_GpuShaderModuleCompilationHint.rs | 113 ++++++ .../gen_GpuShaderModuleDescriptor.rs | 17 +- .../webgpu_sys/gen_GpuStencilFaceState.rs | 2 +- .../webgpu_sys/gen_GpuStencilOperation.rs | 2 +- .../webgpu_sys/gen_GpuStorageTextureAccess.rs | 2 +- .../gen_GpuStorageTextureBindingLayout.rs | 2 +- .../webgpu/webgpu_sys/gen_GpuStoreOp.rs | 2 +- .../webgpu_sys/gen_GpuSupportedFeatures.rs | 32 +- .../webgpu_sys/gen_GpuSupportedLimits.rs | 46 ++- .../webgpu_sys/gen_GpuTexelCopyBufferInfo.rs | 15 +- .../gen_GpuTexelCopyBufferLayout.rs | 15 +- .../webgpu_sys/gen_GpuTexelCopyTextureInfo.rs | 15 +- .../webgpu/webgpu_sys/gen_GpuTexture.rs | 13 +- .../webgpu/webgpu_sys/gen_GpuTextureAspect.rs | 2 +- .../webgpu_sys/gen_GpuTextureBindingLayout.rs | 2 +- .../webgpu_sys/gen_GpuTextureDescriptor.rs | 73 +++- .../webgpu_sys/gen_GpuTextureDimension.rs | 2 +- .../webgpu/webgpu_sys/gen_GpuTextureFormat.rs | 8 +- .../webgpu_sys/gen_GpuTextureSampleType.rs | 2 +- .../webgpu/webgpu_sys/gen_GpuTextureView.rs | 2 +- .../gen_GpuTextureViewDescriptor.rs | 26 +- .../webgpu_sys/gen_GpuTextureViewDimension.rs | 2 +- .../webgpu_sys/gen_GpuUncapturedErrorEvent.rs | 2 +- .../gen_GpuUncapturedErrorEventInit.rs | 2 +- .../webgpu_sys/gen_GpuValidationError.rs | 2 +- .../webgpu_sys/gen_GpuVertexAttribute.rs | 32 +- .../webgpu_sys/gen_GpuVertexBufferLayout.rs | 43 +- .../webgpu/webgpu_sys/gen_GpuVertexFormat.rs | 2 +- .../webgpu/webgpu_sys/gen_GpuVertexState.rs | 20 +- .../webgpu_sys/gen_GpuVertexStepMode.rs | 2 +- .../webgpu_sys/gen_WgslLanguageFeatures.rs | 32 +- .../webgpu/webgpu_sys/gen_gpu_map_mode.rs | 2 +- wgpu/src/backend/webgpu/webgpu_sys/mod.rs | 9 +- xtask/src/vendor_web_sys.rs | 4 +- 135 files changed, 1538 insertions(+), 545 deletions(-) create mode 100644 wgpu/src/backend/webgpu/webgpu_sys/gen_GpuShaderModuleCompilationHint.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index 127506d80..27e60624b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -121,6 +121,12 @@ Bottom level categories: - Fixed use of a texture view without `TextureUsage::TEXTURE_BINDING` as a read-only depth attachment. By @andyleiserson in [#9346](https://github.com/gfx-rs/wgpu/pull/9346). - Fixed a `debug_assert` during stride validation for indirect multi draw. By @kristoff3r in [#9332](https://github.com/gfx-rs/wgpu/pull/9332) +### Dependency Updates + +#### WebGPU + +- Upgrade vendored `wasm-bindgen` WebGPU bindings to 0.2.115 and adapt the `webgpu` backend to the new API. `ExternalImageSource::VideoFrame` no longer requires `--cfg=web_sys_unstable_apis`, as `web_sys::VideoFrame` is now stable. The GLES backend still requires the cfg to upload `VideoFrame`s, since `glow` still needs to adapt. By @evilpie in [#9090](https://github.com/gfx-rs/wgpu/pull/9090). + ## v29.0.1 (2026-03-26) This release includes `wgpu-core`, `wgpu-hal` and `wgpu-types` version `29.0.1`. All other crates remain at their previous versions. diff --git a/wgpu-hal/Cargo.toml b/wgpu-hal/Cargo.toml index d7700ed04..73936b64d 100644 --- a/wgpu-hal/Cargo.toml +++ b/wgpu-hal/Cargo.toml @@ -316,6 +316,7 @@ web-sys = { workspace = true, optional = true, features = [ "HtmlCanvasElement", "WebGl2RenderingContext", "OffscreenCanvas", + "VideoFrame", ] } js-sys = { workspace = true, optional = true, default-features = true } diff --git a/wgpu-hal/src/gles/queue.rs b/wgpu-hal/src/gles/queue.rs index a1f09a5c0..a67af6004 100644 --- a/wgpu-hal/src/gles/queue.rs +++ b/wgpu-hal/src/gles/queue.rs @@ -536,6 +536,10 @@ impl super::Queue { v, ); }, + #[cfg(not(web_sys_unstable_apis))] + wgt::ExternalImageSource::VideoFrame(_) => { + unimplemented!("web_sys_unstable_apis is needed for glow") + } #[cfg(web_sys_unstable_apis)] wgt::ExternalImageSource::VideoFrame(ref v) => unsafe { gl.tex_sub_image_3d_with_video_frame( @@ -627,6 +631,10 @@ impl super::Queue { v, ) }, + #[cfg(not(web_sys_unstable_apis))] + wgt::ExternalImageSource::VideoFrame(_) => { + unimplemented!("web_sys_unstable_apis is needed for glow") + } #[cfg(web_sys_unstable_apis)] wgt::ExternalImageSource::VideoFrame(ref v) => unsafe { gl.tex_sub_image_2d_with_video_frame_and_width_and_height( diff --git a/wgpu-types/src/texture/external_image.rs b/wgpu-types/src/texture/external_image.rs index f75a13487..bc786d325 100644 --- a/wgpu-types/src/texture/external_image.rs +++ b/wgpu-types/src/texture/external_image.rs @@ -46,7 +46,6 @@ pub enum ExternalImageSource { /// Requires [`DownlevelFlags::UNRESTRICTED_EXTERNAL_TEXTURE_COPIES`] OffscreenCanvas(web_sys::OffscreenCanvas), /// Copy from a video frame. - #[cfg(web_sys_unstable_apis)] VideoFrame(web_sys::VideoFrame), } @@ -61,7 +60,6 @@ impl ExternalImageSource { ExternalImageSource::ImageData(i) => i.width(), ExternalImageSource::HTMLCanvasElement(c) => c.width(), ExternalImageSource::OffscreenCanvas(c) => c.width(), - #[cfg(web_sys_unstable_apis)] ExternalImageSource::VideoFrame(v) => v.display_width(), } } @@ -75,7 +73,6 @@ impl ExternalImageSource { ExternalImageSource::ImageData(i) => i.height(), ExternalImageSource::HTMLCanvasElement(c) => c.height(), ExternalImageSource::OffscreenCanvas(c) => c.height(), - #[cfg(web_sys_unstable_apis)] ExternalImageSource::VideoFrame(v) => v.display_height(), } } @@ -93,7 +90,6 @@ impl core::ops::Deref for ExternalImageSource { Self::ImageData(i) => i, Self::HTMLCanvasElement(c) => c, Self::OffscreenCanvas(c) => c, - #[cfg(web_sys_unstable_apis)] Self::VideoFrame(v) => v, } } diff --git a/wgpu/src/backend/webgpu.rs b/wgpu/src/backend/webgpu.rs index b95c1a8e2..2bb0913eb 100644 --- a/wgpu/src/backend/webgpu.rs +++ b/wgpu/src/backend/webgpu.rs @@ -622,7 +622,7 @@ fn map_buffer_copy_view( if let Some(rows_per_image) = view.layout.rows_per_image { mapped.set_rows_per_image(rows_per_image); } - mapped.set_offset(view.layout.offset as f64); + mapped.set_offset_f64(view.layout.offset as f64); mapped } @@ -632,7 +632,7 @@ fn map_texture_copy_view( let texture = view.texture.inner.as_webgpu(); let mapped = webgpu_sys::GpuTexelCopyTextureInfo::new(&texture.inner); mapped.set_mip_level(view.mip_level); - mapped.set_origin(&map_origin_3d(view.origin)); + mapped.set_origin_gpu_origin_3d_dict(&map_origin_3d(view.origin)); mapped.set_aspect(map_texture_aspect(view.aspect)); mapped } @@ -643,7 +643,7 @@ fn map_tagged_texture_copy_view( let texture = view.texture.inner.as_webgpu(); let mapped = webgpu_sys::GpuCopyExternalImageDestInfo::new(&texture.inner); mapped.set_mip_level(view.mip_level); - mapped.set_origin(&map_origin_3d(view.origin)); + mapped.set_origin_gpu_origin_3d_dict(&map_origin_3d(view.origin)); mapped.set_aspect(map_texture_aspect(view.aspect)); // mapped.set_color_space(map_color_space(view.color_space)); mapped.set_premultiplied_alpha(view.premultiplied_alpha); @@ -653,8 +653,30 @@ fn map_tagged_texture_copy_view( fn map_external_texture_copy_view( view: &crate::CopyExternalImageSourceInfo, ) -> webgpu_sys::GpuCopyExternalImageSourceInfo { - let mapped = webgpu_sys::GpuCopyExternalImageSourceInfo::new(&view.source); - mapped.set_origin(&map_origin_2d(view.origin)); + let mapped = match &view.source { + crate::ExternalImageSource::ImageBitmap(bitmap) => { + webgpu_sys::GpuCopyExternalImageSourceInfo::new(bitmap) + } + crate::ExternalImageSource::HTMLImageElement(image) => { + webgpu_sys::GpuCopyExternalImageSourceInfo::new_with_html_image_element(image) + } + crate::ExternalImageSource::HTMLVideoElement(video) => { + webgpu_sys::GpuCopyExternalImageSourceInfo::new_with_html_video_element(video) + } + crate::ExternalImageSource::ImageData(image_data) => { + webgpu_sys::GpuCopyExternalImageSourceInfo::new_with_image_data(image_data) + } + crate::ExternalImageSource::HTMLCanvasElement(canvas) => { + webgpu_sys::GpuCopyExternalImageSourceInfo::new_with_html_canvas_element(canvas) + } + crate::ExternalImageSource::OffscreenCanvas(offscreen_canvas) => { + webgpu_sys::GpuCopyExternalImageSourceInfo::new_with_offscreen_canvas(offscreen_canvas) + } + crate::ExternalImageSource::VideoFrame(video_frame) => { + webgpu_sys::GpuCopyExternalImageSourceInfo::new_with_video_frame(video_frame) + } + }; + mapped.set_origin_gpu_origin_2d_dict(&map_origin_2d(view.origin)); mapped.set_flip_y(view.flip_y); mapped } @@ -875,8 +897,8 @@ fn map_adapter_info(adapter_info: &webgpu_sys::GpuAdapterInfo) -> wgt::AdapterIn } } -fn map_js_sys_limits(limits: &wgt::Limits) -> js_sys::Object { - let object = js_sys::Object::new(); +fn map_js_sys_limits(limits: &wgt::Limits) -> js_sys::Object { + let object = js_sys::Object::::new_typed(); macro_rules! set_properties { (($from:expr) => ($on:expr) : $(($js_ident:ident, $rs_ident:ident)),* $(,)?) => { @@ -934,23 +956,20 @@ fn map_js_sys_limits(limits: &wgt::Limits) -> js_sys::Object { object } -type JsFutureResult = Result; - fn future_request_adapter( - result: JsFutureResult, + result: Result, wasm_bindgen::JsValue>, requested_backends: Backends, ) -> Result { - let web_adapter: Option = - result.and_then(wasm_bindgen::JsCast::dyn_into).ok(); - web_adapter - .map(|adapter| { - WebAdapter { + result + .map_err(|_| request_adapter_null_error(requested_backends)) + .and_then(|adapter| match adapter.into_option() { + Some(adapter) => Ok(WebAdapter { inner: adapter, ident: crate::cmp::Identifier::create(), } - .into() + .into()), + None => Err(request_adapter_null_error(requested_backends)), }) - .ok_or_else(|| request_adapter_null_error(requested_backends)) } // Translate WebGPU’s null return into our error. @@ -968,11 +987,10 @@ fn request_adapter_null_error(requested_backends: Backends) -> wgt::RequestAdapt } fn future_request_device( - result: JsFutureResult, + result: Result, ) -> Result<(dispatch::DispatchDevice, dispatch::DispatchQueue), crate::RequestDeviceError> { result - .map(|js_value| { - let device = webgpu_sys::GpuDevice::from(js_value); + .map(|device| { let queue = device.queue(); ( @@ -995,18 +1013,14 @@ fn future_request_device( }) } -fn future_pop_error_scope(result: JsFutureResult) -> Option { - match result { - Ok(js_value) if js_value.is_object() => { - let js_error = wasm_bindgen::JsCast::dyn_into(js_value).unwrap(); - Some(crate::Error::from_js(js_error)) - } - _ => None, - } +fn future_pop_error_scope( + result: Result, wasm_bindgen::JsValue>, +) -> Option { + Some(crate::Error::from_js(result.ok()?.into_option()?.into())) } fn future_compilation_info( - result: JsFutureResult, + result: Result, base_compilation_info: &WebShaderCompilationInfo, ) -> crate::CompilationInfo { let base_messages = match base_compilation_info { @@ -1016,34 +1030,33 @@ fn future_compilation_info( _ => [].iter().cloned(), }; - let messages = match result { - Ok(js_value) => { - let info = webgpu_sys::GpuCompilationInfo::from(js_value); - base_messages + let messages = + match result { + Ok(info) => base_messages .chain(info.messages().into_iter().map(|message| { - crate::CompilationMessage::from_js( - webgpu_sys::GpuCompilationMessage::from(message), - base_compilation_info, - ) + crate::CompilationMessage::from_js(message, base_compilation_info) })) - .collect() - } - Err(_v) => base_messages - .chain(core::iter::once(crate::CompilationMessage { - message: "Getting compilation info failed".to_string(), - message_type: crate::CompilationMessageType::Error, - location: None, - })) - .collect(), - }; + .collect(), + Err(_v) => base_messages + .chain(core::iter::once(crate::CompilationMessage { + message: "Getting compilation info failed".to_string(), + message_type: crate::CompilationMessageType::Error, + location: None, + })) + .collect(), + }; crate::CompilationInfo { messages } } /// Calls `callback(success_value)` when the promise completes successfully, calls `callback(failure_value)` /// when the promise completes unsuccessfully. -fn register_then_closures(promise: &Promise, callback: F, success_value: T, failure_value: T) -where +fn register_then_closures( + promise: &Promise, + callback: F, + success_value: T, + failure_value: T, +) where F: FnOnce(T) + 'static, T: 'static, { @@ -1060,12 +1073,14 @@ where let rc_callback_clone1 = rc_callback.clone(); let rc_callback_clone2 = rc_callback.clone(); + let closure_success = wasm_bindgen::closure::Closure::once(move |_| { let (success_closure, rejection_closure, callback) = rc_callback_clone1.borrow_mut().take().unwrap(); callback(success_value); // drop the closures, including ourselves, which will free any captured memory. drop((success_closure, rejection_closure)); + Ok(()) }); let closure_rejected = wasm_bindgen::closure::Closure::once(move |_| { let (success_closure, rejection_closure, callback) = @@ -1073,11 +1088,12 @@ where callback(failure_value); // drop the closures, including ourselves, which will free any captured memory. drop((success_closure, rejection_closure)); + Ok(()) }); // Calling then before setting the value in the Rc seems like a race, but it isn't // because the promise callback will run on this thread, so there is no race. - let _ = promise.then2(&closure_success, &closure_rejected); + let _ = promise.then_with_reject(&closure_success, &closure_rejected); *rc_callback.borrow_mut() = Some((closure_success, closure_rejected, callback)); } @@ -1708,12 +1724,16 @@ impl dispatch::AdapterInterface for WebAdapter { .copied() .flat_map(|(flag, value)| { if desc.required_features.contains(flag) { - Some(JsValue::from(value)) + Some( + wasm_bindgen::JsValue::from(value) + .dyn_into::() + .unwrap(), + ) } else { None } }) - .collect::(); + .collect::>(); mapped_desc.set_required_features(&required_features); if let Some(label) = desc.label { @@ -1985,7 +2005,7 @@ impl dispatch::DeviceInterface for WebDevice { let buffer = webgpu_sys::GpuBufferBindingLayout::new(); buffer.set_has_dynamic_offset(has_dynamic_offset); if let Some(size) = min_binding_size { - buffer.set_min_binding_size(size.get() as f64); + buffer.set_min_binding_size_f64(size.get() as f64); } buffer.set_type(match ty { wgt::BufferBindingType::Uniform => { @@ -2064,7 +2084,7 @@ impl dispatch::DeviceInterface for WebDevice { mapped_entry }) - .collect::(); + .collect::>(); let mapped_desc = webgpu_sys::GpuBindGroupLayoutDescriptor::new(&mapped_bindings); if let Some(label) = desc.label { @@ -2086,53 +2106,55 @@ impl dispatch::DeviceInterface for WebDevice { let mapped_entries = desc .entries .iter() - .map(|binding| { - let mapped_resource = match binding.resource { - crate::BindingResource::Buffer(crate::BufferBinding { - buffer, - offset, - size, - }) => { - let buffer = buffer.inner.as_webgpu(); - let mapped_buffer_binding = - webgpu_sys::GpuBufferBinding::new(&buffer.inner); - mapped_buffer_binding.set_offset(offset as f64); - if let Some(s) = size { - mapped_buffer_binding.set_size(s.get() as f64); - } - JsValue::from(mapped_buffer_binding) + .map(|binding| match binding.resource { + crate::BindingResource::Buffer(crate::BufferBinding { + buffer, + offset, + size, + }) => { + let buffer = buffer.inner.as_webgpu(); + let mapped_buffer_binding = webgpu_sys::GpuBufferBinding::new(&buffer.inner); + mapped_buffer_binding.set_offset_f64(offset as f64); + if let Some(s) = size { + mapped_buffer_binding.set_size_f64(s.get() as f64); } - crate::BindingResource::BufferArray(..) => { - panic!("Web backend does not support arrays of buffers") - } - crate::BindingResource::Sampler(sampler) => { - let sampler = &sampler.inner.as_webgpu().inner; - JsValue::from(sampler) - } - crate::BindingResource::SamplerArray(..) => { - panic!("Web backend does not support arrays of samplers") - } - crate::BindingResource::TextureView(texture_view) => { - let texture_view = &texture_view.inner.as_webgpu().inner; - JsValue::from(texture_view) - } - crate::BindingResource::TextureViewArray(..) => { - panic!("Web backend does not support BINDING_INDEXING extension") - } - crate::BindingResource::AccelerationStructure(_) => { - unimplemented!("Raytracing not implemented for web") - } - crate::BindingResource::AccelerationStructureArray(_) => { - unimplemented!("Raytracing not implemented for web") - } - crate::BindingResource::ExternalTexture(_) => { - unimplemented!("ExternalTexture not implemented for web") - } - }; - webgpu_sys::GpuBindGroupEntry::new(binding.binding, &mapped_resource) + webgpu_sys::GpuBindGroupEntry::new_with_gpu_buffer_binding( + binding.binding, + &mapped_buffer_binding, + ) + } + crate::BindingResource::BufferArray(..) => { + panic!("Web backend does not support arrays of buffers") + } + crate::BindingResource::Sampler(sampler) => { + let sampler = &sampler.inner.as_webgpu().inner; + webgpu_sys::GpuBindGroupEntry::new(binding.binding, sampler) + } + crate::BindingResource::SamplerArray(..) => { + panic!("Web backend does not support arrays of samplers") + } + crate::BindingResource::TextureView(texture_view) => { + let texture_view = &texture_view.inner.as_webgpu().inner; + webgpu_sys::GpuBindGroupEntry::new_with_gpu_texture_view( + binding.binding, + texture_view, + ) + } + crate::BindingResource::TextureViewArray(..) => { + panic!("Web backend does not support BINDING_INDEXING extension") + } + crate::BindingResource::AccelerationStructure(_) => { + unimplemented!("Raytracing not implemented for web") + } + crate::BindingResource::AccelerationStructureArray(_) => { + unimplemented!("Raytracing not implemented for web") + } + crate::BindingResource::ExternalTexture(_) => { + unimplemented!("ExternalTexture not implemented for web") + } }) - .collect::(); + .collect::>(); let bgl = &desc.layout.inner.as_webgpu().inner; let mapped_desc = webgpu_sys::GpuBindGroupDescriptor::new(&mapped_entries, bgl); @@ -2152,15 +2174,14 @@ impl dispatch::DeviceInterface for WebDevice { &self, desc: &crate::PipelineLayoutDescriptor<'_>, ) -> dispatch::DispatchPipelineLayout { - let null = wasm_bindgen::JsValue::NULL; let temp_layouts = desc .bind_group_layouts .iter() .map(|bgl| match bgl { - Some(bgl) => bgl.inner.as_webgpu().inner.as_ref(), - None => &null, + Some(bgl) => js_sys::JsOption::wrap(bgl.inner.as_webgpu().inner.clone()), + None => js_sys::JsOption::new(), }) - .collect::(); + .collect::>>(); let mapped_desc = webgpu_sys::GpuPipelineLayoutDescriptor::new(&temp_layouts); if let Some(label) = desc.label { mapped_desc.set_label(label); @@ -2198,36 +2219,35 @@ impl dispatch::DeviceInterface for WebDevice { .attributes .iter() .map(|attr| { - webgpu_sys::GpuVertexAttribute::new( + webgpu_sys::GpuVertexAttribute::new_with_f64( map_vertex_format(attr.format), attr.offset as f64, attr.shader_location, ) }) - .collect::(); + .collect::>(); - let mapped_vbuf = webgpu_sys::GpuVertexBufferLayout::new( + let mapped_vbuf = webgpu_sys::GpuVertexBufferLayout::new_with_f64( vbuf.array_stride as f64, &mapped_attributes, ); mapped_vbuf.set_step_mode(map_vertex_step_mode(vbuf.step_mode)); - mapped_vbuf + js_sys::JsOption::wrap(mapped_vbuf) }) - .collect::(); + .collect::>>(); mapped_vertex_state.set_buffers(&buffers); - let auto_layout = wasm_bindgen::JsValue::from(webgpu_sys::GpuAutoLayoutMode::Auto); - let mapped_desc = webgpu_sys::GpuRenderPipelineDescriptor::new( - &match desc.layout { - Some(layout) => { - let layout = &layout.inner.as_webgpu().inner; - JsValue::from(layout) - } - None => auto_layout, - }, - &mapped_vertex_state, - ); + let mapped_desc = match desc.layout { + Some(layout) => webgpu_sys::GpuRenderPipelineDescriptor::new( + &layout.inner.as_webgpu().inner, + &mapped_vertex_state, + ), + None => webgpu_sys::GpuRenderPipelineDescriptor::new_with_gpu_auto_layout_mode( + webgpu_sys::GpuAutoLayoutMode::Auto, + &mapped_vertex_state, + ), + }; if let Some(label) = desc.label { mapped_desc.set_label(label); @@ -2253,11 +2273,11 @@ impl dispatch::DeviceInterface for WebDevice { mapped_color_state.set_blend(&mapped_blend_state); } mapped_color_state.set_write_mask(target.write_mask.bits()); - wasm_bindgen::JsValue::from(mapped_color_state) + js_sys::JsOption::wrap(mapped_color_state) } - None => wasm_bindgen::JsValue::null(), + None => js_sys::JsOption::new(), }) - .collect::(); + .collect::>>(); let module = frag.module.inner.as_webgpu(); let mapped_fragment_desc = webgpu_sys::GpuFragmentState::new(&module.module, &targets); insert_constants_map(&mapped_fragment_desc, frag.compilation_options.constants); @@ -2303,17 +2323,17 @@ impl dispatch::DeviceInterface for WebDevice { if let Some(ep) = desc.entry_point { mapped_compute_stage.set_entry_point(ep); } - let auto_layout = wasm_bindgen::JsValue::from(webgpu_sys::GpuAutoLayoutMode::Auto); - let mapped_desc = webgpu_sys::GpuComputePipelineDescriptor::new( - &match desc.layout { - Some(layout) => { - let layout = &layout.inner.as_webgpu().inner; - JsValue::from(layout) - } - None => auto_layout, - }, - &mapped_compute_stage, - ); + let mapped_desc = match desc.layout { + Some(layout) => webgpu_sys::GpuComputePipelineDescriptor::new( + &layout.inner.as_webgpu().inner, + &mapped_compute_stage, + ), + None => webgpu_sys::GpuComputePipelineDescriptor::new_with_gpu_auto_layout_mode( + webgpu_sys::GpuAutoLayoutMode::Auto, + &mapped_compute_stage, + ), + }; + if let Some(label) = desc.label { mapped_desc.set_label(label); } @@ -2338,7 +2358,8 @@ impl dispatch::DeviceInterface for WebDevice { } fn create_buffer(&self, desc: &crate::BufferDescriptor<'_>) -> dispatch::DispatchBuffer { - let mapped_desc = webgpu_sys::GpuBufferDescriptor::new(desc.size as f64, desc.usage.bits()); + let mapped_desc = + webgpu_sys::GpuBufferDescriptor::new_with_f64(desc.size as f64, desc.usage.bits()); mapped_desc.set_mapped_at_creation(desc.mapped_at_creation); if let Some(label) = desc.label { mapped_desc.set_label(label); @@ -2347,7 +2368,7 @@ impl dispatch::DeviceInterface for WebDevice { } fn create_texture(&self, desc: &crate::TextureDescriptor<'_>) -> dispatch::DispatchTexture { - let mapped_desc = webgpu_sys::GpuTextureDescriptor::new( + let mapped_desc = webgpu_sys::GpuTextureDescriptor::new_with_gpu_extent_3d_dict( map_texture_format(desc.format), &map_extent_3d(desc.size), (desc.usage - crate::TextureUsages::TRANSIENT).bits(), @@ -2361,8 +2382,12 @@ impl dispatch::DeviceInterface for WebDevice { let mapped_view_formats = desc .view_formats .iter() - .map(|format| JsValue::from(map_texture_format(*format))) - .collect::(); + .map(|format| { + wasm_bindgen::JsValue::from(map_texture_format(*format)) + .dyn_into::() + .unwrap() + }) + .collect::>(); mapped_desc.set_view_formats(&mapped_view_formats); let texture = self.inner.create_texture(&mapped_desc).unwrap(); @@ -2468,10 +2493,14 @@ impl dispatch::DeviceInterface for WebDevice { .color_formats .iter() .map(|cf| match cf { - Some(cf) => wasm_bindgen::JsValue::from(map_texture_format(*cf)), - None => wasm_bindgen::JsValue::null(), + Some(cf) => js_sys::JsOption::wrap( + wasm_bindgen::JsValue::from(map_texture_format(*cf)) + .dyn_into::() + .unwrap(), + ), + None => js_sys::JsOption::new(), }) - .collect::(); + .collect::>>(); let mapped_desc = webgpu_sys::GpuRenderBundleEncoderDescriptor::new(&mapped_color_formats); if let Some(label) = desc.label { mapped_desc.set_label(label); @@ -2496,8 +2525,7 @@ impl dispatch::DeviceInterface for WebDevice { } fn set_device_lost_callback(&self, device_lost_callback: dispatch::BoxDeviceLostCallback) { - let closure = Closure::once(move |info: JsValue| { - let info = info.dyn_into::().unwrap(); + let closure = Closure::once(move |info: webgpu_sys::GpuDeviceLostInfo| { device_lost_callback( match info.reason() { webgpu_sys::GpuDeviceLostReason::Destroyed => { @@ -2685,7 +2713,7 @@ impl dispatch::QueueInterface for WebQueue { if let Some(rows_per_image) = data_layout.rows_per_image { mapped_data_layout.set_rows_per_image(rows_per_image); } - mapped_data_layout.set_offset(data_layout.offset as f64); + mapped_data_layout.set_offset_f64(data_layout.offset as f64); self.inner .write_texture_with_u8_slice_and_gpu_extent_3d_dict( @@ -2720,8 +2748,8 @@ impl dispatch::QueueInterface for WebQueue { let array = temp_command_buffers .iter() - .map(|buffer| &buffer.as_webgpu().inner) - .collect::(); + .map(|buffer| buffer.as_webgpu().inner.clone()) + .collect::>(); self.inner.submit(&array); @@ -3096,43 +3124,44 @@ impl dispatch::CommandEncoderInterface for WebCommandEncoder { .iter() .map(|attachment| match attachment { Some(ca) => { - let mut clear_value: Option = None; - let load_value = match ca.ops.load { + let (load_op, clear_value) = match ca.ops.load { crate::LoadOp::Clear(color) => { - clear_value = Some(wasm_bindgen::JsValue::from(map_color(color))); - webgpu_sys::GpuLoadOp::Clear + (webgpu_sys::GpuLoadOp::Clear, Some(map_color(color))) } crate::LoadOp::DontCare(_token) => { // WebGPU can't safely have a ClearOp::DontCare, so we clear to black // which is ideal for most GPUs. - clear_value = - Some(wasm_bindgen::JsValue::from(map_color(crate::Color::BLACK))); - webgpu_sys::GpuLoadOp::Clear + ( + webgpu_sys::GpuLoadOp::Clear, + Some(map_color(crate::Color::BLACK)), + ) } - crate::LoadOp::Load => webgpu_sys::GpuLoadOp::Load, + crate::LoadOp::Load => (webgpu_sys::GpuLoadOp::Load, None), }; let view = &ca.view.inner.as_webgpu().inner; - let mapped_color_attachment = webgpu_sys::GpuRenderPassColorAttachment::new( - load_value, - map_store_op(ca.ops.store), - view, - ); + let mapped_color_attachment = + webgpu_sys::GpuRenderPassColorAttachment::new_with_gpu_texture_view( + load_op, + map_store_op(ca.ops.store), + view, + ); if let Some(cv) = clear_value { - mapped_color_attachment.set_clear_value(&cv); + mapped_color_attachment.set_clear_value_gpu_color_dict(&cv); } if let Some(rt) = ca.resolve_target { let resolve_target_view = &rt.inner.as_webgpu().inner; - mapped_color_attachment.set_resolve_target(resolve_target_view); + mapped_color_attachment + .set_resolve_target_gpu_texture_view(resolve_target_view); } mapped_color_attachment.set_store_op(map_store_op(ca.ops.store)); - wasm_bindgen::JsValue::from(mapped_color_attachment) + js_sys::JsOption::wrap(mapped_color_attachment) } - None => wasm_bindgen::JsValue::null(), + None => js_sys::JsOption::new(), }) - .collect::(); + .collect::>>(); let mapped_desc = webgpu_sys::GpuRenderPassDescriptor::new(&mapped_color_attachments); @@ -3143,7 +3172,9 @@ impl dispatch::CommandEncoderInterface for WebCommandEncoder { if let Some(dsa) = &desc.depth_stencil_attachment { let depth_stencil_attachment = &dsa.view.inner.as_webgpu().inner; let mapped_depth_stencil_attachment = - webgpu_sys::GpuRenderPassDepthStencilAttachment::new(depth_stencil_attachment); + webgpu_sys::GpuRenderPassDepthStencilAttachment::new_with_gpu_texture_view( + depth_stencil_attachment, + ); if let Some(ref ops) = dsa.depth_ops { let load_op = match ops.load { crate::LoadOp::Clear(v) => { @@ -3699,8 +3730,8 @@ impl dispatch::RenderPassInterface for WebRenderPassEncoder { render_bundles: &mut dyn Iterator, ) { let mapped = render_bundles - .map(|bundle| &bundle.as_webgpu().inner) - .collect::(); + .map(|bundle| bundle.as_webgpu().inner.clone()) + .collect::>(); self.inner.execute_bundles(&mapped); } } @@ -3934,8 +3965,12 @@ impl dispatch::SurfaceInterface for WebSurface { let mapped_view_formats = config .view_formats .iter() - .map(|format| JsValue::from(map_texture_format(*format))) - .collect::(); + .map(|format| { + wasm_bindgen::JsValue::from(map_texture_format(*format)) + .dyn_into::() + .unwrap() + }) + .collect::>(); mapped.set_view_formats(&mapped_view_formats); self.context.configure(&mapped).unwrap(); } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_Gpu.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_Gpu.rs index 3a70b0c2f..2ce5a28d6 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_Gpu.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_Gpu.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -65,23 +65,23 @@ extern "C" { #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPU/requestAdapter)"] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Gpu`*"] + #[doc = "*This API requires the following crate features to be activated: `Gpu`, `GpuAdapter`*"] #[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 request_adapter(this: &Gpu) -> ::js_sys::Promise; + pub fn request_adapter(this: &Gpu) -> ::js_sys::Promise<::js_sys::JsOption>; # [wasm_bindgen (method , structural , js_class = "GPU" , js_name = requestAdapter)] #[doc = "The `requestAdapter()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPU/requestAdapter)"] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `Gpu`, `GpuRequestAdapterOptions`*"] + #[doc = "*This API requires the following crate features to be activated: `Gpu`, `GpuAdapter`, `GpuRequestAdapterOptions`*"] #[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 request_adapter_with_options( this: &Gpu, options: &GpuRequestAdapterOptions, - ) -> ::js_sys::Promise; + ) -> ::js_sys::Promise<::js_sys::JsOption>; } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuAdapter.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuAdapter.rs index c1bc6d461..594a2652e 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuAdapter.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuAdapter.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -71,39 +71,28 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn info(this: &GpuAdapter) -> GpuAdapterInfo; - # [wasm_bindgen (structural , method , getter , js_class = "GPUAdapter" , js_name = isFallbackAdapter)] - #[doc = "Getter for the `isFallbackAdapter` field of this object."] + # [wasm_bindgen (method , structural , js_class = "GPUAdapter" , js_name = requestDevice)] + #[doc = "The `requestDevice()` method."] #[doc = ""] - #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUAdapter/isFallbackAdapter)"] + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUAdapter/requestDevice)"] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuAdapter`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuAdapter`, `GpuDevice`*"] #[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 is_fallback_adapter(this: &GpuAdapter) -> bool; + pub fn request_device(this: &GpuAdapter) -> ::js_sys::Promise; # [wasm_bindgen (method , structural , js_class = "GPUAdapter" , js_name = requestDevice)] #[doc = "The `requestDevice()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUAdapter/requestDevice)"] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuAdapter`*"] - #[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 request_device(this: &GpuAdapter) -> ::js_sys::Promise; - - # [wasm_bindgen (method , structural , js_class = "GPUAdapter" , js_name = requestDevice)] - #[doc = "The `requestDevice()` method."] - #[doc = ""] - #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUAdapter/requestDevice)"] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuAdapter`, `GpuDeviceDescriptor`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuAdapter`, `GpuDevice`, `GpuDeviceDescriptor`*"] #[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 request_device_with_descriptor( this: &GpuAdapter, descriptor: &GpuDeviceDescriptor, - ) -> ::js_sys::Promise; + ) -> ::js_sys::Promise; } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuAdapterInfo.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuAdapterInfo.rs index c99000fda..26d89ffac 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuAdapterInfo.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuAdapterInfo.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -81,4 +81,37 @@ extern "C" { #[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 description(this: &GpuAdapterInfo) -> ::alloc::string::String; + + # [wasm_bindgen (structural , method , getter , js_class = "GPUAdapterInfo" , js_name = subgroupMinSize)] + #[doc = "Getter for the `subgroupMinSize` field of this object."] + #[doc = ""] + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUAdapterInfo/subgroupMinSize)"] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuAdapterInfo`*"] + #[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 subgroup_min_size(this: &GpuAdapterInfo) -> u32; + + # [wasm_bindgen (structural , method , getter , js_class = "GPUAdapterInfo" , js_name = subgroupMaxSize)] + #[doc = "Getter for the `subgroupMaxSize` field of this object."] + #[doc = ""] + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUAdapterInfo/subgroupMaxSize)"] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuAdapterInfo`*"] + #[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 subgroup_max_size(this: &GpuAdapterInfo) -> u32; + + # [wasm_bindgen (structural , method , getter , js_class = "GPUAdapterInfo" , js_name = isFallbackAdapter)] + #[doc = "Getter for the `isFallbackAdapter` field of this object."] + #[doc = ""] + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUAdapterInfo/isFallbackAdapter)"] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuAdapterInfo`*"] + #[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 is_fallback_adapter(this: &GpuAdapterInfo) -> bool; } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuAddressMode.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuAddressMode.rs index 11e70cff2..30daa4c73 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuAddressMode.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuAddressMode.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuAutoLayoutMode.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuAutoLayoutMode.rs index 62d94465a..388f9db12 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuAutoLayoutMode.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuAutoLayoutMode.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroup.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroup.rs index c056487ad..a0444cfd9 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroup.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroup.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroupDescriptor.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroupDescriptor.rs index 3c58c1c20..7b45a9224 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroupDescriptor.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroupDescriptor.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -56,21 +56,21 @@ extern "C" { #[doc = "Get the `entries` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`, `GpuBindGroupEntry`*"] #[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)*"] #[wasm_bindgen(method, getter = "entries")] - pub fn get_entries(this: &GpuBindGroupDescriptor) -> ::js_sys::Array; + pub fn get_entries(this: &GpuBindGroupDescriptor) -> ::js_sys::Array; #[doc = "Change the `entries` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`, `GpuBindGroupEntry`*"] #[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)*"] #[wasm_bindgen(method, setter = "entries")] - pub fn set_entries(this: &GpuBindGroupDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_entries(this: &GpuBindGroupDescriptor, val: &[GpuBindGroupEntry]); #[doc = "Get the `layout` field of this object."] #[doc = ""] @@ -94,11 +94,11 @@ extern "C" { impl GpuBindGroupDescriptor { #[doc = "Construct a new `GpuBindGroupDescriptor`."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`, `GpuBindGroupLayout`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`, `GpuBindGroupEntry`, `GpuBindGroupLayout`*"] #[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 new(entries: &::wasm_bindgen::JsValue, layout: &GpuBindGroupLayout) -> Self { + pub fn new(entries: &[GpuBindGroupEntry], layout: &GpuBindGroupLayout) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret.set_entries(entries); @@ -113,7 +113,7 @@ impl GpuBindGroupDescriptor { } #[deprecated = "Use `set_entries()` instead."] - pub fn entries(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + pub fn entries(&mut self, val: &[GpuBindGroupEntry]) -> &mut Self { self.set_entries(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroupEntry.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroupEntry.rs index 266fd1cbf..bf931765c 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroupEntry.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroupEntry.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -56,7 +56,7 @@ extern "C" { #[doc = "Get the `resource` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`, `GpuSampler`*"] #[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)*"] @@ -65,22 +65,67 @@ extern "C" { #[doc = "Change the `resource` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`, `GpuSampler`*"] #[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)*"] #[wasm_bindgen(method, setter = "resource")] - pub fn set_resource(this: &GpuBindGroupEntry, val: &::wasm_bindgen::JsValue); + pub fn set_resource(this: &GpuBindGroupEntry, val: &GpuSampler); + + #[doc = "Change the `resource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`, `GpuTexture`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "resource")] + pub fn set_resource_gpu_texture(this: &GpuBindGroupEntry, val: &GpuTexture); + + #[doc = "Change the `resource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`, `GpuTextureView`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "resource")] + pub fn set_resource_gpu_texture_view(this: &GpuBindGroupEntry, val: &GpuTextureView); + + #[doc = "Change the `resource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`, `GpuBuffer`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "resource")] + pub fn set_resource_gpu_buffer(this: &GpuBindGroupEntry, val: &GpuBuffer); + + #[doc = "Change the `resource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`, `GpuBufferBinding`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "resource")] + pub fn set_resource_gpu_buffer_binding(this: &GpuBindGroupEntry, val: &GpuBufferBinding); + + #[doc = "Change the `resource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`, `GpuExternalTexture`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "resource")] + pub fn set_resource_gpu_external_texture(this: &GpuBindGroupEntry, val: &GpuExternalTexture); } impl GpuBindGroupEntry { #[doc = "Construct a new `GpuBindGroupEntry`."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`, `GpuSampler`*"] #[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 new(binding: u32, resource: &::wasm_bindgen::JsValue) -> Self { + pub fn new(binding: u32, resource: &GpuSampler) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret.set_binding(binding); @@ -88,6 +133,76 @@ impl GpuBindGroupEntry { ret } + #[doc = "Construct a new `GpuBindGroupEntry`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`, `GpuTexture`*"] + #[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 new_with_gpu_texture(binding: u32, resource: &GpuTexture) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.set_binding(binding); + ret.set_resource_gpu_texture(resource); + ret + } + + #[doc = "Construct a new `GpuBindGroupEntry`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`, `GpuTextureView`*"] + #[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 new_with_gpu_texture_view(binding: u32, resource: &GpuTextureView) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.set_binding(binding); + ret.set_resource_gpu_texture_view(resource); + ret + } + + #[doc = "Construct a new `GpuBindGroupEntry`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`, `GpuBuffer`*"] + #[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 new_with_gpu_buffer(binding: u32, resource: &GpuBuffer) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.set_binding(binding); + ret.set_resource_gpu_buffer(resource); + ret + } + + #[doc = "Construct a new `GpuBindGroupEntry`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`, `GpuBufferBinding`*"] + #[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 new_with_gpu_buffer_binding(binding: u32, resource: &GpuBufferBinding) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.set_binding(binding); + ret.set_resource_gpu_buffer_binding(resource); + ret + } + + #[doc = "Construct a new `GpuBindGroupEntry`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`, `GpuExternalTexture`*"] + #[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 new_with_gpu_external_texture(binding: u32, resource: &GpuExternalTexture) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.set_binding(binding); + ret.set_resource_gpu_external_texture(resource); + ret + } + #[deprecated = "Use `set_binding()` instead."] pub fn binding(&mut self, val: u32) -> &mut Self { self.set_binding(val); @@ -95,7 +210,7 @@ impl GpuBindGroupEntry { } #[deprecated = "Use `set_resource()` instead."] - pub fn resource(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + pub fn resource(&mut self, val: &GpuSampler) -> &mut Self { self.set_resource(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroupLayout.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroupLayout.rs index 7c500ea0f..26c8f248a 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroupLayout.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroupLayout.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroupLayoutDescriptor.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroupLayoutDescriptor.rs index 5e11b9f8f..69b4b93cf 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroupLayoutDescriptor.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroupLayoutDescriptor.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -56,31 +56,33 @@ extern "C" { #[doc = "Get the `entries` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`, `GpuBindGroupLayoutEntry`*"] #[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)*"] #[wasm_bindgen(method, getter = "entries")] - pub fn get_entries(this: &GpuBindGroupLayoutDescriptor) -> ::js_sys::Array; + pub fn get_entries( + this: &GpuBindGroupLayoutDescriptor, + ) -> ::js_sys::Array; #[doc = "Change the `entries` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`, `GpuBindGroupLayoutEntry`*"] #[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)*"] #[wasm_bindgen(method, setter = "entries")] - pub fn set_entries(this: &GpuBindGroupLayoutDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_entries(this: &GpuBindGroupLayoutDescriptor, val: &[GpuBindGroupLayoutEntry]); } impl GpuBindGroupLayoutDescriptor { #[doc = "Construct a new `GpuBindGroupLayoutDescriptor`."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`, `GpuBindGroupLayoutEntry`*"] #[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 new(entries: &::wasm_bindgen::JsValue) -> Self { + pub fn new(entries: &[GpuBindGroupLayoutEntry]) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret.set_entries(entries); @@ -94,7 +96,7 @@ impl GpuBindGroupLayoutDescriptor { } #[deprecated = "Use `set_entries()` instead."] - pub fn entries(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + pub fn entries(&mut self, val: &[GpuBindGroupLayoutEntry]) -> &mut Self { self.set_entries(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroupLayoutEntry.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroupLayoutEntry.rs index d641712e3..d6bf55020 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroupLayoutEntry.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBindGroupLayoutEntry.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBlendComponent.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBlendComponent.rs index 0f11495e3..a316ec3bf 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBlendComponent.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBlendComponent.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBlendFactor.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBlendFactor.rs index 0b1f7c391..d7dfd224c 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBlendFactor.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBlendFactor.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBlendOperation.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBlendOperation.rs index 13da1a1b7..86f4586fe 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBlendOperation.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBlendOperation.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBlendState.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBlendState.rs index 8c54586f3..c91a73568 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBlendState.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBlendState.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBuffer.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBuffer.rs index 05f60aa54..e384dad3b 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBuffer.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBuffer.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -212,7 +212,7 @@ 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 map_async(this: &GpuBuffer, mode: u32) -> ::js_sys::Promise; + pub fn map_async(this: &GpuBuffer, mode: u32) -> ::js_sys::Promise<::js_sys::Undefined>; # [wasm_bindgen (method , structural , js_class = "GPUBuffer" , js_name = mapAsync)] #[doc = "The `mapAsync()` method."] @@ -223,7 +223,11 @@ 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 map_async_with_u32(this: &GpuBuffer, mode: u32, offset: u32) -> ::js_sys::Promise; + pub fn map_async_with_u32( + this: &GpuBuffer, + mode: u32, + offset: u32, + ) -> ::js_sys::Promise<::js_sys::Undefined>; # [wasm_bindgen (method , structural , js_class = "GPUBuffer" , js_name = mapAsync)] #[doc = "The `mapAsync()` method."] @@ -234,7 +238,11 @@ 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 map_async_with_f64(this: &GpuBuffer, mode: u32, offset: f64) -> ::js_sys::Promise; + pub fn map_async_with_f64( + this: &GpuBuffer, + mode: u32, + offset: f64, + ) -> ::js_sys::Promise<::js_sys::Undefined>; # [wasm_bindgen (method , structural , js_class = "GPUBuffer" , js_name = mapAsync)] #[doc = "The `mapAsync()` method."] @@ -250,7 +258,7 @@ extern "C" { mode: u32, offset: u32, size: u32, - ) -> ::js_sys::Promise; + ) -> ::js_sys::Promise<::js_sys::Undefined>; # [wasm_bindgen (method , structural , js_class = "GPUBuffer" , js_name = mapAsync)] #[doc = "The `mapAsync()` method."] @@ -266,7 +274,7 @@ extern "C" { mode: u32, offset: f64, size: u32, - ) -> ::js_sys::Promise; + ) -> ::js_sys::Promise<::js_sys::Undefined>; # [wasm_bindgen (method , structural , js_class = "GPUBuffer" , js_name = mapAsync)] #[doc = "The `mapAsync()` method."] @@ -282,7 +290,7 @@ extern "C" { mode: u32, offset: u32, size: f64, - ) -> ::js_sys::Promise; + ) -> ::js_sys::Promise<::js_sys::Undefined>; # [wasm_bindgen (method , structural , js_class = "GPUBuffer" , js_name = mapAsync)] #[doc = "The `mapAsync()` method."] @@ -298,7 +306,7 @@ extern "C" { mode: u32, offset: f64, size: f64, - ) -> ::js_sys::Promise; + ) -> ::js_sys::Promise<::js_sys::Undefined>; # [wasm_bindgen (method , structural , js_class = "GPUBuffer" , js_name = unmap)] #[doc = "The `unmap()` method."] diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBufferBinding.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBufferBinding.rs index 5174557c6..c9f35b2d7 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBufferBinding.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBufferBinding.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -70,7 +70,16 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "offset")] - pub fn set_offset(this: &GpuBufferBinding, val: f64); + pub fn set_offset(this: &GpuBufferBinding, val: u32); + + #[doc = "Change the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferBinding`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "offset")] + pub fn set_offset_f64(this: &GpuBufferBinding, val: f64); #[doc = "Get the `size` field of this object."] #[doc = ""] @@ -88,7 +97,16 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "size")] - pub fn set_size(this: &GpuBufferBinding, val: f64); + pub fn set_size(this: &GpuBufferBinding, val: u32); + + #[doc = "Change the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferBinding`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "size")] + pub fn set_size_f64(this: &GpuBufferBinding, val: f64); } impl GpuBufferBinding { @@ -112,13 +130,13 @@ impl GpuBufferBinding { } #[deprecated = "Use `set_offset()` instead."] - pub fn offset(&mut self, val: f64) -> &mut Self { + pub fn offset(&mut self, val: u32) -> &mut Self { self.set_offset(val); self } #[deprecated = "Use `set_size()` instead."] - pub fn size(&mut self, val: f64) -> &mut Self { + pub fn size(&mut self, val: u32) -> &mut Self { self.set_size(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBufferBindingLayout.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBufferBindingLayout.rs index 311d42bc1..916720405 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBufferBindingLayout.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBufferBindingLayout.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -70,7 +70,16 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "minBindingSize")] - pub fn set_min_binding_size(this: &GpuBufferBindingLayout, val: f64); + pub fn set_min_binding_size(this: &GpuBufferBindingLayout, val: u32); + + #[doc = "Change the `minBindingSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "minBindingSize")] + pub fn set_min_binding_size_f64(this: &GpuBufferBindingLayout, val: f64); #[doc = "Get the `type` field of this object."] #[doc = ""] @@ -111,7 +120,7 @@ impl GpuBufferBindingLayout { } #[deprecated = "Use `set_min_binding_size()` instead."] - pub fn min_binding_size(&mut self, val: f64) -> &mut Self { + pub fn min_binding_size(&mut self, val: u32) -> &mut Self { self.set_min_binding_size(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBufferBindingType.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBufferBindingType.rs index 7b1a6478d..0b1b9a05b 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBufferBindingType.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBufferBindingType.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBufferDescriptor.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBufferDescriptor.rs index 0303470cf..d66322218 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBufferDescriptor.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBufferDescriptor.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -88,7 +88,16 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "size")] - pub fn set_size(this: &GpuBufferDescriptor, val: f64); + pub fn set_size(this: &GpuBufferDescriptor, val: u32); + + #[doc = "Change the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferDescriptor`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "size")] + pub fn set_size_f64(this: &GpuBufferDescriptor, val: f64); #[doc = "Get the `usage` field of this object."] #[doc = ""] @@ -116,13 +125,26 @@ impl GpuBufferDescriptor { #[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 new(size: f64, usage: u32) -> Self { + pub fn new(size: u32, usage: u32) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret.set_size(size); ret.set_usage(usage); ret } + #[doc = "Construct a new `GpuBufferDescriptor`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferDescriptor`*"] + #[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 new_with_f64(size: f64, usage: u32) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.set_size_f64(size); + ret.set_usage(usage); + ret + } #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { @@ -137,7 +159,7 @@ impl GpuBufferDescriptor { } #[deprecated = "Use `set_size()` instead."] - pub fn size(&mut self, val: f64) -> &mut Self { + pub fn size(&mut self, val: u32) -> &mut Self { self.set_size(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBufferMapState.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBufferMapState.rs index c44b6ec45..cdfd85b10 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBufferMapState.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBufferMapState.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCanvasAlphaMode.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCanvasAlphaMode.rs index 0ec4ac45f..93d6ba4c0 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCanvasAlphaMode.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCanvasAlphaMode.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCanvasConfiguration.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCanvasConfiguration.rs index 469376aff..1bb67e40c 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCanvasConfiguration.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCanvasConfiguration.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -133,7 +133,9 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, getter = "viewFormats")] - pub fn get_view_formats(this: &GpuCanvasConfiguration) -> Option<::js_sys::Array>; + pub fn get_view_formats( + this: &GpuCanvasConfiguration, + ) -> Option<::js_sys::Array<::js_sys::JsString>>; #[doc = "Change the `viewFormats` field of this object."] #[doc = ""] @@ -142,7 +144,7 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "viewFormats")] - pub fn set_view_formats(this: &GpuCanvasConfiguration, val: &::wasm_bindgen::JsValue); + pub fn set_view_formats(this: &GpuCanvasConfiguration, val: &[::js_sys::JsString]); } impl GpuCanvasConfiguration { @@ -191,7 +193,7 @@ impl GpuCanvasConfiguration { } #[deprecated = "Use `set_view_formats()` instead."] - pub fn view_formats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + pub fn view_formats(&mut self, val: &[::js_sys::JsString]) -> &mut Self { self.set_view_formats(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCanvasContext.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCanvasContext.rs index 5504b3bdf..f829e2b38 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCanvasContext.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCanvasContext.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCanvasToneMapping.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCanvasToneMapping.rs index 8b528f73e..3c4a8c51b 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCanvasToneMapping.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCanvasToneMapping.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCanvasToneMappingMode.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCanvasToneMappingMode.rs index e601a631e..d7241a840 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCanvasToneMappingMode.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCanvasToneMappingMode.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuColorDict.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuColorDict.rs index eb02d9613..07305f4e9 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuColorDict.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuColorDict.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuColorTargetState.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuColorTargetState.rs index 4f92ba301..1700b3b81 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuColorTargetState.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuColorTargetState.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCommandBuffer.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCommandBuffer.rs index 44e47a236..f87d95717 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCommandBuffer.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCommandBuffer.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCommandBufferDescriptor.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCommandBufferDescriptor.rs index c571b4082..7feab075a 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCommandBufferDescriptor.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCommandBufferDescriptor.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCommandEncoder.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCommandEncoder.rs index 2116f8a1a..f4114af0f 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCommandEncoder.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCommandEncoder.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -421,7 +421,7 @@ extern "C" { this: &GpuCommandEncoder, source: &GpuTexelCopyBufferInfo, destination: &GpuTexelCopyTextureInfo, - copy_size: &::wasm_bindgen::JsValue, + copy_size: &[::js_sys::Number], ) -> Result<(), JsValue>; # [wasm_bindgen (catch , method , structural , js_class = "GPUCommandEncoder" , js_name = copyBufferToTexture)] @@ -453,7 +453,7 @@ extern "C" { this: &GpuCommandEncoder, source: &GpuTexelCopyTextureInfo, destination: &GpuTexelCopyBufferInfo, - copy_size: &::wasm_bindgen::JsValue, + copy_size: &[::js_sys::Number], ) -> Result<(), JsValue>; # [wasm_bindgen (catch , method , structural , js_class = "GPUCommandEncoder" , js_name = copyTextureToBuffer)] @@ -485,7 +485,7 @@ extern "C" { this: &GpuCommandEncoder, source: &GpuTexelCopyTextureInfo, destination: &GpuTexelCopyTextureInfo, - copy_size: &::wasm_bindgen::JsValue, + copy_size: &[::js_sys::Number], ) -> Result<(), JsValue>; # [wasm_bindgen (catch , method , structural , js_class = "GPUCommandEncoder" , js_name = copyTextureToTexture)] diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCommandEncoderDescriptor.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCommandEncoderDescriptor.rs index 64d08c43d..6177aa172 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCommandEncoderDescriptor.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCommandEncoderDescriptor.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCompareFunction.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCompareFunction.rs index bd7008fe2..c0f6c5784 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCompareFunction.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCompareFunction.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCompilationInfo.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCompilationInfo.rs index 029797d14..d23ec3f11 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCompilationInfo.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCompilationInfo.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -43,9 +43,9 @@ extern "C" { #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCompilationInfo/messages)"] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuCompilationInfo`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuCompilationInfo`, `GpuCompilationMessage`*"] #[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 messages(this: &GpuCompilationInfo) -> ::js_sys::Array; + pub fn messages(this: &GpuCompilationInfo) -> ::js_sys::Array; } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCompilationMessage.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCompilationMessage.rs index 927af7391..cbe2aa94e 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCompilationMessage.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCompilationMessage.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCompilationMessageType.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCompilationMessageType.rs index 6b98eb784..64aa0d7a7 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCompilationMessageType.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCompilationMessageType.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuComputePassDescriptor.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuComputePassDescriptor.rs index 593a06f44..d01dff8ea 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuComputePassDescriptor.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuComputePassDescriptor.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuComputePassEncoder.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuComputePassEncoder.rs index 1e57894e2..39c7c67c7 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuComputePassEncoder.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuComputePassEncoder.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -182,7 +182,7 @@ extern "C" { this: &GpuComputePassEncoder, index: u32, bind_group: Option<&GpuBindGroup>, - dynamic_offsets: &::wasm_bindgen::JsValue, + dynamic_offsets: &[::js_sys::Number], ); # [wasm_bindgen (catch , method , structural , js_class = "GPUComputePassEncoder" , js_name = setBindGroup)] diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuComputePassTimestampWrites.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuComputePassTimestampWrites.rs index 7d91fd2ab..e1b412df3 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuComputePassTimestampWrites.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuComputePassTimestampWrites.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuComputePipeline.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuComputePipeline.rs index c022652a5..73d00341c 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuComputePipeline.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuComputePipeline.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuComputePipelineDescriptor.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuComputePipelineDescriptor.rs index 2ca6458d1..3ece28e27 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuComputePipelineDescriptor.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuComputePipelineDescriptor.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -56,7 +56,7 @@ extern "C" { #[doc = "Get the `layout` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`, `GpuPipelineLayout`*"] #[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)*"] @@ -65,12 +65,24 @@ extern "C" { #[doc = "Change the `layout` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`, `GpuPipelineLayout`*"] #[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)*"] #[wasm_bindgen(method, setter = "layout")] - pub fn set_layout(this: &GpuComputePipelineDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_layout(this: &GpuComputePipelineDescriptor, val: &GpuPipelineLayout); + + #[doc = "Change the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuAutoLayoutMode`, `GpuComputePipelineDescriptor`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "layout")] + pub fn set_layout_gpu_auto_layout_mode( + this: &GpuComputePipelineDescriptor, + val: GpuAutoLayoutMode, + ); #[doc = "Get the `compute` field of this object."] #[doc = ""] @@ -94,11 +106,11 @@ extern "C" { impl GpuComputePipelineDescriptor { #[doc = "Construct a new `GpuComputePipelineDescriptor`."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`, `GpuProgrammableStage`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`, `GpuPipelineLayout`, `GpuProgrammableStage`*"] #[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 new(layout: &::wasm_bindgen::JsValue, compute: &GpuProgrammableStage) -> Self { + pub fn new(layout: &GpuPipelineLayout, compute: &GpuProgrammableStage) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret.set_layout(layout); @@ -106,6 +118,23 @@ impl GpuComputePipelineDescriptor { ret } + #[doc = "Construct a new `GpuComputePipelineDescriptor`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuAutoLayoutMode`, `GpuComputePipelineDescriptor`, `GpuProgrammableStage`*"] + #[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 new_with_gpu_auto_layout_mode( + layout: GpuAutoLayoutMode, + compute: &GpuProgrammableStage, + ) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.set_layout_gpu_auto_layout_mode(layout); + ret.set_compute(compute); + ret + } + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); @@ -113,7 +142,7 @@ impl GpuComputePipelineDescriptor { } #[deprecated = "Use `set_layout()` instead."] - pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + pub fn layout(&mut self, val: &GpuPipelineLayout) -> &mut Self { self.set_layout(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCopyExternalImageDestInfo.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCopyExternalImageDestInfo.rs index 4b9eaa3f8..f98310326 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCopyExternalImageDestInfo.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCopyExternalImageDestInfo.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -88,7 +88,19 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "origin")] - pub fn set_origin(this: &GpuCopyExternalImageDestInfo, val: &::wasm_bindgen::JsValue); + pub fn set_origin(this: &GpuCopyExternalImageDestInfo, val: &[::js_sys::Number]); + + #[doc = "Change the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageDestInfo`, `GpuOrigin3dDict`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "origin")] + pub fn set_origin_gpu_origin_3d_dict( + this: &GpuCopyExternalImageDestInfo, + val: &GpuOrigin3dDict, + ); #[doc = "Get the `texture` field of this object."] #[doc = ""] @@ -154,7 +166,7 @@ impl GpuCopyExternalImageDestInfo { } #[deprecated = "Use `set_origin()` instead."] - pub fn origin(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + pub fn origin(&mut self, val: &[::js_sys::Number]) -> &mut Self { self.set_origin(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCopyExternalImageSourceInfo.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCopyExternalImageSourceInfo.rs index bd7878990..dcd7261d9 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCopyExternalImageSourceInfo.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCopyExternalImageSourceInfo.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -70,11 +70,23 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "origin")] - pub fn set_origin(this: &GpuCopyExternalImageSourceInfo, val: &::wasm_bindgen::JsValue); + pub fn set_origin(this: &GpuCopyExternalImageSourceInfo, val: &[::js_sys::Number]); + + #[doc = "Change the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageSourceInfo`, `GpuOrigin2dDict`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "origin")] + pub fn set_origin_gpu_origin_2d_dict( + this: &GpuCopyExternalImageSourceInfo, + val: &GpuOrigin2dDict, + ); #[doc = "Get the `source` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageSourceInfo`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageSourceInfo`, `ImageBitmap`*"] #[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)*"] @@ -83,28 +95,172 @@ extern "C" { #[doc = "Change the `source` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageSourceInfo`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageSourceInfo`, `ImageBitmap`*"] #[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)*"] #[wasm_bindgen(method, setter = "source")] - pub fn set_source(this: &GpuCopyExternalImageSourceInfo, val: &::js_sys::Object); + pub fn set_source(this: &GpuCopyExternalImageSourceInfo, val: &ImageBitmap); + + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageSourceInfo`, `ImageData`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "source")] + pub fn set_source_image_data(this: &GpuCopyExternalImageSourceInfo, val: &ImageData); + + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageSourceInfo`, `HtmlImageElement`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "source")] + pub fn set_source_html_image_element( + this: &GpuCopyExternalImageSourceInfo, + val: &HtmlImageElement, + ); + + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageSourceInfo`, `HtmlVideoElement`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "source")] + pub fn set_source_html_video_element( + this: &GpuCopyExternalImageSourceInfo, + val: &HtmlVideoElement, + ); + + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageSourceInfo`, `VideoFrame`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "source")] + pub fn set_source_video_frame(this: &GpuCopyExternalImageSourceInfo, val: &VideoFrame); + + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageSourceInfo`, `HtmlCanvasElement`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "source")] + pub fn set_source_html_canvas_element( + this: &GpuCopyExternalImageSourceInfo, + val: &HtmlCanvasElement, + ); + + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageSourceInfo`, `OffscreenCanvas`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "source")] + pub fn set_source_offscreen_canvas( + this: &GpuCopyExternalImageSourceInfo, + val: &OffscreenCanvas, + ); } impl GpuCopyExternalImageSourceInfo { #[doc = "Construct a new `GpuCopyExternalImageSourceInfo`."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageSourceInfo`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageSourceInfo`, `ImageBitmap`*"] #[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 new(source: &::js_sys::Object) -> Self { + pub fn new(source: &ImageBitmap) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret.set_source(source); ret } + #[doc = "Construct a new `GpuCopyExternalImageSourceInfo`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageSourceInfo`, `ImageData`*"] + #[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 new_with_image_data(source: &ImageData) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.set_source_image_data(source); + ret + } + + #[doc = "Construct a new `GpuCopyExternalImageSourceInfo`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageSourceInfo`, `HtmlImageElement`*"] + #[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 new_with_html_image_element(source: &HtmlImageElement) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.set_source_html_image_element(source); + ret + } + + #[doc = "Construct a new `GpuCopyExternalImageSourceInfo`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageSourceInfo`, `HtmlVideoElement`*"] + #[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 new_with_html_video_element(source: &HtmlVideoElement) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.set_source_html_video_element(source); + ret + } + + #[doc = "Construct a new `GpuCopyExternalImageSourceInfo`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageSourceInfo`, `VideoFrame`*"] + #[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 new_with_video_frame(source: &VideoFrame) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.set_source_video_frame(source); + ret + } + + #[doc = "Construct a new `GpuCopyExternalImageSourceInfo`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageSourceInfo`, `HtmlCanvasElement`*"] + #[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 new_with_html_canvas_element(source: &HtmlCanvasElement) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.set_source_html_canvas_element(source); + ret + } + + #[doc = "Construct a new `GpuCopyExternalImageSourceInfo`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageSourceInfo`, `OffscreenCanvas`*"] + #[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 new_with_offscreen_canvas(source: &OffscreenCanvas) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.set_source_offscreen_canvas(source); + ret + } + #[deprecated = "Use `set_flip_y()` instead."] pub fn flip_y(&mut self, val: bool) -> &mut Self { self.set_flip_y(val); @@ -112,13 +268,13 @@ impl GpuCopyExternalImageSourceInfo { } #[deprecated = "Use `set_origin()` instead."] - pub fn origin(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + pub fn origin(&mut self, val: &[::js_sys::Number]) -> &mut Self { self.set_origin(val); self } #[deprecated = "Use `set_source()` instead."] - pub fn source(&mut self, val: &::js_sys::Object) -> &mut Self { + pub fn source(&mut self, val: &ImageBitmap) -> &mut Self { self.set_source(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCullMode.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCullMode.rs index 02e0a666a..87b64deea 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCullMode.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuCullMode.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuDepthStencilState.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuDepthStencilState.rs index 58de872ff..186344a4a 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuDepthStencilState.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuDepthStencilState.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuDevice.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuDevice.rs index 966c0bd59..0f3db99b9 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuDevice.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuDevice.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -87,11 +87,11 @@ extern "C" { #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/lost)"] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuDevice`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuDeviceLostInfo`*"] #[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 lost(this: &GpuDevice) -> ::js_sys::Promise; + pub fn lost(this: &GpuDevice) -> ::js_sys::Promise; # [wasm_bindgen (structural , method , getter , js_class = "GPUDevice" , js_name = onuncapturederror)] #[doc = "Getter for the `onuncapturederror` field of this object."] @@ -221,14 +221,14 @@ extern "C" { #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createComputePipelineAsync)"] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`, `GpuDevice`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePipeline`, `GpuComputePipelineDescriptor`, `GpuDevice`*"] #[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 create_compute_pipeline_async( this: &GpuDevice, descriptor: &GpuComputePipelineDescriptor, - ) -> ::js_sys::Promise; + ) -> ::js_sys::Promise; # [wasm_bindgen (method , structural , js_class = "GPUDevice" , js_name = createPipelineLayout)] #[doc = "The `createPipelineLayout()` method."] @@ -291,14 +291,14 @@ extern "C" { #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createRenderPipelineAsync)"] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuRenderPipelineDescriptor`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuRenderPipeline`, `GpuRenderPipelineDescriptor`*"] #[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 create_render_pipeline_async( this: &GpuDevice, descriptor: &GpuRenderPipelineDescriptor, - ) -> ::js_sys::Promise; + ) -> ::js_sys::Promise; # [wasm_bindgen (method , structural , js_class = "GPUDevice" , js_name = createSampler)] #[doc = "The `createSampler()` method."] @@ -383,11 +383,11 @@ extern "C" { #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/popErrorScope)"] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuDevice`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuError`*"] #[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 pop_error_scope(this: &GpuDevice) -> ::js_sys::Promise; + pub fn pop_error_scope(this: &GpuDevice) -> ::js_sys::Promise<::js_sys::JsOption>; # [wasm_bindgen (method , structural , js_class = "GPUDevice" , js_name = pushErrorScope)] #[doc = "The `pushErrorScope()` method."] diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuDeviceDescriptor.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuDeviceDescriptor.rs index 9a1bb4f20..18bc8493b 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuDeviceDescriptor.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuDeviceDescriptor.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -79,7 +79,9 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, getter = "requiredFeatures")] - pub fn get_required_features(this: &GpuDeviceDescriptor) -> Option<::js_sys::Array>; + pub fn get_required_features( + this: &GpuDeviceDescriptor, + ) -> Option<::js_sys::Array<::js_sys::JsString>>; #[doc = "Change the `requiredFeatures` field of this object."] #[doc = ""] @@ -88,7 +90,7 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "requiredFeatures")] - pub fn set_required_features(this: &GpuDeviceDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_required_features(this: &GpuDeviceDescriptor, val: &[::js_sys::JsString]); #[doc = "Get the `requiredLimits` field of this object."] #[doc = ""] @@ -106,7 +108,22 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "requiredLimits")] - pub fn set_required_limits(this: &GpuDeviceDescriptor, val: &::js_sys::Object); + pub fn set_required_limits( + this: &GpuDeviceDescriptor, + val: &::js_sys::Object<::js_sys::Number>, + ); + + #[doc = "Change the `requiredLimits` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "requiredLimits")] + pub fn set_required_limits_record_from_str_to_f64( + this: &GpuDeviceDescriptor, + val: &::js_sys::Object<::js_sys::Number>, + ); } impl GpuDeviceDescriptor { @@ -135,13 +152,13 @@ impl GpuDeviceDescriptor { } #[deprecated = "Use `set_required_features()` instead."] - pub fn required_features(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + pub fn required_features(&mut self, val: &[::js_sys::JsString]) -> &mut Self { self.set_required_features(val); self } #[deprecated = "Use `set_required_limits()` instead."] - pub fn required_limits(&mut self, val: &::js_sys::Object) -> &mut Self { + pub fn required_limits(&mut self, val: &::js_sys::Object<::js_sys::Number>) -> &mut Self { self.set_required_limits(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuDeviceLostInfo.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuDeviceLostInfo.rs index 898c45c62..ee5527cb3 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuDeviceLostInfo.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuDeviceLostInfo.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuDeviceLostReason.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuDeviceLostReason.rs index 31ed7b13e..c82f20b54 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuDeviceLostReason.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuDeviceLostReason.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuError.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuError.rs index 6ce5b5fe9..3674030cb 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuError.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuError.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuErrorFilter.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuErrorFilter.rs index 26a63aef1..9344aabce 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuErrorFilter.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuErrorFilter.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuExtent3dDict.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuExtent3dDict.rs index 0f81c3835..ec3e4f955 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuExtent3dDict.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuExtent3dDict.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuExternalTexture.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuExternalTexture.rs index ea9a557b9..3880a1ece 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuExternalTexture.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuExternalTexture.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuExternalTextureBindingLayout.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuExternalTextureBindingLayout.rs index c773de83d..9a94fff3e 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuExternalTextureBindingLayout.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuExternalTextureBindingLayout.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuExternalTextureDescriptor.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuExternalTextureDescriptor.rs index b1c6cdc86..f0ed0c3f6 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuExternalTextureDescriptor.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuExternalTextureDescriptor.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -56,7 +56,7 @@ extern "C" { #[doc = "Get the `source` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuExternalTextureDescriptor`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuExternalTextureDescriptor`, `HtmlVideoElement`*"] #[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)*"] @@ -65,28 +65,50 @@ extern "C" { #[doc = "Change the `source` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuExternalTextureDescriptor`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuExternalTextureDescriptor`, `HtmlVideoElement`*"] #[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)*"] #[wasm_bindgen(method, setter = "source")] - pub fn set_source(this: &GpuExternalTextureDescriptor, val: &::js_sys::Object); + pub fn set_source(this: &GpuExternalTextureDescriptor, val: &HtmlVideoElement); + + #[doc = "Change the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExternalTextureDescriptor`, `VideoFrame`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "source")] + pub fn set_source_video_frame(this: &GpuExternalTextureDescriptor, val: &VideoFrame); } impl GpuExternalTextureDescriptor { #[doc = "Construct a new `GpuExternalTextureDescriptor`."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuExternalTextureDescriptor`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuExternalTextureDescriptor`, `HtmlVideoElement`*"] #[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 new(source: &::js_sys::Object) -> Self { + pub fn new(source: &HtmlVideoElement) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret.set_source(source); ret } + #[doc = "Construct a new `GpuExternalTextureDescriptor`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExternalTextureDescriptor`, `VideoFrame`*"] + #[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 new_with_video_frame(source: &VideoFrame) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.set_source_video_frame(source); + ret + } + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); @@ -94,7 +116,7 @@ impl GpuExternalTextureDescriptor { } #[deprecated = "Use `set_source()` instead."] - pub fn source(&mut self, val: &::js_sys::Object) -> &mut Self { + pub fn source(&mut self, val: &HtmlVideoElement) -> &mut Self { self.set_source(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuFeatureName.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuFeatureName.rs index cf3a5e853..c6fb944a2 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuFeatureName.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuFeatureName.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; @@ -32,6 +32,7 @@ use wasm_bindgen::prelude::*; #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum GpuFeatureName { + CoreFeaturesAndLimits = "core-features-and-limits", DepthClipControl = "depth-clip-control", Depth32floatStencil8 = "depth32float-stencil8", TextureCompressionBc = "texture-compression-bc", @@ -48,4 +49,9 @@ pub enum GpuFeatureName { Float32Blendable = "float32-blendable", ClipDistances = "clip-distances", DualSourceBlending = "dual-source-blending", + Subgroups = "subgroups", + TextureFormatsTier1 = "texture-formats-tier1", + TextureFormatsTier2 = "texture-formats-tier2", + PrimitiveIndex = "primitive-index", + TextureComponentSwizzle = "texture-component-swizzle", } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuFilterMode.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuFilterMode.rs index 46fb0b642..05536b527 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuFilterMode.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuFilterMode.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuFragmentState.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuFragmentState.rs index ba16aca0c..ef68e9a79 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuFragmentState.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuFragmentState.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -43,7 +43,7 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, getter = "constants")] - pub fn get_constants(this: &GpuFragmentState) -> Option<::js_sys::Object>; + pub fn get_constants(this: &GpuFragmentState) -> Option<::js_sys::Object<::js_sys::Number>>; #[doc = "Change the `constants` field of this object."] #[doc = ""] @@ -52,7 +52,7 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "constants")] - pub fn set_constants(this: &GpuFragmentState, val: &::js_sys::Object); + pub fn set_constants(this: &GpuFragmentState, val: &::js_sys::Object<::js_sys::Number>); #[doc = "Get the `entryPoint` field of this object."] #[doc = ""] @@ -92,31 +92,36 @@ extern "C" { #[doc = "Get the `targets` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuColorTargetState`, `GpuFragmentState`*"] #[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)*"] #[wasm_bindgen(method, getter = "targets")] - pub fn get_targets(this: &GpuFragmentState) -> ::js_sys::Array; + pub fn get_targets( + this: &GpuFragmentState, + ) -> ::js_sys::Array<::js_sys::JsOption>; #[doc = "Change the `targets` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuColorTargetState`, `GpuFragmentState`*"] #[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)*"] #[wasm_bindgen(method, setter = "targets")] - pub fn set_targets(this: &GpuFragmentState, val: &::wasm_bindgen::JsValue); + pub fn set_targets(this: &GpuFragmentState, val: &[::js_sys::JsOption]); } impl GpuFragmentState { #[doc = "Construct a new `GpuFragmentState`."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`, `GpuShaderModule`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuColorTargetState`, `GpuFragmentState`, `GpuShaderModule`*"] #[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 new(module: &GpuShaderModule, targets: &::wasm_bindgen::JsValue) -> Self { + pub fn new( + module: &GpuShaderModule, + targets: &[::js_sys::JsOption], + ) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret.set_module(module); @@ -125,7 +130,7 @@ impl GpuFragmentState { } #[deprecated = "Use `set_constants()` instead."] - pub fn constants(&mut self, val: &::js_sys::Object) -> &mut Self { + pub fn constants(&mut self, val: &::js_sys::Object<::js_sys::Number>) -> &mut Self { self.set_constants(val); self } @@ -143,7 +148,7 @@ impl GpuFragmentState { } #[deprecated = "Use `set_targets()` instead."] - pub fn targets(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + pub fn targets(&mut self, val: &[::js_sys::JsOption]) -> &mut Self { self.set_targets(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuFrontFace.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuFrontFace.rs index eb9eda7b5..a9aa98284 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuFrontFace.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuFrontFace.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuIndexFormat.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuIndexFormat.rs index 7931e961c..616aab49d 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuIndexFormat.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuIndexFormat.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuLoadOp.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuLoadOp.rs index 6717dc764..1a50584a4 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuLoadOp.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuLoadOp.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuMipmapFilterMode.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuMipmapFilterMode.rs index 9d962297d..eea93dfa6 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuMipmapFilterMode.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuMipmapFilterMode.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuMultisampleState.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuMultisampleState.rs index 28cd36d2f..72176e4c2 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuMultisampleState.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuMultisampleState.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuObjectDescriptorBase.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuObjectDescriptorBase.rs index f46278f77..64992304e 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuObjectDescriptorBase.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuObjectDescriptorBase.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuOrigin2dDict.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuOrigin2dDict.rs index c8b521005..0d3a06612 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuOrigin2dDict.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuOrigin2dDict.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuOrigin3dDict.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuOrigin3dDict.rs index a6c77558c..36d001281 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuOrigin3dDict.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuOrigin3dDict.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuOutOfMemoryError.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuOutOfMemoryError.rs index 21f527dea..6f861af08 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuOutOfMemoryError.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuOutOfMemoryError.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPipelineDescriptorBase.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPipelineDescriptorBase.rs index e0067ddcd..c1d8c714e 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPipelineDescriptorBase.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPipelineDescriptorBase.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -56,7 +56,7 @@ extern "C" { #[doc = "Get the `layout` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuPipelineDescriptorBase`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineDescriptorBase`, `GpuPipelineLayout`*"] #[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)*"] @@ -65,28 +65,53 @@ extern "C" { #[doc = "Change the `layout` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuPipelineDescriptorBase`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineDescriptorBase`, `GpuPipelineLayout`*"] #[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)*"] #[wasm_bindgen(method, setter = "layout")] - pub fn set_layout(this: &GpuPipelineDescriptorBase, val: &::wasm_bindgen::JsValue); + pub fn set_layout(this: &GpuPipelineDescriptorBase, val: &GpuPipelineLayout); + + #[doc = "Change the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuAutoLayoutMode`, `GpuPipelineDescriptorBase`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "layout")] + pub fn set_layout_gpu_auto_layout_mode( + this: &GpuPipelineDescriptorBase, + val: GpuAutoLayoutMode, + ); } impl GpuPipelineDescriptorBase { #[doc = "Construct a new `GpuPipelineDescriptorBase`."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuPipelineDescriptorBase`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineDescriptorBase`, `GpuPipelineLayout`*"] #[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 new(layout: &::wasm_bindgen::JsValue) -> Self { + pub fn new(layout: &GpuPipelineLayout) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret.set_layout(layout); ret } + #[doc = "Construct a new `GpuPipelineDescriptorBase`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuAutoLayoutMode`, `GpuPipelineDescriptorBase`*"] + #[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 new_with_gpu_auto_layout_mode(layout: GpuAutoLayoutMode) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.set_layout_gpu_auto_layout_mode(layout); + ret + } + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); @@ -94,7 +119,7 @@ impl GpuPipelineDescriptorBase { } #[deprecated = "Use `set_layout()` instead."] - pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + pub fn layout(&mut self, val: &GpuPipelineLayout) -> &mut Self { self.set_layout(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPipelineLayout.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPipelineLayout.rs index da21f62ef..d7f85f39b 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPipelineLayout.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPipelineLayout.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPipelineLayoutDescriptor.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPipelineLayoutDescriptor.rs index 7fc190563..15205c840 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPipelineLayoutDescriptor.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPipelineLayoutDescriptor.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -56,34 +56,36 @@ extern "C" { #[doc = "Get the `bindGroupLayouts` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayoutDescriptor`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayout`, `GpuPipelineLayoutDescriptor`*"] #[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)*"] #[wasm_bindgen(method, getter = "bindGroupLayouts")] - pub fn get_bind_group_layouts(this: &GpuPipelineLayoutDescriptor) -> ::js_sys::Array; + pub fn get_bind_group_layouts( + this: &GpuPipelineLayoutDescriptor, + ) -> ::js_sys::Array<::js_sys::JsOption>; #[doc = "Change the `bindGroupLayouts` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayoutDescriptor`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayout`, `GpuPipelineLayoutDescriptor`*"] #[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)*"] #[wasm_bindgen(method, setter = "bindGroupLayouts")] pub fn set_bind_group_layouts( this: &GpuPipelineLayoutDescriptor, - val: &::wasm_bindgen::JsValue, + val: &[::js_sys::JsOption], ); } impl GpuPipelineLayoutDescriptor { #[doc = "Construct a new `GpuPipelineLayoutDescriptor`."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayoutDescriptor`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayout`, `GpuPipelineLayoutDescriptor`*"] #[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 new(bind_group_layouts: &::wasm_bindgen::JsValue) -> Self { + pub fn new(bind_group_layouts: &[::js_sys::JsOption]) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret.set_bind_group_layouts(bind_group_layouts); @@ -97,7 +99,10 @@ impl GpuPipelineLayoutDescriptor { } #[deprecated = "Use `set_bind_group_layouts()` instead."] - pub fn bind_group_layouts(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + pub fn bind_group_layouts( + &mut self, + val: &[::js_sys::JsOption], + ) -> &mut Self { self.set_bind_group_layouts(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPowerPreference.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPowerPreference.rs index d674f0efc..01462f630 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPowerPreference.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPowerPreference.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPrimitiveState.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPrimitiveState.rs index cf9cdb3e5..7e174c56c 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPrimitiveState.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPrimitiveState.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPrimitiveTopology.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPrimitiveTopology.rs index 6ec5b2817..1709bab66 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPrimitiveTopology.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuPrimitiveTopology.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuProgrammableStage.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuProgrammableStage.rs index 03110080d..fd8695651 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuProgrammableStage.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuProgrammableStage.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -43,7 +43,8 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, getter = "constants")] - pub fn get_constants(this: &GpuProgrammableStage) -> Option<::js_sys::Object>; + pub fn get_constants(this: &GpuProgrammableStage) + -> Option<::js_sys::Object<::js_sys::Number>>; #[doc = "Change the `constants` field of this object."] #[doc = ""] @@ -52,7 +53,7 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "constants")] - pub fn set_constants(this: &GpuProgrammableStage, val: &::js_sys::Object); + pub fn set_constants(this: &GpuProgrammableStage, val: &::js_sys::Object<::js_sys::Number>); #[doc = "Get the `entryPoint` field of this object."] #[doc = ""] @@ -106,7 +107,7 @@ impl GpuProgrammableStage { } #[deprecated = "Use `set_constants()` instead."] - pub fn constants(&mut self, val: &::js_sys::Object) -> &mut Self { + pub fn constants(&mut self, val: &::js_sys::Object<::js_sys::Number>) -> &mut Self { self.set_constants(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuQuerySet.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuQuerySet.rs index ddaf35ac7..af82ef3a3 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuQuerySet.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuQuerySet.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuQuerySetDescriptor.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuQuerySetDescriptor.rs index def89e147..5a262f28f 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuQuerySetDescriptor.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuQuerySetDescriptor.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuQueryType.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuQueryType.rs index 58d693abe..7a68a3c91 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuQueryType.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuQueryType.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuQueue.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuQueue.rs index 4b65d7ad7..b14a45b9e 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuQueue.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuQueue.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -73,7 +73,7 @@ extern "C" { this: &GpuQueue, source: &GpuCopyExternalImageSourceInfo, destination: &GpuCopyExternalImageDestInfo, - copy_size: &::wasm_bindgen::JsValue, + copy_size: &[::js_sys::Number], ) -> Result<(), JsValue>; # [wasm_bindgen (catch , method , structural , js_class = "GPUQueue" , js_name = copyExternalImageToTexture)] @@ -101,18 +101,18 @@ 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 on_submitted_work_done(this: &GpuQueue) -> ::js_sys::Promise; + pub fn on_submitted_work_done(this: &GpuQueue) -> ::js_sys::Promise<::js_sys::Undefined>; # [wasm_bindgen (method , structural , js_class = "GPUQueue" , js_name = submit)] #[doc = "The `submit()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUQueue/submit)"] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuQueue`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuCommandBuffer`, `GpuQueue`*"] #[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 submit(this: &GpuQueue, command_buffers: &::wasm_bindgen::JsValue); + pub fn submit(this: &GpuQueue, command_buffers: &[GpuCommandBuffer]); # [wasm_bindgen (catch , method , structural , js_class = "GPUQueue" , js_name = writeBuffer)] #[doc = "The `writeBuffer()` method."] @@ -860,7 +860,7 @@ extern "C" { destination: &GpuTexelCopyTextureInfo, data: &::js_sys::Object, data_layout: &GpuTexelCopyBufferLayout, - size: &::wasm_bindgen::JsValue, + size: &[::js_sys::Number], ) -> Result<(), JsValue>; # [wasm_bindgen (catch , method , structural , js_class = "GPUQueue" , js_name = writeTexture)] @@ -877,7 +877,7 @@ extern "C" { destination: &GpuTexelCopyTextureInfo, data: &[u8], data_layout: &GpuTexelCopyBufferLayout, - size: &::wasm_bindgen::JsValue, + size: &[::js_sys::Number], ) -> Result<(), JsValue>; # [wasm_bindgen (catch , method , structural , js_class = "GPUQueue" , js_name = writeTexture)] @@ -894,7 +894,7 @@ extern "C" { destination: &GpuTexelCopyTextureInfo, data: &::js_sys::Uint8Array, data_layout: &GpuTexelCopyBufferLayout, - size: &::wasm_bindgen::JsValue, + size: &[::js_sys::Number], ) -> Result<(), JsValue>; # [wasm_bindgen (catch , method , structural , js_class = "GPUQueue" , js_name = writeTexture)] diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuQueueDescriptor.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuQueueDescriptor.rs index 822a6f069..2c95e17c8 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuQueueDescriptor.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuQueueDescriptor.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderBundle.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderBundle.rs index 36f85f3b2..a6ba2f515 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderBundle.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderBundle.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderBundleDescriptor.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderBundleDescriptor.rs index 4f2c6c286..75744faac 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderBundleDescriptor.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderBundleDescriptor.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderBundleEncoder.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderBundleEncoder.rs index 36519cd32..3cd53300f 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderBundleEncoder.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderBundleEncoder.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -113,7 +113,7 @@ extern "C" { this: &GpuRenderBundleEncoder, index: u32, bind_group: Option<&GpuBindGroup>, - dynamic_offsets: &::wasm_bindgen::JsValue, + dynamic_offsets: &[::js_sys::Number], ); # [wasm_bindgen (catch , method , structural , js_class = "GPURenderBundleEncoder" , js_name = setBindGroup)] diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderBundleEncoderDescriptor.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderBundleEncoderDescriptor.rs index e4a7939aa..fc5023619 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderBundleEncoderDescriptor.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderBundleEncoderDescriptor.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -61,7 +61,9 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, getter = "colorFormats")] - pub fn get_color_formats(this: &GpuRenderBundleEncoderDescriptor) -> ::js_sys::Array; + pub fn get_color_formats( + this: &GpuRenderBundleEncoderDescriptor, + ) -> ::js_sys::Array<::js_sys::JsOption<::js_sys::JsString>>; #[doc = "Change the `colorFormats` field of this object."] #[doc = ""] @@ -72,7 +74,7 @@ extern "C" { #[wasm_bindgen(method, setter = "colorFormats")] pub fn set_color_formats( this: &GpuRenderBundleEncoderDescriptor, - val: &::wasm_bindgen::JsValue, + val: &[::js_sys::JsOption<::js_sys::JsString>], ); #[doc = "Get the `depthStencilFormat` field of this object."] @@ -157,7 +159,7 @@ impl GpuRenderBundleEncoderDescriptor { #[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 new(color_formats: &::wasm_bindgen::JsValue) -> Self { + pub fn new(color_formats: &[::js_sys::JsOption<::js_sys::JsString>]) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret.set_color_formats(color_formats); @@ -171,7 +173,7 @@ impl GpuRenderBundleEncoderDescriptor { } #[deprecated = "Use `set_color_formats()` instead."] - pub fn color_formats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + pub fn color_formats(&mut self, val: &[::js_sys::JsOption<::js_sys::JsString>]) -> &mut Self { self.set_color_formats(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPassColorAttachment.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPassColorAttachment.rs index 7bba182b1..b14fdd44c 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPassColorAttachment.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPassColorAttachment.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -52,7 +52,16 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "clearValue")] - pub fn set_clear_value(this: &GpuRenderPassColorAttachment, val: &::wasm_bindgen::JsValue); + pub fn set_clear_value(this: &GpuRenderPassColorAttachment, val: &[::js_sys::Number]); + + #[doc = "Change the `clearValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`, `GpuRenderPassColorAttachment`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "clearValue")] + pub fn set_clear_value_gpu_color_dict(this: &GpuRenderPassColorAttachment, val: &GpuColorDict); #[doc = "Get the `depthSlice` field of this object."] #[doc = ""] @@ -92,12 +101,21 @@ extern "C" { #[doc = "Get the `resolveTarget` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuTextureView`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuTexture`*"] #[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)*"] #[wasm_bindgen(method, getter = "resolveTarget")] - pub fn get_resolve_target(this: &GpuRenderPassColorAttachment) -> Option; + pub fn get_resolve_target(this: &GpuRenderPassColorAttachment) -> Option<::js_sys::Object>; + + #[doc = "Change the `resolveTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuTexture`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "resolveTarget")] + pub fn set_resolve_target(this: &GpuRenderPassColorAttachment, val: &GpuTexture); #[doc = "Change the `resolveTarget` field of this object."] #[doc = ""] @@ -106,7 +124,10 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "resolveTarget")] - pub fn set_resolve_target(this: &GpuRenderPassColorAttachment, val: &GpuTextureView); + pub fn set_resolve_target_gpu_texture_view( + this: &GpuRenderPassColorAttachment, + val: &GpuTextureView, + ); #[doc = "Get the `storeOp` field of this object."] #[doc = ""] @@ -128,12 +149,21 @@ extern "C" { #[doc = "Get the `view` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuTextureView`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuTexture`*"] #[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)*"] #[wasm_bindgen(method, getter = "view")] - pub fn get_view(this: &GpuRenderPassColorAttachment) -> GpuTextureView; + pub fn get_view(this: &GpuRenderPassColorAttachment) -> ::js_sys::Object; + + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuTexture`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "view")] + pub fn set_view(this: &GpuRenderPassColorAttachment, val: &GpuTexture); #[doc = "Change the `view` field of this object."] #[doc = ""] @@ -142,17 +172,17 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "view")] - pub fn set_view(this: &GpuRenderPassColorAttachment, val: &GpuTextureView); + pub fn set_view_gpu_texture_view(this: &GpuRenderPassColorAttachment, val: &GpuTextureView); } impl GpuRenderPassColorAttachment { #[doc = "Construct a new `GpuRenderPassColorAttachment`."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassColorAttachment`, `GpuStoreOp`, `GpuTextureView`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassColorAttachment`, `GpuStoreOp`, `GpuTexture`*"] #[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 new(load_op: GpuLoadOp, store_op: GpuStoreOp, view: &GpuTextureView) -> Self { + pub fn new(load_op: GpuLoadOp, store_op: GpuStoreOp, view: &GpuTexture) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret.set_load_op(load_op); @@ -161,8 +191,27 @@ impl GpuRenderPassColorAttachment { ret } + #[doc = "Construct a new `GpuRenderPassColorAttachment`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassColorAttachment`, `GpuStoreOp`, `GpuTextureView`*"] + #[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 new_with_gpu_texture_view( + load_op: GpuLoadOp, + store_op: GpuStoreOp, + view: &GpuTextureView, + ) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.set_load_op(load_op); + ret.set_store_op(store_op); + ret.set_view_gpu_texture_view(view); + ret + } + #[deprecated = "Use `set_clear_value()` instead."] - pub fn clear_value(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + pub fn clear_value(&mut self, val: &[::js_sys::Number]) -> &mut Self { self.set_clear_value(val); self } @@ -180,7 +229,7 @@ impl GpuRenderPassColorAttachment { } #[deprecated = "Use `set_resolve_target()` instead."] - pub fn resolve_target(&mut self, val: &GpuTextureView) -> &mut Self { + pub fn resolve_target(&mut self, val: &GpuTexture) -> &mut Self { self.set_resolve_target(val); self } @@ -192,7 +241,7 @@ impl GpuRenderPassColorAttachment { } #[deprecated = "Use `set_view()` instead."] - pub fn view(&mut self, val: &GpuTextureView) -> &mut Self { + pub fn view(&mut self, val: &GpuTexture) -> &mut Self { self.set_view(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPassDepthStencilAttachment.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPassDepthStencilAttachment.rs index 41135ecff..d44ffd75f 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPassDepthStencilAttachment.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPassDepthStencilAttachment.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -182,12 +182,21 @@ extern "C" { #[doc = "Get the `view` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuTextureView`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuTexture`*"] #[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)*"] #[wasm_bindgen(method, getter = "view")] - pub fn get_view(this: &GpuRenderPassDepthStencilAttachment) -> GpuTextureView; + pub fn get_view(this: &GpuRenderPassDepthStencilAttachment) -> ::js_sys::Object; + + #[doc = "Change the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuTexture`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "view")] + pub fn set_view(this: &GpuRenderPassDepthStencilAttachment, val: &GpuTexture); #[doc = "Change the `view` field of this object."] #[doc = ""] @@ -196,20 +205,36 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "view")] - pub fn set_view(this: &GpuRenderPassDepthStencilAttachment, val: &GpuTextureView); + pub fn set_view_gpu_texture_view( + this: &GpuRenderPassDepthStencilAttachment, + val: &GpuTextureView, + ); } impl GpuRenderPassDepthStencilAttachment { + #[doc = "Construct a new `GpuRenderPassDepthStencilAttachment`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuTexture`*"] + #[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 new(view: &GpuTexture) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.set_view(view); + ret + } + #[doc = "Construct a new `GpuRenderPassDepthStencilAttachment`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuTextureView`*"] #[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 new(view: &GpuTextureView) -> Self { + pub fn new_with_gpu_texture_view(view: &GpuTextureView) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.set_view(view); + ret.set_view_gpu_texture_view(view); ret } @@ -262,7 +287,7 @@ impl GpuRenderPassDepthStencilAttachment { } #[deprecated = "Use `set_view()` instead."] - pub fn view(&mut self, val: &GpuTextureView) -> &mut Self { + pub fn view(&mut self, val: &GpuTexture) -> &mut Self { self.set_view(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPassDescriptor.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPassDescriptor.rs index 97cefbe36..24fafd5f7 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPassDescriptor.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPassDescriptor.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -56,21 +56,26 @@ extern "C" { #[doc = "Get the `colorAttachments` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuRenderPassDescriptor`*"] #[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)*"] #[wasm_bindgen(method, getter = "colorAttachments")] - pub fn get_color_attachments(this: &GpuRenderPassDescriptor) -> ::js_sys::Array; + pub fn get_color_attachments( + this: &GpuRenderPassDescriptor, + ) -> ::js_sys::Array<::js_sys::JsOption>; #[doc = "Change the `colorAttachments` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuRenderPassDescriptor`*"] #[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)*"] #[wasm_bindgen(method, setter = "colorAttachments")] - pub fn set_color_attachments(this: &GpuRenderPassDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_color_attachments( + this: &GpuRenderPassDescriptor, + val: &[::js_sys::JsOption], + ); #[doc = "Get the `depthStencilAttachment` field of this object."] #[doc = ""] @@ -111,7 +116,16 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "maxDrawCount")] - pub fn set_max_draw_count(this: &GpuRenderPassDescriptor, val: f64); + pub fn set_max_draw_count(this: &GpuRenderPassDescriptor, val: u32); + + #[doc = "Change the `maxDrawCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "maxDrawCount")] + pub fn set_max_draw_count_f64(this: &GpuRenderPassDescriptor, val: f64); #[doc = "Get the `occlusionQuerySet` field of this object."] #[doc = ""] @@ -155,11 +169,11 @@ extern "C" { impl GpuRenderPassDescriptor { #[doc = "Construct a new `GpuRenderPassDescriptor`."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuRenderPassDescriptor`*"] #[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 new(color_attachments: &::wasm_bindgen::JsValue) -> Self { + pub fn new(color_attachments: &[::js_sys::JsOption]) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret.set_color_attachments(color_attachments); @@ -173,7 +187,10 @@ impl GpuRenderPassDescriptor { } #[deprecated = "Use `set_color_attachments()` instead."] - pub fn color_attachments(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + pub fn color_attachments( + &mut self, + val: &[::js_sys::JsOption], + ) -> &mut Self { self.set_color_attachments(val); self } @@ -188,7 +205,7 @@ impl GpuRenderPassDescriptor { } #[deprecated = "Use `set_max_draw_count()` instead."] - pub fn max_draw_count(&mut self, val: f64) -> &mut Self { + pub fn max_draw_count(&mut self, val: u32) -> &mut Self { self.set_max_draw_count(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPassEncoder.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPassEncoder.rs index 7de607c63..7d91522af 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPassEncoder.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPassEncoder.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -98,11 +98,11 @@ extern "C" { #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPassEncoder/executeBundles)"] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassEncoder`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundle`, `GpuRenderPassEncoder`*"] #[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 execute_bundles(this: &GpuRenderPassEncoder, bundles: &::wasm_bindgen::JsValue); + pub fn execute_bundles(this: &GpuRenderPassEncoder, bundles: &[GpuRenderBundle]); # [wasm_bindgen (catch , method , structural , js_class = "GPURenderPassEncoder" , js_name = setBlendConstant)] #[doc = "The `setBlendConstant()` method."] @@ -115,7 +115,7 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn set_blend_constant_with_f64_sequence( this: &GpuRenderPassEncoder, - color: &::wasm_bindgen::JsValue, + color: &[::js_sys::Number], ) -> Result<(), JsValue>; # [wasm_bindgen (catch , method , structural , js_class = "GPURenderPassEncoder" , js_name = setBlendConstant)] @@ -201,7 +201,7 @@ extern "C" { this: &GpuRenderPassEncoder, index: u32, bind_group: Option<&GpuBindGroup>, - dynamic_offsets: &::wasm_bindgen::JsValue, + dynamic_offsets: &[::js_sys::Number], ); # [wasm_bindgen (catch , method , structural , js_class = "GPURenderPassEncoder" , js_name = setBindGroup)] diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPassTimestampWrites.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPassTimestampWrites.rs index 3d6b4d1ed..2dd6b94bc 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPassTimestampWrites.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPassTimestampWrites.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPipeline.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPipeline.rs index 795bc24d1..973dd408b 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPipeline.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPipeline.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPipelineDescriptor.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPipelineDescriptor.rs index a0f2875b6..cebf40117 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPipelineDescriptor.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRenderPipelineDescriptor.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -56,7 +56,7 @@ extern "C" { #[doc = "Get the `layout` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayout`, `GpuRenderPipelineDescriptor`*"] #[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)*"] @@ -65,12 +65,24 @@ extern "C" { #[doc = "Change the `layout` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayout`, `GpuRenderPipelineDescriptor`*"] #[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)*"] #[wasm_bindgen(method, setter = "layout")] - pub fn set_layout(this: &GpuRenderPipelineDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_layout(this: &GpuRenderPipelineDescriptor, val: &GpuPipelineLayout); + + #[doc = "Change the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuAutoLayoutMode`, `GpuRenderPipelineDescriptor`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "layout")] + pub fn set_layout_gpu_auto_layout_mode( + this: &GpuRenderPipelineDescriptor, + val: GpuAutoLayoutMode, + ); #[doc = "Get the `depthStencil` field of this object."] #[doc = ""] @@ -166,11 +178,11 @@ extern "C" { impl GpuRenderPipelineDescriptor { #[doc = "Construct a new `GpuRenderPipelineDescriptor`."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`, `GpuVertexState`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayout`, `GpuRenderPipelineDescriptor`, `GpuVertexState`*"] #[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 new(layout: &::wasm_bindgen::JsValue, vertex: &GpuVertexState) -> Self { + pub fn new(layout: &GpuPipelineLayout, vertex: &GpuVertexState) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret.set_layout(layout); @@ -178,6 +190,23 @@ impl GpuRenderPipelineDescriptor { ret } + #[doc = "Construct a new `GpuRenderPipelineDescriptor`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuAutoLayoutMode`, `GpuRenderPipelineDescriptor`, `GpuVertexState`*"] + #[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 new_with_gpu_auto_layout_mode( + layout: GpuAutoLayoutMode, + vertex: &GpuVertexState, + ) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.set_layout_gpu_auto_layout_mode(layout); + ret.set_vertex(vertex); + ret + } + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); @@ -185,7 +214,7 @@ impl GpuRenderPipelineDescriptor { } #[deprecated = "Use `set_layout()` instead."] - pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + pub fn layout(&mut self, val: &GpuPipelineLayout) -> &mut Self { self.set_layout(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRequestAdapterOptions.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRequestAdapterOptions.rs index 3543ad8e1..709d946e5 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRequestAdapterOptions.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuRequestAdapterOptions.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSampler.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSampler.rs index 5f88d5244..9ecc2f6ef 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSampler.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSampler.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSamplerBindingLayout.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSamplerBindingLayout.rs index b14f29014..dec78ae3d 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSamplerBindingLayout.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSamplerBindingLayout.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSamplerBindingType.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSamplerBindingType.rs index 6cebb0386..35fc11398 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSamplerBindingType.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSamplerBindingType.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSamplerDescriptor.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSamplerDescriptor.rs index 3cb3237dd..1b2780383 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSamplerDescriptor.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSamplerDescriptor.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuShaderModule.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuShaderModule.rs index bbebbb426..0d6bc46c3 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuShaderModule.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuShaderModule.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -65,9 +65,9 @@ extern "C" { #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUShaderModule/getCompilationInfo)"] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuShaderModule`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuCompilationInfo`, `GpuShaderModule`*"] #[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 get_compilation_info(this: &GpuShaderModule) -> ::js_sys::Promise; + pub fn get_compilation_info(this: &GpuShaderModule) -> ::js_sys::Promise; } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuShaderModuleCompilationHint.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuShaderModuleCompilationHint.rs new file mode 100644 index 000000000..f428cafde --- /dev/null +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuShaderModuleCompilationHint.rs @@ -0,0 +1,113 @@ +// DO NOT EDIT THIS FILE! +// +// This module part of a subset of web-sys that is used by wgpu's webgpu backend. +// +// These bindings are vendored into wgpu for the sole purpose of letting +// us pin the WebGPU backend to a specific version of the bindings, not +// to enable local changes. There are no provisions to preserve changes +// you make here the next time we re-vendor the bindings. +// +// The `web-sys` crate does not treat breaking changes to the WebGPU API +// as semver breaking changes, as WebGPU is "unstable". This means Cargo +// will not let us mix versions of `web-sys`, pinning WebGPU bindings to +// a specific version, while letting other bindings like WebGL get +// updated. Vendoring WebGPU was the workaround we chose. +// +// Vendoring also allows us to avoid building `web-sys` with +// `--cfg=web_sys_unstable_apis`, needed to get the WebGPU bindings. +// +// If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. +// +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. +#![allow(unused_imports)] +#![allow(clippy::all)] +use super::*; +use wasm_bindgen::prelude::*; + +#[wasm_bindgen] +extern "C" { + # [wasm_bindgen (extends = :: js_sys :: Object , js_name = GPUShaderModuleCompilationHint)] + #[derive(Debug, Clone, PartialEq, Eq)] + #[doc = "The `GpuShaderModuleCompilationHint` dictionary."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"] + #[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 type GpuShaderModuleCompilationHint; + + #[doc = "Get the `entryPoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"] + #[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)*"] + #[wasm_bindgen(method, getter = "entryPoint")] + pub fn get_entry_point(this: &GpuShaderModuleCompilationHint) -> ::alloc::string::String; + + #[doc = "Change the `entryPoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "entryPoint")] + pub fn set_entry_point(this: &GpuShaderModuleCompilationHint, val: &str); + + #[doc = "Get the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayout`, `GpuShaderModuleCompilationHint`*"] + #[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)*"] + #[wasm_bindgen(method, getter = "layout")] + pub fn get_layout(this: &GpuShaderModuleCompilationHint) -> ::wasm_bindgen::JsValue; + + #[doc = "Change the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayout`, `GpuShaderModuleCompilationHint`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "layout")] + pub fn set_layout(this: &GpuShaderModuleCompilationHint, val: &GpuPipelineLayout); + + #[doc = "Change the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuAutoLayoutMode`, `GpuShaderModuleCompilationHint`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "layout")] + pub fn set_layout_gpu_auto_layout_mode( + this: &GpuShaderModuleCompilationHint, + val: GpuAutoLayoutMode, + ); +} + +impl GpuShaderModuleCompilationHint { + #[doc = "Construct a new `GpuShaderModuleCompilationHint`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"] + #[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 new(entry_point: &str) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.set_entry_point(entry_point); + ret + } + + #[deprecated = "Use `set_entry_point()` instead."] + pub fn entry_point(&mut self, val: &str) -> &mut Self { + self.set_entry_point(val); + self + } + + #[deprecated = "Use `set_layout()` instead."] + pub fn layout(&mut self, val: &GpuPipelineLayout) -> &mut Self { + self.set_layout(val); + self + } +} diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuShaderModuleDescriptor.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuShaderModuleDescriptor.rs index e0d08610f..e7cf0bc46 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuShaderModuleDescriptor.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuShaderModuleDescriptor.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -74,21 +74,26 @@ extern "C" { #[doc = "Get the `compilationHints` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleDescriptor`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`, `GpuShaderModuleDescriptor`*"] #[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)*"] #[wasm_bindgen(method, getter = "compilationHints")] - pub fn get_compilation_hints(this: &GpuShaderModuleDescriptor) -> Option<::js_sys::Array>; + pub fn get_compilation_hints( + this: &GpuShaderModuleDescriptor, + ) -> Option<::js_sys::Array>; #[doc = "Change the `compilationHints` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleDescriptor`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`, `GpuShaderModuleDescriptor`*"] #[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)*"] #[wasm_bindgen(method, setter = "compilationHints")] - pub fn set_compilation_hints(this: &GpuShaderModuleDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_compilation_hints( + this: &GpuShaderModuleDescriptor, + val: &[GpuShaderModuleCompilationHint], + ); } impl GpuShaderModuleDescriptor { @@ -118,7 +123,7 @@ impl GpuShaderModuleDescriptor { } #[deprecated = "Use `set_compilation_hints()` instead."] - pub fn compilation_hints(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + pub fn compilation_hints(&mut self, val: &[GpuShaderModuleCompilationHint]) -> &mut Self { self.set_compilation_hints(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuStencilFaceState.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuStencilFaceState.rs index 96fedd785..32d40f18a 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuStencilFaceState.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuStencilFaceState.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuStencilOperation.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuStencilOperation.rs index f5137d892..8dbf2a512 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuStencilOperation.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuStencilOperation.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuStorageTextureAccess.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuStorageTextureAccess.rs index 43499d6df..0dfdd340b 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuStorageTextureAccess.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuStorageTextureAccess.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuStorageTextureBindingLayout.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuStorageTextureBindingLayout.rs index f694316e1..7157dab2e 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuStorageTextureBindingLayout.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuStorageTextureBindingLayout.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuStoreOp.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuStoreOp.rs index f32edb3f9..19fbe1584 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuStoreOp.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuStoreOp.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSupportedFeatures.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSupportedFeatures.rs index fc70e2f17..19fa2096d 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSupportedFeatures.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSupportedFeatures.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -49,17 +49,6 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn size(this: &GpuSupportedFeatures) -> u32; - # [wasm_bindgen (method , structural , js_class = "GPUSupportedFeatures" , js_name = entries)] - #[doc = "The `entries()` method."] - #[doc = ""] - #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUSupportedFeatures/entries)"] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuSupportedFeatures`*"] - #[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 entries(this: &GpuSupportedFeatures) -> ::js_sys::Iterator; - # [wasm_bindgen (catch , method , structural , js_class = "GPUSupportedFeatures" , js_name = forEach)] #[doc = "The `forEach()` method."] #[doc = ""] @@ -71,7 +60,7 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn for_each( this: &GpuSupportedFeatures, - callback: &::js_sys::Function, + callback: &::js_sys::Function ::js_sys::Undefined>, ) -> Result<(), JsValue>; # [wasm_bindgen (method , structural , js_class = "GPUSupportedFeatures" , js_name = has)] @@ -85,6 +74,19 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn has(this: &GpuSupportedFeatures, value: &str) -> bool; + # [wasm_bindgen (method , structural , js_class = "GPUSupportedFeatures" , js_name = entries)] + #[doc = "The `entries()` method."] + #[doc = ""] + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUSupportedFeatures/entries)"] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuSupportedFeatures`*"] + #[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 entries( + this: &GpuSupportedFeatures, + ) -> ::js_sys::Iterator<::js_sys::ArrayTuple<(::js_sys::JsString, ::js_sys::JsString)>>; + # [wasm_bindgen (method , structural , js_class = "GPUSupportedFeatures" , js_name = keys)] #[doc = "The `keys()` method."] #[doc = ""] @@ -94,7 +96,7 @@ 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 keys(this: &GpuSupportedFeatures) -> ::js_sys::Iterator; + pub fn keys(this: &GpuSupportedFeatures) -> ::js_sys::Iterator<::js_sys::JsString>; # [wasm_bindgen (method , structural , js_class = "GPUSupportedFeatures" , js_name = values)] #[doc = "The `values()` method."] @@ -105,5 +107,5 @@ 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 values(this: &GpuSupportedFeatures) -> ::js_sys::Iterator; + pub fn values(this: &GpuSupportedFeatures) -> ::js_sys::Iterator<::js_sys::JsString>; } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSupportedLimits.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSupportedLimits.rs index 8323fe6e2..8d5507050 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSupportedLimits.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuSupportedLimits.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -170,6 +170,28 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn max_storage_buffers_per_shader_stage(this: &GpuSupportedLimits) -> u32; + # [wasm_bindgen (structural , method , getter , js_class = "GPUSupportedLimits" , js_name = maxStorageBuffersInVertexStage)] + #[doc = "Getter for the `maxStorageBuffersInVertexStage` field of this object."] + #[doc = ""] + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUSupportedLimits/maxStorageBuffersInVertexStage)"] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuSupportedLimits`*"] + #[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 max_storage_buffers_in_vertex_stage(this: &GpuSupportedLimits) -> u32; + + # [wasm_bindgen (structural , method , getter , js_class = "GPUSupportedLimits" , js_name = maxStorageBuffersInFragmentStage)] + #[doc = "Getter for the `maxStorageBuffersInFragmentStage` field of this object."] + #[doc = ""] + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUSupportedLimits/maxStorageBuffersInFragmentStage)"] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuSupportedLimits`*"] + #[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 max_storage_buffers_in_fragment_stage(this: &GpuSupportedLimits) -> u32; + # [wasm_bindgen (structural , method , getter , js_class = "GPUSupportedLimits" , js_name = maxStorageTexturesPerShaderStage)] #[doc = "Getter for the `maxStorageTexturesPerShaderStage` field of this object."] #[doc = ""] @@ -181,6 +203,28 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn max_storage_textures_per_shader_stage(this: &GpuSupportedLimits) -> u32; + # [wasm_bindgen (structural , method , getter , js_class = "GPUSupportedLimits" , js_name = maxStorageTexturesInVertexStage)] + #[doc = "Getter for the `maxStorageTexturesInVertexStage` field of this object."] + #[doc = ""] + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUSupportedLimits/maxStorageTexturesInVertexStage)"] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuSupportedLimits`*"] + #[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 max_storage_textures_in_vertex_stage(this: &GpuSupportedLimits) -> u32; + + # [wasm_bindgen (structural , method , getter , js_class = "GPUSupportedLimits" , js_name = maxStorageTexturesInFragmentStage)] + #[doc = "Getter for the `maxStorageTexturesInFragmentStage` field of this object."] + #[doc = ""] + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUSupportedLimits/maxStorageTexturesInFragmentStage)"] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuSupportedLimits`*"] + #[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 max_storage_textures_in_fragment_stage(this: &GpuSupportedLimits) -> u32; + # [wasm_bindgen (structural , method , getter , js_class = "GPUSupportedLimits" , js_name = maxUniformBuffersPerShaderStage)] #[doc = "Getter for the `maxUniformBuffersPerShaderStage` field of this object."] #[doc = ""] diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTexelCopyBufferInfo.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTexelCopyBufferInfo.rs index dad3f24b2..a5907da0e 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTexelCopyBufferInfo.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTexelCopyBufferInfo.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -70,7 +70,16 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "offset")] - pub fn set_offset(this: &GpuTexelCopyBufferInfo, val: f64); + pub fn set_offset(this: &GpuTexelCopyBufferInfo, val: u32); + + #[doc = "Change the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTexelCopyBufferInfo`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "offset")] + pub fn set_offset_f64(this: &GpuTexelCopyBufferInfo, val: f64); #[doc = "Get the `rowsPerImage` field of this object."] #[doc = ""] @@ -130,7 +139,7 @@ impl GpuTexelCopyBufferInfo { } #[deprecated = "Use `set_offset()` instead."] - pub fn offset(&mut self, val: f64) -> &mut Self { + pub fn offset(&mut self, val: u32) -> &mut Self { self.set_offset(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTexelCopyBufferLayout.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTexelCopyBufferLayout.rs index 26f9a4f3c..e3cd6acf4 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTexelCopyBufferLayout.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTexelCopyBufferLayout.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -70,7 +70,16 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "offset")] - pub fn set_offset(this: &GpuTexelCopyBufferLayout, val: f64); + pub fn set_offset(this: &GpuTexelCopyBufferLayout, val: u32); + + #[doc = "Change the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTexelCopyBufferLayout`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "offset")] + pub fn set_offset_f64(this: &GpuTexelCopyBufferLayout, val: f64); #[doc = "Get the `rowsPerImage` field of this object."] #[doc = ""] @@ -111,7 +120,7 @@ impl GpuTexelCopyBufferLayout { } #[deprecated = "Use `set_offset()` instead."] - pub fn offset(&mut self, val: f64) -> &mut Self { + pub fn offset(&mut self, val: u32) -> &mut Self { self.set_offset(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTexelCopyTextureInfo.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTexelCopyTextureInfo.rs index e948503de..eb71a6cc3 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTexelCopyTextureInfo.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTexelCopyTextureInfo.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -88,7 +88,16 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "origin")] - pub fn set_origin(this: &GpuTexelCopyTextureInfo, val: &::wasm_bindgen::JsValue); + pub fn set_origin(this: &GpuTexelCopyTextureInfo, val: &[::js_sys::Number]); + + #[doc = "Change the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuOrigin3dDict`, `GpuTexelCopyTextureInfo`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "origin")] + pub fn set_origin_gpu_origin_3d_dict(this: &GpuTexelCopyTextureInfo, val: &GpuOrigin3dDict); #[doc = "Get the `texture` field of this object."] #[doc = ""] @@ -136,7 +145,7 @@ impl GpuTexelCopyTextureInfo { } #[deprecated = "Use `set_origin()` instead."] - pub fn origin(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + pub fn origin(&mut self, val: &[::js_sys::Number]) -> &mut Self { self.set_origin(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTexture.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTexture.rs index 20c3eb8cb..040bce56a 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTexture.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTexture.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -126,6 +126,17 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn usage(this: &GpuTexture) -> u32; + # [wasm_bindgen (structural , method , getter , js_class = "GPUTexture" , js_name = textureBindingViewDimension)] + #[doc = "Getter for the `textureBindingViewDimension` field of this object."] + #[doc = ""] + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/textureBindingViewDimension)"] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTexture`*"] + #[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 texture_binding_view_dimension(this: &GpuTexture) -> ::wasm_bindgen::JsValue; + # [wasm_bindgen (structural , method , getter , js_class = "GPUTexture" , js_name = label)] #[doc = "Getter for the `label` field of this object."] #[doc = ""] diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureAspect.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureAspect.rs index c8d7739b8..9eb057832 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureAspect.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureAspect.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureBindingLayout.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureBindingLayout.rs index 2a7bd017c..d3bcdf260 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureBindingLayout.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureBindingLayout.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureDescriptor.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureDescriptor.rs index dc6be0175..54ac87234 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureDescriptor.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureDescriptor.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -142,7 +142,39 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "size")] - pub fn set_size(this: &GpuTextureDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_size(this: &GpuTextureDescriptor, val: &[::js_sys::Number]); + + #[doc = "Change the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExtent3dDict`, `GpuTextureDescriptor`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "size")] + pub fn set_size_gpu_extent_3d_dict(this: &GpuTextureDescriptor, val: &GpuExtent3dDict); + + #[doc = "Get the `textureBindingViewDimension` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`, `GpuTextureViewDimension`*"] + #[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)*"] + #[wasm_bindgen(method, getter = "textureBindingViewDimension")] + pub fn get_texture_binding_view_dimension( + this: &GpuTextureDescriptor, + ) -> Option; + + #[doc = "Change the `textureBindingViewDimension` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`, `GpuTextureViewDimension`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "textureBindingViewDimension")] + pub fn set_texture_binding_view_dimension( + this: &GpuTextureDescriptor, + val: GpuTextureViewDimension, + ); #[doc = "Get the `usage` field of this object."] #[doc = ""] @@ -169,7 +201,9 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, getter = "viewFormats")] - pub fn get_view_formats(this: &GpuTextureDescriptor) -> Option<::js_sys::Array>; + pub fn get_view_formats( + this: &GpuTextureDescriptor, + ) -> Option<::js_sys::Array<::js_sys::JsString>>; #[doc = "Change the `viewFormats` field of this object."] #[doc = ""] @@ -178,7 +212,7 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "viewFormats")] - pub fn set_view_formats(this: &GpuTextureDescriptor, val: &::wasm_bindgen::JsValue); + pub fn set_view_formats(this: &GpuTextureDescriptor, val: &[::js_sys::JsString]); } impl GpuTextureDescriptor { @@ -188,7 +222,7 @@ impl GpuTextureDescriptor { #[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 new(format: GpuTextureFormat, size: &::wasm_bindgen::JsValue, usage: u32) -> Self { + pub fn new(format: GpuTextureFormat, size: &[::js_sys::Number], usage: u32) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret.set_format(format); @@ -197,6 +231,25 @@ impl GpuTextureDescriptor { ret } + #[doc = "Construct a new `GpuTextureDescriptor`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExtent3dDict`, `GpuTextureDescriptor`, `GpuTextureFormat`*"] + #[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 new_with_gpu_extent_3d_dict( + format: GpuTextureFormat, + size: &GpuExtent3dDict, + usage: u32, + ) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.set_format(format); + ret.set_size_gpu_extent_3d_dict(size); + ret.set_usage(usage); + ret + } + #[deprecated = "Use `set_label()` instead."] pub fn label(&mut self, val: &str) -> &mut Self { self.set_label(val); @@ -228,11 +281,17 @@ impl GpuTextureDescriptor { } #[deprecated = "Use `set_size()` instead."] - pub fn size(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + pub fn size(&mut self, val: &[::js_sys::Number]) -> &mut Self { self.set_size(val); self } + #[deprecated = "Use `set_texture_binding_view_dimension()` instead."] + pub fn texture_binding_view_dimension(&mut self, val: GpuTextureViewDimension) -> &mut Self { + self.set_texture_binding_view_dimension(val); + self + } + #[deprecated = "Use `set_usage()` instead."] pub fn usage(&mut self, val: u32) -> &mut Self { self.set_usage(val); @@ -240,7 +299,7 @@ impl GpuTextureDescriptor { } #[deprecated = "Use `set_view_formats()` instead."] - pub fn view_formats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + pub fn view_formats(&mut self, val: &[::js_sys::JsString]) -> &mut Self { self.set_view_formats(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureDimension.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureDimension.rs index d860c9d13..c85860cf6 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureDimension.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureDimension.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureFormat.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureFormat.rs index c861a82fc..5c9d0bb46 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureFormat.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureFormat.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; @@ -36,6 +36,8 @@ pub enum GpuTextureFormat { R8snorm = "r8snorm", R8uint = "r8uint", R8sint = "r8sint", + R16unorm = "r16unorm", + R16snorm = "r16snorm", R16uint = "r16uint", R16sint = "r16sint", R16float = "r16float", @@ -46,6 +48,8 @@ pub enum GpuTextureFormat { R32uint = "r32uint", R32sint = "r32sint", R32float = "r32float", + Rg16unorm = "rg16unorm", + Rg16snorm = "rg16snorm", Rg16uint = "rg16uint", Rg16sint = "rg16sint", Rg16float = "rg16float", @@ -63,6 +67,8 @@ pub enum GpuTextureFormat { Rg32uint = "rg32uint", Rg32sint = "rg32sint", Rg32float = "rg32float", + Rgba16unorm = "rgba16unorm", + Rgba16snorm = "rgba16snorm", Rgba16uint = "rgba16uint", Rgba16sint = "rgba16sint", Rgba16float = "rgba16float", diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureSampleType.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureSampleType.rs index 04fdb2e3b..2dd6e75a7 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureSampleType.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureSampleType.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureView.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureView.rs index 6ece29498..51c8d3c03 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureView.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureView.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureViewDescriptor.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureViewDescriptor.rs index 49c642d31..036dcded4 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureViewDescriptor.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureViewDescriptor.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -180,6 +180,24 @@ extern "C" { #[wasm_bindgen(method, setter = "mipLevelCount")] pub fn set_mip_level_count(this: &GpuTextureViewDescriptor, val: u32); + #[doc = "Get the `swizzle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] + #[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)*"] + #[wasm_bindgen(method, getter = "swizzle")] + pub fn get_swizzle(this: &GpuTextureViewDescriptor) -> Option<::alloc::string::String>; + + #[doc = "Change the `swizzle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "swizzle")] + pub fn set_swizzle(this: &GpuTextureViewDescriptor, val: &str); + #[doc = "Get the `usage` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] @@ -260,6 +278,12 @@ impl GpuTextureViewDescriptor { self } + #[deprecated = "Use `set_swizzle()` instead."] + pub fn swizzle(&mut self, val: &str) -> &mut Self { + self.set_swizzle(val); + self + } + #[deprecated = "Use `set_usage()` instead."] pub fn usage(&mut self, val: u32) -> &mut Self { self.set_usage(val); diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureViewDimension.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureViewDimension.rs index 57ccb0360..52eea145a 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureViewDimension.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuTextureViewDimension.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuUncapturedErrorEvent.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuUncapturedErrorEvent.rs index a59f1dbe0..60bf4de32 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuUncapturedErrorEvent.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuUncapturedErrorEvent.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuUncapturedErrorEventInit.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuUncapturedErrorEventInit.rs index 32597521e..587a1b518 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuUncapturedErrorEventInit.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuUncapturedErrorEventInit.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuValidationError.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuValidationError.rs index f29b3b861..3500056c0 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuValidationError.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuValidationError.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuVertexAttribute.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuVertexAttribute.rs index 298b21340..7e56c1911 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuVertexAttribute.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuVertexAttribute.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -70,7 +70,16 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "offset")] - pub fn set_offset(this: &GpuVertexAttribute, val: f64); + pub fn set_offset(this: &GpuVertexAttribute, val: u32); + + #[doc = "Change the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "offset")] + pub fn set_offset_f64(this: &GpuVertexAttribute, val: f64); #[doc = "Get the `shaderLocation` field of this object."] #[doc = ""] @@ -98,7 +107,7 @@ impl GpuVertexAttribute { #[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 new(format: GpuVertexFormat, offset: f64, shader_location: u32) -> Self { + pub fn new(format: GpuVertexFormat, offset: u32, shader_location: u32) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret.set_format(format); @@ -107,6 +116,21 @@ impl GpuVertexAttribute { ret } + #[doc = "Construct a new `GpuVertexAttribute`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`, `GpuVertexFormat`*"] + #[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 new_with_f64(format: GpuVertexFormat, offset: f64, shader_location: u32) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.set_format(format); + ret.set_offset_f64(offset); + ret.set_shader_location(shader_location); + ret + } + #[deprecated = "Use `set_format()` instead."] pub fn format(&mut self, val: GpuVertexFormat) -> &mut Self { self.set_format(val); @@ -114,7 +138,7 @@ impl GpuVertexAttribute { } #[deprecated = "Use `set_offset()` instead."] - pub fn offset(&mut self, val: f64) -> &mut Self { + pub fn offset(&mut self, val: u32) -> &mut Self { self.set_offset(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuVertexBufferLayout.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuVertexBufferLayout.rs index 9ebf3e6ec..625ed61dc 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuVertexBufferLayout.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuVertexBufferLayout.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -52,25 +52,34 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "arrayStride")] - pub fn set_array_stride(this: &GpuVertexBufferLayout, val: f64); + pub fn set_array_stride(this: &GpuVertexBufferLayout, val: u32); + + #[doc = "Change the `arrayStride` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`*"] + #[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)*"] + #[wasm_bindgen(method, setter = "arrayStride")] + pub fn set_array_stride_f64(this: &GpuVertexBufferLayout, val: f64); #[doc = "Get the `attributes` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`, `GpuVertexBufferLayout`*"] #[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)*"] #[wasm_bindgen(method, getter = "attributes")] - pub fn get_attributes(this: &GpuVertexBufferLayout) -> ::js_sys::Array; + pub fn get_attributes(this: &GpuVertexBufferLayout) -> ::js_sys::Array; #[doc = "Change the `attributes` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`, `GpuVertexBufferLayout`*"] #[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)*"] #[wasm_bindgen(method, setter = "attributes")] - pub fn set_attributes(this: &GpuVertexBufferLayout, val: &::wasm_bindgen::JsValue); + pub fn set_attributes(this: &GpuVertexBufferLayout, val: &[GpuVertexAttribute]); #[doc = "Get the `stepMode` field of this object."] #[doc = ""] @@ -94,11 +103,11 @@ extern "C" { impl GpuVertexBufferLayout { #[doc = "Construct a new `GpuVertexBufferLayout`."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`, `GpuVertexBufferLayout`*"] #[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 new(array_stride: f64, attributes: &::wasm_bindgen::JsValue) -> Self { + pub fn new(array_stride: u32, attributes: &[GpuVertexAttribute]) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret.set_array_stride(array_stride); @@ -106,14 +115,28 @@ impl GpuVertexBufferLayout { ret } + #[doc = "Construct a new `GpuVertexBufferLayout`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`, `GpuVertexBufferLayout`*"] + #[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 new_with_f64(array_stride: f64, attributes: &[GpuVertexAttribute]) -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret.set_array_stride_f64(array_stride); + ret.set_attributes(attributes); + ret + } + #[deprecated = "Use `set_array_stride()` instead."] - pub fn array_stride(&mut self, val: f64) -> &mut Self { + pub fn array_stride(&mut self, val: u32) -> &mut Self { self.set_array_stride(val); self } #[deprecated = "Use `set_attributes()` instead."] - pub fn attributes(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + pub fn attributes(&mut self, val: &[GpuVertexAttribute]) -> &mut Self { self.set_attributes(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuVertexFormat.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuVertexFormat.rs index 167c67a60..987d334db 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuVertexFormat.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuVertexFormat.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuVertexState.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuVertexState.rs index a60ef9e6b..a1eb2ec96 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuVertexState.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuVertexState.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -43,7 +43,7 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, getter = "constants")] - pub fn get_constants(this: &GpuVertexState) -> Option<::js_sys::Object>; + pub fn get_constants(this: &GpuVertexState) -> Option<::js_sys::Object<::js_sys::Number>>; #[doc = "Change the `constants` field of this object."] #[doc = ""] @@ -52,7 +52,7 @@ extern "C" { #[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)*"] #[wasm_bindgen(method, setter = "constants")] - pub fn set_constants(this: &GpuVertexState, val: &::js_sys::Object); + pub fn set_constants(this: &GpuVertexState, val: &::js_sys::Object<::js_sys::Number>); #[doc = "Get the `entryPoint` field of this object."] #[doc = ""] @@ -92,21 +92,23 @@ extern "C" { #[doc = "Get the `buffers` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuVertexState`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`, `GpuVertexState`*"] #[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)*"] #[wasm_bindgen(method, getter = "buffers")] - pub fn get_buffers(this: &GpuVertexState) -> Option<::js_sys::Array>; + pub fn get_buffers( + this: &GpuVertexState, + ) -> Option<::js_sys::Array<::js_sys::JsOption>>; #[doc = "Change the `buffers` field of this object."] #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `GpuVertexState`*"] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`, `GpuVertexState`*"] #[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)*"] #[wasm_bindgen(method, setter = "buffers")] - pub fn set_buffers(this: &GpuVertexState, val: &::wasm_bindgen::JsValue); + pub fn set_buffers(this: &GpuVertexState, val: &[::js_sys::JsOption]); } impl GpuVertexState { @@ -124,7 +126,7 @@ impl GpuVertexState { } #[deprecated = "Use `set_constants()` instead."] - pub fn constants(&mut self, val: &::js_sys::Object) -> &mut Self { + pub fn constants(&mut self, val: &::js_sys::Object<::js_sys::Number>) -> &mut Self { self.set_constants(val); self } @@ -142,7 +144,7 @@ impl GpuVertexState { } #[deprecated = "Use `set_buffers()` instead."] - pub fn buffers(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + pub fn buffers(&mut self, val: &[::js_sys::JsOption]) -> &mut Self { self.set_buffers(val); self } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuVertexStepMode.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuVertexStepMode.rs index 29a0b857b..1afd5876e 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuVertexStepMode.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_GpuVertexStepMode.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_WgslLanguageFeatures.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_WgslLanguageFeatures.rs index d6fe55d0c..82e380455 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_WgslLanguageFeatures.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_WgslLanguageFeatures.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports)] #![allow(clippy::all)] use super::*; @@ -49,17 +49,6 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn size(this: &WgslLanguageFeatures) -> u32; - # [wasm_bindgen (method , structural , js_class = "WGSLLanguageFeatures" , js_name = entries)] - #[doc = "The `entries()` method."] - #[doc = ""] - #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WGSLLanguageFeatures/entries)"] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WgslLanguageFeatures`*"] - #[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 entries(this: &WgslLanguageFeatures) -> ::js_sys::Iterator; - # [wasm_bindgen (catch , method , structural , js_class = "WGSLLanguageFeatures" , js_name = forEach)] #[doc = "The `forEach()` method."] #[doc = ""] @@ -71,7 +60,7 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn for_each( this: &WgslLanguageFeatures, - callback: &::js_sys::Function, + callback: &::js_sys::Function ::js_sys::Undefined>, ) -> Result<(), JsValue>; # [wasm_bindgen (method , structural , js_class = "WGSLLanguageFeatures" , js_name = has)] @@ -85,6 +74,19 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn has(this: &WgslLanguageFeatures, value: &str) -> bool; + # [wasm_bindgen (method , structural , js_class = "WGSLLanguageFeatures" , js_name = entries)] + #[doc = "The `entries()` method."] + #[doc = ""] + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WGSLLanguageFeatures/entries)"] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WgslLanguageFeatures`*"] + #[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 entries( + this: &WgslLanguageFeatures, + ) -> ::js_sys::Iterator<::js_sys::ArrayTuple<(::js_sys::JsString, ::js_sys::JsString)>>; + # [wasm_bindgen (method , structural , js_class = "WGSLLanguageFeatures" , js_name = keys)] #[doc = "The `keys()` method."] #[doc = ""] @@ -94,7 +96,7 @@ 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 keys(this: &WgslLanguageFeatures) -> ::js_sys::Iterator; + pub fn keys(this: &WgslLanguageFeatures) -> ::js_sys::Iterator<::js_sys::JsString>; # [wasm_bindgen (method , structural , js_class = "WGSLLanguageFeatures" , js_name = values)] #[doc = "The `values()` method."] @@ -105,5 +107,5 @@ 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 values(this: &WgslLanguageFeatures) -> ::js_sys::Iterator; + pub fn values(this: &WgslLanguageFeatures) -> ::js_sys::Iterator<::js_sys::JsString>; } diff --git a/wgpu/src/backend/webgpu/webgpu_sys/gen_gpu_map_mode.rs b/wgpu/src/backend/webgpu/webgpu_sys/gen_gpu_map_mode.rs index 4b620cb07..825df1367 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/gen_gpu_map_mode.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/gen_gpu_map_mode.rs @@ -18,7 +18,7 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] diff --git a/wgpu/src/backend/webgpu/webgpu_sys/mod.rs b/wgpu/src/backend/webgpu/webgpu_sys/mod.rs index 49bcd32fd..14a7fd2bd 100644 --- a/wgpu/src/backend/webgpu/webgpu_sys/mod.rs +++ b/wgpu/src/backend/webgpu/webgpu_sys/mod.rs @@ -21,10 +21,13 @@ // // If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository. // -// This file was generated by the `cargo xtask vendor-web-sys --version f7e0467c4b4d88303eb79fba485320cfb4dfdd58` command. +// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.115` command. #![allow(unused_imports, non_snake_case)] -use web_sys::{Event, EventTarget}; +use web_sys::{ + Event, EventTarget, HtmlCanvasElement, HtmlImageElement, HtmlVideoElement, ImageBitmap, + ImageData, OffscreenCanvas, VideoFrame, +}; mod gen_Gpu; pub use gen_Gpu::*; mod gen_GpuAdapter; @@ -225,6 +228,8 @@ mod gen_GpuSamplerDescriptor; pub use gen_GpuSamplerDescriptor::*; mod gen_GpuShaderModule; pub use gen_GpuShaderModule::*; +mod gen_GpuShaderModuleCompilationHint; +pub use gen_GpuShaderModuleCompilationHint::*; mod gen_GpuShaderModuleDescriptor; pub use gen_GpuShaderModuleDescriptor::*; mod gen_GpuStencilFaceState; diff --git a/xtask/src/vendor_web_sys.rs b/xtask/src/vendor_web_sys.rs index 15f25f452..989882f04 100644 --- a/xtask/src/vendor_web_sys.rs +++ b/xtask/src/vendor_web_sys.rs @@ -122,6 +122,7 @@ const WEB_SYS_FEATURES_NEEDED: &[&str] = &[ "GpuSamplerBindingType", "GpuSamplerDescriptor", "GpuShaderModule", + "GpuShaderModuleCompilationHint", "GpuShaderModuleDescriptor", "GpuStencilFaceState", "GpuStencilOperation", @@ -302,7 +303,8 @@ pub(crate) fn run_vendor_web_sys(shell: Shell, mut args: Arguments) -> anyhow::R #![allow(unused_imports, non_snake_case)]\n" ); - module_file_contents.push_str("use web_sys::{Event, EventTarget};\n"); + module_file_contents + .push_str("use web_sys::{Event, EventTarget, HtmlCanvasElement, HtmlImageElement, HtmlVideoElement, OffscreenCanvas, ImageBitmap, ImageData, VideoFrame};\n"); for &feature in WEB_SYS_FEATURES_NEEDED { module_file_contents.push_str(&format!("mod gen_{feature};\n"));