Update to latest WebGPU WebIDL (#2080)

This commit is contained in:
Josh Groves
2020-04-13 12:00:37 -02:30
committed by GitHub
parent 2b128288c7
commit fc86589715
17 changed files with 832 additions and 67 deletions

View File

@ -23,10 +23,10 @@ impl GpuBindGroupDescriptor {
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new(bindings: &::wasm_bindgen::JsValue, layout: &GpuBindGroupLayout) -> Self {
pub fn new(entries: &::wasm_bindgen::JsValue, layout: &GpuBindGroupLayout) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.bindings(bindings);
ret.entries(entries);
ret.layout(layout);
ret
}
@ -48,17 +48,17 @@ impl GpuBindGroupDescriptor {
self
}
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `bindings` field of this object."]
#[doc = "Change the `entries` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn bindings(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
pub fn entries(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("bindings"),
&JsValue::from("entries"),
&JsValue::from(val),
);
debug_assert!(

View File

@ -22,10 +22,10 @@ impl GpuBindGroupLayoutDescriptor {
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new(bindings: &::wasm_bindgen::JsValue) -> Self {
pub fn new(entries: &::wasm_bindgen::JsValue) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.bindings(bindings);
ret.entries(entries);
ret
}
#[cfg(web_sys_unstable_apis)]
@ -46,17 +46,17 @@ impl GpuBindGroupLayoutDescriptor {
self
}
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `bindings` field of this object."]
#[doc = "Change the `entries` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn bindings(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
pub fn entries(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("bindings"),
&JsValue::from("entries"),
&JsValue::from(val),
);
debug_assert!(

View File

@ -23,11 +23,11 @@ impl GpuBufferCopyView {
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new(buffer: &GpuBuffer, row_pitch: u32) -> Self {
pub fn new(buffer: &GpuBuffer, bytes_per_row: u32) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.buffer(buffer);
ret.row_pitch(row_pitch);
ret.bytes_per_row(bytes_per_row);
ret
}
#[cfg(web_sys_unstable_apis)]
@ -50,17 +50,17 @@ impl GpuBufferCopyView {
self
}
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `imageHeight` field of this object."]
#[doc = "Change the `bytesPerRow` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBufferCopyView`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn image_height(&mut self, val: u32) -> &mut Self {
pub fn bytes_per_row(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("imageHeight"),
&JsValue::from("bytesPerRow"),
&JsValue::from(val),
);
debug_assert!(
@ -89,17 +89,17 @@ impl GpuBufferCopyView {
self
}
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `rowPitch` field of this object."]
#[doc = "Change the `rowsPerImage` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBufferCopyView`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn row_pitch(&mut self, val: u32) -> &mut Self {
pub fn rows_per_image(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("rowPitch"),
&JsValue::from("rowsPerImage"),
&JsValue::from(val),
);
debug_assert!(

View File

@ -90,4 +90,12 @@ impl GpuBufferUsage {
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub const INDIRECT: u32 = 256u64 as u32;
#[cfg(web_sys_unstable_apis)]
#[doc = "The `GPUBufferUsage.QUERY_RESOLVE` const."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBufferUsage`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub const QUERY_RESOLVE: u32 = 512u64 as u32;
}

View File

@ -404,4 +404,42 @@ 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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn push_debug_group(this: &GpuCommandEncoder, group_label: &str);
#[cfg(web_sys_unstable_apis)]
#[cfg(all(feature = "GpuBuffer", feature = "GpuQuerySet",))]
# [ wasm_bindgen ( method , structural , js_class = "GPUCommandEncoder" , js_name = resolveQuerySet ) ]
#[doc = "The `resolveQuerySet()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCommandEncoder/resolveQuerySet)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuCommandEncoder`, `GpuQuerySet`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn resolve_query_set_with_u32(
this: &GpuCommandEncoder,
query_set: &GpuQuerySet,
first_query: u32,
query_count: u32,
destination: &GpuBuffer,
destination_offset: u32,
);
#[cfg(web_sys_unstable_apis)]
#[cfg(all(feature = "GpuBuffer", feature = "GpuQuerySet",))]
# [ wasm_bindgen ( method , structural , js_class = "GPUCommandEncoder" , js_name = resolveQuerySet ) ]
#[doc = "The `resolveQuerySet()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCommandEncoder/resolveQuerySet)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuCommandEncoder`, `GpuQuerySet`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn resolve_query_set_with_f64(
this: &GpuCommandEncoder,
query_set: &GpuQuerySet,
first_query: u32,
query_count: u32,
destination: &GpuBuffer,
destination_offset: f64,
);
}

View File

@ -224,6 +224,18 @@ extern "C" {
descriptor: &GpuPipelineLayoutDescriptor,
) -> GpuPipelineLayout;
#[cfg(web_sys_unstable_apis)]
#[cfg(all(feature = "GpuQuerySet", feature = "GpuQuerySetDescriptor",))]
# [ wasm_bindgen ( method , structural , js_class = "GPUDevice" , js_name = createQuerySet ) ]
#[doc = "The `createQuerySet()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createQuerySet)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuQuerySet`, `GpuQuerySetDescriptor`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn create_query_set(this: &GpuDevice, descriptor: &GpuQuerySetDescriptor) -> GpuQuerySet;
#[cfg(web_sys_unstable_apis)]
#[cfg(all(
feature = "GpuRenderBundleEncoder",
feature = "GpuRenderBundleEncoderDescriptor",

View File

@ -0,0 +1,51 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = GPUQuerySet , typescript_type = "GPUQuerySet" ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `GpuQuerySet` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUQuerySet)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuQuerySet`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub type GpuQuerySet;
#[cfg(web_sys_unstable_apis)]
# [ wasm_bindgen ( structural , method , getter , js_class = "GPUQuerySet" , js_name = label ) ]
#[doc = "Getter for the `label` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUQuerySet/label)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuQuerySet`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn label(this: &GpuQuerySet) -> Option<String>;
#[cfg(web_sys_unstable_apis)]
# [ wasm_bindgen ( structural , method , setter , js_class = "GPUQuerySet" , js_name = label ) ]
#[doc = "Setter for the `label` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUQuerySet/label)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuQuerySet`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_label(this: &GpuQuerySet, value: Option<&str>);
#[cfg(web_sys_unstable_apis)]
# [ wasm_bindgen ( method , structural , js_class = "GPUQuerySet" , js_name = destroy ) ]
#[doc = "The `destroy()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUQuerySet/destroy)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuQuerySet`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn destroy(this: &GpuQuerySet);
}

View File

@ -0,0 +1,85 @@
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen]
extern "C" {
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = GPUQuerySetDescriptor ) ]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `GpuQuerySetDescriptor` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub type GpuQuerySetDescriptor;
}
#[cfg(web_sys_unstable_apis)]
impl GpuQuerySetDescriptor {
#[cfg(feature = "GpuQueryType")]
#[doc = "Construct a new `GpuQuerySetDescriptor`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`, `GpuQueryType`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new(count: u32, type_: GpuQueryType) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.count(count);
ret.type_(type_);
ret
}
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `label` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn label(&mut self, val: &str) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("label"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self
}
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `count` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn count(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("count"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self
}
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuQueryType")]
#[doc = "Change the `type` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`, `GpuQueryType`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn type_(&mut self, val: GpuQueryType) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("type"), &JsValue::from(val));
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self
}
}

