mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-06-01 09:09:48 +09:00
Re-vendor WebGPU (#9090)
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -316,6 +316,7 @@ web-sys = { workspace = true, optional = true, features = [
|
||||
"HtmlCanvasElement",
|
||||
"WebGl2RenderingContext",
|
||||
"OffscreenCanvas",
|
||||
"VideoFrame",
|
||||
] }
|
||||
js-sys = { workspace = true, optional = true, default-features = true }
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<js_sys::Number> {
|
||||
let object = js_sys::Object::<js_sys::Number>::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<wasm_bindgen::JsValue, wasm_bindgen::JsValue>;
|
||||
|
||||
fn future_request_adapter(
|
||||
result: JsFutureResult,
|
||||
result: Result<js_sys::JsOption<webgpu_sys::GpuAdapter>, wasm_bindgen::JsValue>,
|
||||
requested_backends: Backends,
|
||||
) -> Result<dispatch::DispatchAdapter, wgt::RequestAdapterError> {
|
||||
let web_adapter: Option<webgpu_sys::GpuAdapter> =
|
||||
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<webgpu_sys::GpuDevice, wasm_bindgen::JsValue>,
|
||||
) -> 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<crate::Error> {
|
||||
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<js_sys::JsOption<webgpu_sys::GpuError>, wasm_bindgen::JsValue>,
|
||||
) -> Option<crate::Error> {
|
||||
Some(crate::Error::from_js(result.ok()?.into_option()?.into()))
|
||||
}
|
||||
|
||||
fn future_compilation_info(
|
||||
result: JsFutureResult,
|
||||
result: Result<webgpu_sys::GpuCompilationInfo, wasm_bindgen::JsValue>,
|
||||
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<F, T>(promise: &Promise, callback: F, success_value: T, failure_value: T)
|
||||
where
|
||||
fn register_then_closures<F, T>(
|
||||
promise: &Promise<js_sys::Undefined>,
|
||||
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::<js_sys::JsString>()
|
||||
.unwrap(),
|
||||
)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.collect::<js_sys::Array>();
|
||||
.collect::<Vec<js_sys::JsString>>();
|
||||
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::<js_sys::Array>();
|
||||
.collect::<Vec<webgpu_sys::GpuBindGroupLayoutEntry>>();
|
||||
|
||||
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::<js_sys::Array>();
|
||||
.collect::<Vec<webgpu_sys::GpuBindGroupEntry>>();
|
||||
|
||||
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::<js_sys::Array>();
|
||||
.collect::<Vec<js_sys::JsOption<webgpu_sys::GpuBindGroupLayout>>>();
|
||||
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::<js_sys::Array>();
|
||||
.collect::<Vec<webgpu_sys::GpuVertexAttribute>>();
|
||||
|
||||
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::<js_sys::Array>();
|
||||
.collect::<Vec<js_sys::JsOption<webgpu_sys::GpuVertexBufferLayout>>>();
|
||||
|
||||
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::<js_sys::Array>();
|
||||
.collect::<Vec<js_sys::JsOption<webgpu_sys::GpuColorTargetState>>>();
|
||||
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::<js_sys::Array>();
|
||||
.map(|format| {
|
||||
wasm_bindgen::JsValue::from(map_texture_format(*format))
|
||||
.dyn_into::<js_sys::JsString>()
|
||||
.unwrap()
|
||||
})
|
||||
.collect::<Vec<js_sys::JsString>>();
|
||||
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::<js_sys::JsString>()
|
||||
.unwrap(),
|
||||
),
|
||||
None => js_sys::JsOption::new(),
|
||||
})
|
||||
.collect::<js_sys::Array>();
|
||||
.collect::<Vec<js_sys::JsOption<js_sys::JsString>>>();
|
||||
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::<webgpu_sys::GpuDeviceLostInfo>().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::<js_sys::Array>();
|
||||
.map(|buffer| buffer.as_webgpu().inner.clone())
|
||||
.collect::<Vec<webgpu_sys::GpuCommandBuffer>>();
|
||||
|
||||
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<wasm_bindgen::JsValue> = 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::<js_sys::Array>();
|
||||
.collect::<Vec<js_sys::JsOption<webgpu_sys::GpuRenderPassColorAttachment>>>();
|
||||
|
||||
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<Item = &dispatch::DispatchRenderBundle>,
|
||||
) {
|
||||
let mapped = render_bundles
|
||||
.map(|bundle| &bundle.as_webgpu().inner)
|
||||
.collect::<js_sys::Array>();
|
||||
.map(|bundle| bundle.as_webgpu().inner.clone())
|
||||
.collect::<Vec<webgpu_sys::GpuRenderBundle>>();
|
||||
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::<js_sys::Array>();
|
||||
.map(|format| {
|
||||
wasm_bindgen::JsValue::from(map_texture_format(*format))
|
||||
.dyn_into::<js_sys::JsString>()
|
||||
.unwrap()
|
||||
})
|
||||
.collect::<Vec<js_sys::JsString>>();
|
||||
mapped.set_view_formats(&mapped_view_formats);
|
||||
self.context.configure(&mapped).unwrap();
|
||||
}
|
||||
|
||||
10
wgpu/src/backend/webgpu/webgpu_sys/gen_Gpu.rs
generated
10
wgpu/src/backend/webgpu/webgpu_sys/gen_Gpu.rs
generated
@@ -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<GpuAdapter>>;
|
||||
|
||||
# [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<GpuAdapter>>;
|
||||
}
|
||||
|
||||
27
wgpu/src/backend/webgpu/webgpu_sys/gen_GpuAdapter.rs
generated
27
wgpu/src/backend/webgpu/webgpu_sys/gen_GpuAdapter.rs
generated
@@ -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<GpuDevice>;
|
||||
|
||||
# [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<GpuDevice>;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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<GpuBindGroupEntry>;
|
||||
|
||||
#[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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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<GpuBindGroupLayoutEntry>;
|
||||
|
||||
#[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
|
||||
}
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
24
wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBuffer.rs
generated
24
wgpu/src/backend/webgpu/webgpu_sys/gen_GpuBuffer.rs
generated
@@ -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."]
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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)]
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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<GpuCompilationMessage>;
|
||||
}
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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)]
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
18
wgpu/src/backend/webgpu/webgpu_sys/gen_GpuDevice.rs
generated
18
wgpu/src/backend/webgpu/webgpu_sys/gen_GpuDevice.rs
generated
@@ -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<GpuDeviceLostInfo>;
|
||||
|
||||
# [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<GpuComputePipeline>;
|
||||
|
||||
# [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<GpuRenderPipeline>;
|
||||
|
||||
# [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<GpuError>>;
|
||||
|
||||
# [wasm_bindgen (method , structural , js_class = "GPUDevice" , js_name = pushErrorScope)]
|
||||
#[doc = "The `pushErrorScope()` method."]
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
}
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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<GpuColorTargetState>>;
|
||||
|
||||
#[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<GpuColorTargetState>]);
|
||||
}
|
||||
|
||||
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<GpuColorTargetState>],
|
||||
) -> 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<GpuColorTargetState>]) -> &mut Self {
|
||||
self.set_targets(val);
|
||||
self
|
||||
}
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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<GpuBindGroupLayout>>;
|
||||
|
||||
#[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<GpuBindGroupLayout>],
|
||||
);
|
||||
}
|
||||
|
||||
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<GpuBindGroupLayout>]) -> 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<GpuBindGroupLayout>],
|
||||
) -> &mut Self {
|
||||
self.set_bind_group_layouts(val);
|
||||
self
|
||||
}
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
16
wgpu/src/backend/webgpu/webgpu_sys/gen_GpuQueue.rs
generated
16
wgpu/src/backend/webgpu/webgpu_sys/gen_GpuQueue.rs
generated
@@ -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)]
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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)]
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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<GpuTextureView>;
|
||||
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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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<GpuRenderPassColorAttachment>>;
|
||||
|
||||
#[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<GpuRenderPassColorAttachment>],
|
||||
);
|
||||
|
||||
#[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<GpuRenderPassColorAttachment>]) -> 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<GpuRenderPassColorAttachment>],
|
||||
) -> &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
|
||||
}
|
||||
|
||||
@@ -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)]
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user