View File

@ -0,0 +1,14 @@
#![allow(unused_imports)]
use wasm_bindgen::prelude::*;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen]
#[doc = "The `GpuQueryType` enum."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuQueryType`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum GpuQueryType {
Occlusion = "occlusion",
}

View File

@ -174,7 +174,49 @@ extern "C" {
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn draw(
pub fn draw(this: &GpuRenderBundleEncoder, vertex_count: u32);
#[cfg(web_sys_unstable_apis)]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderBundleEncoder" , js_name = draw ) ]
#[doc = "The `draw()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderBundleEncoder/draw)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoder`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn draw_with_instance_count(
this: &GpuRenderBundleEncoder,
vertex_count: u32,
instance_count: u32,
);
#[cfg(web_sys_unstable_apis)]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderBundleEncoder" , js_name = draw ) ]
#[doc = "The `draw()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderBundleEncoder/draw)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoder`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn draw_with_instance_count_and_first_vertex(
this: &GpuRenderBundleEncoder,
vertex_count: u32,
instance_count: u32,
first_vertex: u32,
);
#[cfg(web_sys_unstable_apis)]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderBundleEncoder" , js_name = draw ) ]
#[doc = "The `draw()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderBundleEncoder/draw)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoder`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn draw_with_instance_count_and_first_vertex_and_first_instance(
this: &GpuRenderBundleEncoder,
vertex_count: u32,
instance_count: u32,
@ -191,7 +233,66 @@ extern "C" {
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn draw_indexed(
pub fn draw_indexed(this: &GpuRenderBundleEncoder, index_count: u32);
#[cfg(web_sys_unstable_apis)]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderBundleEncoder" , js_name = drawIndexed ) ]
#[doc = "The `drawIndexed()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderBundleEncoder/drawIndexed)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoder`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn draw_indexed_with_instance_count(
this: &GpuRenderBundleEncoder,
index_count: u32,
instance_count: u32,
);
#[cfg(web_sys_unstable_apis)]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderBundleEncoder" , js_name = drawIndexed ) ]
#[doc = "The `drawIndexed()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderBundleEncoder/drawIndexed)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoder`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn draw_indexed_with_instance_count_and_first_index(
this: &GpuRenderBundleEncoder,
index_count: u32,
instance_count: u32,
first_index: u32,
);
#[cfg(web_sys_unstable_apis)]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderBundleEncoder" , js_name = drawIndexed ) ]
#[doc = "The `drawIndexed()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderBundleEncoder/drawIndexed)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoder`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn draw_indexed_with_instance_count_and_first_index_and_base_vertex(
this: &GpuRenderBundleEncoder,
index_count: u32,
instance_count: u32,
first_index: u32,
base_vertex: i32,
);
#[cfg(web_sys_unstable_apis)]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderBundleEncoder" , js_name = drawIndexed ) ]
#[doc = "The `drawIndexed()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderBundleEncoder/drawIndexed)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoder`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn draw_indexed_with_instance_count_and_first_index_and_base_vertex_and_first_instance(
this: &GpuRenderBundleEncoder,
index_count: u32,
instance_count: u32,
@ -308,6 +409,74 @@ extern "C" {
offset: f64,
);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuBuffer")]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderBundleEncoder" , js_name = setIndexBuffer ) ]
#[doc = "The `setIndexBuffer()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderBundleEncoder/setIndexBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuRenderBundleEncoder`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_index_buffer_with_u32_and_u32(
this: &GpuRenderBundleEncoder,
buffer: &GpuBuffer,
offset: u32,
size: u32,
);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuBuffer")]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderBundleEncoder" , js_name = setIndexBuffer ) ]
#[doc = "The `setIndexBuffer()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderBundleEncoder/setIndexBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuRenderBundleEncoder`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_index_buffer_with_f64_and_u32(
this: &GpuRenderBundleEncoder,
buffer: &GpuBuffer,
offset: f64,
size: u32,
);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuBuffer")]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderBundleEncoder" , js_name = setIndexBuffer ) ]
#[doc = "The `setIndexBuffer()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderBundleEncoder/setIndexBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuRenderBundleEncoder`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_index_buffer_with_u32_and_f64(
this: &GpuRenderBundleEncoder,
buffer: &GpuBuffer,
offset: u32,
size: f64,
);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuBuffer")]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderBundleEncoder" , js_name = setIndexBuffer ) ]
#[doc = "The `setIndexBuffer()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderBundleEncoder/setIndexBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuRenderBundleEncoder`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_index_buffer_with_f64_and_f64(
this: &GpuRenderBundleEncoder,
buffer: &GpuBuffer,
offset: f64,
size: f64,
);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuRenderPipeline")]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderBundleEncoder" , js_name = setPipeline ) ]
#[doc = "The `setPipeline()` method."]
@ -365,4 +534,76 @@ extern "C" {
buffer: &GpuBuffer,
offset: f64,
);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuBuffer")]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderBundleEncoder" , js_name = setVertexBuffer ) ]
#[doc = "The `setVertexBuffer()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderBundleEncoder/setVertexBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuRenderBundleEncoder`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_vertex_buffer_with_u32_and_u32(
this: &GpuRenderBundleEncoder,
slot: u32,
buffer: &GpuBuffer,
offset: u32,
size: u32,
);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuBuffer")]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderBundleEncoder" , js_name = setVertexBuffer ) ]
#[doc = "The `setVertexBuffer()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderBundleEncoder/setVertexBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuRenderBundleEncoder`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_vertex_buffer_with_f64_and_u32(
this: &GpuRenderBundleEncoder,
slot: u32,
buffer: &GpuBuffer,
offset: f64,
size: u32,
);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuBuffer")]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderBundleEncoder" , js_name = setVertexBuffer ) ]
#[doc = "The `setVertexBuffer()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderBundleEncoder/setVertexBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuRenderBundleEncoder`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_vertex_buffer_with_u32_and_f64(
this: &GpuRenderBundleEncoder,
slot: u32,
buffer: &GpuBuffer,
offset: u32,
size: f64,
);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuBuffer")]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderBundleEncoder" , js_name = setVertexBuffer ) ]
#[doc = "The `setVertexBuffer()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderBundleEncoder/setVertexBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuRenderBundleEncoder`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_vertex_buffer_with_f64_and_f64(
this: &GpuRenderBundleEncoder,
slot: u32,
buffer: &GpuBuffer,
offset: f64,
size: f64,
);
}

View File

@ -91,4 +91,26 @@ impl GpuRenderPassDescriptor {
let _ = r;
self
}
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuQuerySet")]
#[doc = "Change the `occlusionQuerySet` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuQuerySet`, `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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn occlusion_query_set(&mut self, val: &GpuQuerySet) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("occlusionQuerySet"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self
}
}

View File

@ -38,6 +38,28 @@ extern "C" {
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_label(this: &GpuRenderPassEncoder, value: Option<&str>);
#[cfg(web_sys_unstable_apis)]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderPassEncoder" , js_name = beginOcclusionQuery ) ]
#[doc = "The `beginOcclusionQuery()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPassEncoder/beginOcclusionQuery)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn begin_occlusion_query(this: &GpuRenderPassEncoder, query_index: u32);
#[cfg(web_sys_unstable_apis)]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderPassEncoder" , js_name = endOcclusionQuery ) ]
#[doc = "The `endOcclusionQuery()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPassEncoder/endOcclusionQuery)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn end_occlusion_query(this: &GpuRenderPassEncoder, query_index: u32);
#[cfg(web_sys_unstable_apis)]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderPassEncoder" , js_name = endPass ) ]
#[doc = "The `endPass()` method."]
#[doc = ""]
@ -236,7 +258,49 @@ extern "C" {
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn draw(
pub fn draw(this: &GpuRenderPassEncoder, vertex_count: u32);
#[cfg(web_sys_unstable_apis)]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderPassEncoder" , js_name = draw ) ]
#[doc = "The `draw()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPassEncoder/draw)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn draw_with_instance_count(
this: &GpuRenderPassEncoder,
vertex_count: u32,
instance_count: u32,
);
#[cfg(web_sys_unstable_apis)]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderPassEncoder" , js_name = draw ) ]
#[doc = "The `draw()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPassEncoder/draw)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn draw_with_instance_count_and_first_vertex(
this: &GpuRenderPassEncoder,
vertex_count: u32,
instance_count: u32,
first_vertex: u32,
);
#[cfg(web_sys_unstable_apis)]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderPassEncoder" , js_name = draw ) ]
#[doc = "The `draw()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPassEncoder/draw)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn draw_with_instance_count_and_first_vertex_and_first_instance(
this: &GpuRenderPassEncoder,
vertex_count: u32,
instance_count: u32,
@ -253,7 +317,66 @@ extern "C" {
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn draw_indexed(
pub fn draw_indexed(this: &GpuRenderPassEncoder, index_count: u32);
#[cfg(web_sys_unstable_apis)]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderPassEncoder" , js_name = drawIndexed ) ]
#[doc = "The `drawIndexed()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPassEncoder/drawIndexed)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn draw_indexed_with_instance_count(
this: &GpuRenderPassEncoder,
index_count: u32,
instance_count: u32,
);
#[cfg(web_sys_unstable_apis)]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderPassEncoder" , js_name = drawIndexed ) ]
#[doc = "The `drawIndexed()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPassEncoder/drawIndexed)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn draw_indexed_with_instance_count_and_first_index(
this: &GpuRenderPassEncoder,
index_count: u32,
instance_count: u32,
first_index: u32,
);
#[cfg(web_sys_unstable_apis)]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderPassEncoder" , js_name = drawIndexed ) ]
#[doc = "The `drawIndexed()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPassEncoder/drawIndexed)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn draw_indexed_with_instance_count_and_first_index_and_base_vertex(
this: &GpuRenderPassEncoder,
index_count: u32,
instance_count: u32,
first_index: u32,
base_vertex: i32,
);
#[cfg(web_sys_unstable_apis)]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderPassEncoder" , js_name = drawIndexed ) ]
#[doc = "The `drawIndexed()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPassEncoder/drawIndexed)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn draw_indexed_with_instance_count_and_first_index_and_base_vertex_and_first_instance(
this: &GpuRenderPassEncoder,
index_count: u32,
instance_count: u32,
@ -362,6 +485,74 @@ extern "C" {
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_index_buffer_with_f64(this: &GpuRenderPassEncoder, buffer: &GpuBuffer, offset: f64);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuBuffer")]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderPassEncoder" , js_name = setIndexBuffer ) ]
#[doc = "The `setIndexBuffer()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPassEncoder/setIndexBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_index_buffer_with_u32_and_u32(
this: &GpuRenderPassEncoder,
buffer: &GpuBuffer,
offset: u32,
size: u32,
);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuBuffer")]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderPassEncoder" , js_name = setIndexBuffer ) ]
#[doc = "The `setIndexBuffer()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPassEncoder/setIndexBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_index_buffer_with_f64_and_u32(
this: &GpuRenderPassEncoder,
buffer: &GpuBuffer,
offset: f64,
size: u32,
);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuBuffer")]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderPassEncoder" , js_name = setIndexBuffer ) ]
#[doc = "The `setIndexBuffer()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPassEncoder/setIndexBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_index_buffer_with_u32_and_f64(
this: &GpuRenderPassEncoder,
buffer: &GpuBuffer,
offset: u32,
size: f64,
);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuBuffer")]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderPassEncoder" , js_name = setIndexBuffer ) ]
#[doc = "The `setIndexBuffer()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPassEncoder/setIndexBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_index_buffer_with_f64_and_f64(
this: &GpuRenderPassEncoder,
buffer: &GpuBuffer,
offset: f64,
size: f64,
);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuRenderPipeline")]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderPassEncoder" , js_name = setPipeline ) ]
#[doc = "The `setPipeline()` method."]
@ -419,4 +610,76 @@ extern "C" {
buffer: &GpuBuffer,
offset: f64,
);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuBuffer")]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderPassEncoder" , js_name = setVertexBuffer ) ]
#[doc = "The `setVertexBuffer()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPassEncoder/setVertexBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_vertex_buffer_with_u32_and_u32(
this: &GpuRenderPassEncoder,
slot: u32,
buffer: &GpuBuffer,
offset: u32,
size: u32,
);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuBuffer")]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderPassEncoder" , js_name = setVertexBuffer ) ]
#[doc = "The `setVertexBuffer()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPassEncoder/setVertexBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_vertex_buffer_with_f64_and_u32(
this: &GpuRenderPassEncoder,
slot: u32,
buffer: &GpuBuffer,
offset: f64,
size: u32,
);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuBuffer")]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderPassEncoder" , js_name = setVertexBuffer ) ]
#[doc = "The `setVertexBuffer()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPassEncoder/setVertexBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_vertex_buffer_with_u32_and_f64(
this: &GpuRenderPassEncoder,
slot: u32,
buffer: &GpuBuffer,
offset: u32,
size: f64,
);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuBuffer")]
# [ wasm_bindgen ( method , structural , js_class = "GPURenderPassEncoder" , js_name = setVertexBuffer ) ]
#[doc = "The `setVertexBuffer()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPassEncoder/setVertexBuffer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_vertex_buffer_with_f64_and_f64(
this: &GpuRenderPassEncoder,
slot: u32,
buffer: &GpuBuffer,
offset: f64,
size: f64,
);
}

View File

@ -22,7 +22,7 @@ impl GpuShaderModuleDescriptor {
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new(code: &str) -> Self {
pub fn new(code: &::wasm_bindgen::JsValue) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.code(code);
@ -52,7 +52,7 @@ impl GpuShaderModuleDescriptor {
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn code(&mut self, val: &str) -> &mut Self {
pub fn code(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("code"), &JsValue::from(val));
debug_assert!(

View File

@ -49,27 +49,6 @@ impl GpuTextureDescriptor {
self
}
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `arrayLayerCount` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn array_layer_count(&mut self, val: u32) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("arrayLayerCount"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self
}
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuTextureDimension")]
#[doc = "Change the `dimension` field of this object."]
#[doc = ""]

View File

@ -2428,6 +2428,24 @@ mod gen_GpuProgrammableStageDescriptor;
#[cfg(feature = "GpuProgrammableStageDescriptor")]
pub use gen_GpuProgrammableStageDescriptor::*;
#[cfg(feature = "GpuQuerySet")]
#[allow(non_snake_case)]
mod gen_GpuQuerySet;
#[cfg(feature = "GpuQuerySet")]
pub use gen_GpuQuerySet::*;
#[cfg(feature = "GpuQuerySetDescriptor")]
#[allow(non_snake_case)]
mod gen_GpuQuerySetDescriptor;
#[cfg(feature = "GpuQuerySetDescriptor")]
pub use gen_GpuQuerySetDescriptor::*;
#[cfg(feature = "GpuQueryType")]
#[allow(non_snake_case)]
mod gen_GpuQueryType;
#[cfg(feature = "GpuQueryType")]
pub use gen_GpuQueryType::*;
#[cfg(feature = "GpuQueue")]
#[allow(non_snake_case)]
mod gen_GpuQueue;