mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-04-25 14:12:13 +00:00
Update to latest WebGPU WebIDL (#2080)
This commit is contained in:
parent
2b128288c7
commit
fc86589715
@ -435,6 +435,9 @@ GpuPipelineLayoutDescriptor = []
|
|||||||
GpuPowerPreference = []
|
GpuPowerPreference = []
|
||||||
GpuPrimitiveTopology = []
|
GpuPrimitiveTopology = []
|
||||||
GpuProgrammableStageDescriptor = []
|
GpuProgrammableStageDescriptor = []
|
||||||
|
GpuQuerySet = []
|
||||||
|
GpuQuerySetDescriptor = []
|
||||||
|
GpuQueryType = []
|
||||||
GpuQueue = []
|
GpuQueue = []
|
||||||
GpuRasterizationStateDescriptor = []
|
GpuRasterizationStateDescriptor = []
|
||||||
GpuRenderBundle = []
|
GpuRenderBundle = []
|
||||||
|
@ -23,10 +23,10 @@ impl GpuBindGroupDescriptor {
|
|||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
#[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)*"]
|
#[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)]
|
#[allow(unused_mut)]
|
||||||
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
|
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
|
||||||
ret.bindings(bindings);
|
ret.entries(entries);
|
||||||
ret.layout(layout);
|
ret.layout(layout);
|
||||||
ret
|
ret
|
||||||
}
|
}
|
||||||
@ -48,17 +48,17 @@ impl GpuBindGroupDescriptor {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
#[cfg(web_sys_unstable_apis)]
|
#[cfg(web_sys_unstable_apis)]
|
||||||
#[doc = "Change the `bindings` field of this object."]
|
#[doc = "Change the `entries` field of this object."]
|
||||||
#[doc = ""]
|
#[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`*"]
|
||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
#[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)*"]
|
#[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;
|
use wasm_bindgen::JsValue;
|
||||||
let r = ::js_sys::Reflect::set(
|
let r = ::js_sys::Reflect::set(
|
||||||
self.as_ref(),
|
self.as_ref(),
|
||||||
&JsValue::from("bindings"),
|
&JsValue::from("entries"),
|
||||||
&JsValue::from(val),
|
&JsValue::from(val),
|
||||||
);
|
);
|
||||||
debug_assert!(
|
debug_assert!(
|
||||||
|
@ -22,10 +22,10 @@ impl GpuBindGroupLayoutDescriptor {
|
|||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
#[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)*"]
|
#[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)]
|
#[allow(unused_mut)]
|
||||||
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
|
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
|
||||||
ret.bindings(bindings);
|
ret.entries(entries);
|
||||||
ret
|
ret
|
||||||
}
|
}
|
||||||
#[cfg(web_sys_unstable_apis)]
|
#[cfg(web_sys_unstable_apis)]
|
||||||
@ -46,17 +46,17 @@ impl GpuBindGroupLayoutDescriptor {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
#[cfg(web_sys_unstable_apis)]
|
#[cfg(web_sys_unstable_apis)]
|
||||||
#[doc = "Change the `bindings` field of this object."]
|
#[doc = "Change the `entries` field of this object."]
|
||||||
#[doc = ""]
|
#[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`*"]
|
||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
#[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)*"]
|
#[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;
|
use wasm_bindgen::JsValue;
|
||||||
let r = ::js_sys::Reflect::set(
|
let r = ::js_sys::Reflect::set(
|
||||||
self.as_ref(),
|
self.as_ref(),
|
||||||
&JsValue::from("bindings"),
|
&JsValue::from("entries"),
|
||||||
&JsValue::from(val),
|
&JsValue::from(val),
|
||||||
);
|
);
|
||||||
debug_assert!(
|
debug_assert!(
|
||||||
|
@ -23,11 +23,11 @@ impl GpuBufferCopyView {
|
|||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
#[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)*"]
|
#[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)]
|
#[allow(unused_mut)]
|
||||||
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
|
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
|
||||||
ret.buffer(buffer);
|
ret.buffer(buffer);
|
||||||
ret.row_pitch(row_pitch);
|
ret.bytes_per_row(bytes_per_row);
|
||||||
ret
|
ret
|
||||||
}
|
}
|
||||||
#[cfg(web_sys_unstable_apis)]
|
#[cfg(web_sys_unstable_apis)]
|
||||||
@ -50,17 +50,17 @@ impl GpuBufferCopyView {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
#[cfg(web_sys_unstable_apis)]
|
#[cfg(web_sys_unstable_apis)]
|
||||||
#[doc = "Change the `imageHeight` field of this object."]
|
#[doc = "Change the `bytesPerRow` field of this object."]
|
||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API requires the following crate features to be activated: `GpuBufferCopyView`*"]
|
#[doc = "*This API requires the following crate features to be activated: `GpuBufferCopyView`*"]
|
||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
#[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)*"]
|
#[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;
|
use wasm_bindgen::JsValue;
|
||||||
let r = ::js_sys::Reflect::set(
|
let r = ::js_sys::Reflect::set(
|
||||||
self.as_ref(),
|
self.as_ref(),
|
||||||
&JsValue::from("imageHeight"),
|
&JsValue::from("bytesPerRow"),
|
||||||
&JsValue::from(val),
|
&JsValue::from(val),
|
||||||
);
|
);
|
||||||
debug_assert!(
|
debug_assert!(
|
||||||
@ -89,17 +89,17 @@ impl GpuBufferCopyView {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
#[cfg(web_sys_unstable_apis)]
|
#[cfg(web_sys_unstable_apis)]
|
||||||
#[doc = "Change the `rowPitch` field of this object."]
|
#[doc = "Change the `rowsPerImage` field of this object."]
|
||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API requires the following crate features to be activated: `GpuBufferCopyView`*"]
|
#[doc = "*This API requires the following crate features to be activated: `GpuBufferCopyView`*"]
|
||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
#[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)*"]
|
#[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;
|
use wasm_bindgen::JsValue;
|
||||||
let r = ::js_sys::Reflect::set(
|
let r = ::js_sys::Reflect::set(
|
||||||
self.as_ref(),
|
self.as_ref(),
|
||||||
&JsValue::from("rowPitch"),
|
&JsValue::from("rowsPerImage"),
|
||||||
&JsValue::from(val),
|
&JsValue::from(val),
|
||||||
);
|
);
|
||||||
debug_assert!(
|
debug_assert!(
|
||||||
|
@ -90,4 +90,12 @@ impl GpuBufferUsage {
|
|||||||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
#[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)*"]
|
#[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;
|
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;
|
||||||
}
|
}
|
||||||
|
@ -404,4 +404,42 @@ extern "C" {
|
|||||||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
#[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)*"]
|
#[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);
|
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,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
@ -224,6 +224,18 @@ extern "C" {
|
|||||||
descriptor: &GpuPipelineLayoutDescriptor,
|
descriptor: &GpuPipelineLayoutDescriptor,
|
||||||
) -> GpuPipelineLayout;
|
) -> GpuPipelineLayout;
|
||||||
#[cfg(web_sys_unstable_apis)]
|
#[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(
|
#[cfg(all(
|
||||||
feature = "GpuRenderBundleEncoder",
|
feature = "GpuRenderBundleEncoder",
|
||||||
feature = "GpuRenderBundleEncoderDescriptor",
|
feature = "GpuRenderBundleEncoderDescriptor",
|
||||||
|
51
crates/web-sys/src/features/gen_GpuQuerySet.rs
Normal file
51
crates/web-sys/src/features/gen_GpuQuerySet.rs
Normal 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);
|
||||||
|
}
|
85
crates/web-sys/src/features/gen_GpuQuerySetDescriptor.rs
Normal file
85
crates/web-sys/src/features/gen_GpuQuerySetDescriptor.rs
Normal 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
|
||||||
|
}
|
||||||
|
}
|
14
crates/web-sys/src/features/gen_GpuQueryType.rs
Normal file
14
crates/web-sys/src/features/gen_GpuQueryType.rs
Normal 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",
|
||||||
|
}
|
@ -174,7 +174,49 @@ extern "C" {
|
|||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
#[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)*"]
|
#[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,
|
this: &GpuRenderBundleEncoder,
|
||||||
vertex_count: u32,
|
vertex_count: u32,
|
||||||
instance_count: u32,
|
instance_count: u32,
|
||||||
@ -191,7 +233,66 @@ extern "C" {
|
|||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
#[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)*"]
|
#[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,
|
this: &GpuRenderBundleEncoder,
|
||||||
index_count: u32,
|
index_count: u32,
|
||||||
instance_count: u32,
|
instance_count: u32,
|
||||||
@ -308,6 +409,74 @@ extern "C" {
|
|||||||
offset: f64,
|
offset: f64,
|
||||||
);
|
);
|
||||||
#[cfg(web_sys_unstable_apis)]
|
#[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")]
|
#[cfg(feature = "GpuRenderPipeline")]
|
||||||
# [ wasm_bindgen ( method , structural , js_class = "GPURenderBundleEncoder" , js_name = setPipeline ) ]
|
# [ wasm_bindgen ( method , structural , js_class = "GPURenderBundleEncoder" , js_name = setPipeline ) ]
|
||||||
#[doc = "The `setPipeline()` method."]
|
#[doc = "The `setPipeline()` method."]
|
||||||
@ -365,4 +534,76 @@ extern "C" {
|
|||||||
buffer: &GpuBuffer,
|
buffer: &GpuBuffer,
|
||||||
offset: f64,
|
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,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
@ -91,4 +91,26 @@ impl GpuRenderPassDescriptor {
|
|||||||
let _ = r;
|
let _ = r;
|
||||||
self
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -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)*"]
|
#[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>);
|
pub fn set_label(this: &GpuRenderPassEncoder, value: Option<&str>);
|
||||||
#[cfg(web_sys_unstable_apis)]
|
#[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 ) ]
|
# [ wasm_bindgen ( method , structural , js_class = "GPURenderPassEncoder" , js_name = endPass ) ]
|
||||||
#[doc = "The `endPass()` method."]
|
#[doc = "The `endPass()` method."]
|
||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
@ -236,7 +258,49 @@ extern "C" {
|
|||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
#[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)*"]
|
#[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,
|
this: &GpuRenderPassEncoder,
|
||||||
vertex_count: u32,
|
vertex_count: u32,
|
||||||
instance_count: u32,
|
instance_count: u32,
|
||||||
@ -253,7 +317,66 @@ extern "C" {
|
|||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
#[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)*"]
|
#[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,
|
this: &GpuRenderPassEncoder,
|
||||||
index_count: u32,
|
index_count: u32,
|
||||||
instance_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)*"]
|
#[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);
|
pub fn set_index_buffer_with_f64(this: &GpuRenderPassEncoder, buffer: &GpuBuffer, offset: f64);
|
||||||
#[cfg(web_sys_unstable_apis)]
|
#[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")]
|
#[cfg(feature = "GpuRenderPipeline")]
|
||||||
# [ wasm_bindgen ( method , structural , js_class = "GPURenderPassEncoder" , js_name = setPipeline ) ]
|
# [ wasm_bindgen ( method , structural , js_class = "GPURenderPassEncoder" , js_name = setPipeline ) ]
|
||||||
#[doc = "The `setPipeline()` method."]
|
#[doc = "The `setPipeline()` method."]
|
||||||
@ -419,4 +610,76 @@ extern "C" {
|
|||||||
buffer: &GpuBuffer,
|
buffer: &GpuBuffer,
|
||||||
offset: f64,
|
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,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ impl GpuShaderModuleDescriptor {
|
|||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
#[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)*"]
|
#[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)]
|
#[allow(unused_mut)]
|
||||||
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
|
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
|
||||||
ret.code(code);
|
ret.code(code);
|
||||||
@ -52,7 +52,7 @@ impl GpuShaderModuleDescriptor {
|
|||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
#[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)*"]
|
#[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;
|
use wasm_bindgen::JsValue;
|
||||||
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("code"), &JsValue::from(val));
|
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("code"), &JsValue::from(val));
|
||||||
debug_assert!(
|
debug_assert!(
|
||||||
|
@ -49,27 +49,6 @@ impl GpuTextureDescriptor {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
#[cfg(web_sys_unstable_apis)]
|
#[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")]
|
#[cfg(feature = "GpuTextureDimension")]
|
||||||
#[doc = "Change the `dimension` field of this object."]
|
#[doc = "Change the `dimension` field of this object."]
|
||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
|
@ -2428,6 +2428,24 @@ mod gen_GpuProgrammableStageDescriptor;
|
|||||||
#[cfg(feature = "GpuProgrammableStageDescriptor")]
|
#[cfg(feature = "GpuProgrammableStageDescriptor")]
|
||||||
pub use gen_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")]
|
#[cfg(feature = "GpuQueue")]
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
mod gen_GpuQueue;
|
mod gen_GpuQueue;
|
||||||
|
57
crates/web-sys/webidls/unstable/WebGPU.webidl
vendored
57
crates/web-sys/webidls/unstable/WebGPU.webidl
vendored
@ -81,6 +81,8 @@ interface GPUDevice : EventTarget {
|
|||||||
|
|
||||||
GPUCommandEncoder createCommandEncoder(optional GPUCommandEncoderDescriptor descriptor = {});
|
GPUCommandEncoder createCommandEncoder(optional GPUCommandEncoderDescriptor descriptor = {});
|
||||||
GPURenderBundleEncoder createRenderBundleEncoder(GPURenderBundleEncoderDescriptor descriptor);
|
GPURenderBundleEncoder createRenderBundleEncoder(GPURenderBundleEncoderDescriptor descriptor);
|
||||||
|
|
||||||
|
GPUQuerySet createQuerySet(GPUQuerySetDescriptor descriptor);
|
||||||
};
|
};
|
||||||
GPUDevice includes GPUObjectBase;
|
GPUDevice includes GPUObjectBase;
|
||||||
|
|
||||||
@ -110,6 +112,7 @@ interface GPUBufferUsage {
|
|||||||
const GPUBufferUsageFlags UNIFORM = 0x0040;
|
const GPUBufferUsageFlags UNIFORM = 0x0040;
|
||||||
const GPUBufferUsageFlags STORAGE = 0x0080;
|
const GPUBufferUsageFlags STORAGE = 0x0080;
|
||||||
const GPUBufferUsageFlags INDIRECT = 0x0100;
|
const GPUBufferUsageFlags INDIRECT = 0x0100;
|
||||||
|
const GPUBufferUsageFlags QUERY_RESOLVE = 0x0200;
|
||||||
};
|
};
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
@ -122,7 +125,6 @@ GPUTexture includes GPUObjectBase;
|
|||||||
|
|
||||||
dictionary GPUTextureDescriptor : GPUObjectDescriptorBase {
|
dictionary GPUTextureDescriptor : GPUObjectDescriptorBase {
|
||||||
required GPUExtent3D size;
|
required GPUExtent3D size;
|
||||||
GPUIntegerCoordinate arrayLayerCount = 1;
|
|
||||||
GPUIntegerCoordinate mipLevelCount = 1;
|
GPUIntegerCoordinate mipLevelCount = 1;
|
||||||
GPUSize32 sampleCount = 1;
|
GPUSize32 sampleCount = 1;
|
||||||
GPUTextureDimension dimension = "2d";
|
GPUTextureDimension dimension = "2d";
|
||||||
@ -277,7 +279,7 @@ interface GPUBindGroupLayout {
|
|||||||
GPUBindGroupLayout includes GPUObjectBase;
|
GPUBindGroupLayout includes GPUObjectBase;
|
||||||
|
|
||||||
dictionary GPUBindGroupLayoutDescriptor : GPUObjectDescriptorBase {
|
dictionary GPUBindGroupLayoutDescriptor : GPUObjectDescriptorBase {
|
||||||
required sequence<GPUBindGroupLayoutEntry> bindings;
|
required sequence<GPUBindGroupLayoutEntry> entries;
|
||||||
};
|
};
|
||||||
|
|
||||||
dictionary GPUBindGroupLayoutEntry {
|
dictionary GPUBindGroupLayoutEntry {
|
||||||
@ -286,9 +288,9 @@ dictionary GPUBindGroupLayoutEntry {
|
|||||||
required GPUBindingType type;
|
required GPUBindingType type;
|
||||||
GPUTextureViewDimension viewDimension = "2d";
|
GPUTextureViewDimension viewDimension = "2d";
|
||||||
GPUTextureComponentType textureComponentType = "float";
|
GPUTextureComponentType textureComponentType = "float";
|
||||||
|
GPUTextureFormat storageTextureFormat;
|
||||||
boolean multisampled = false;
|
boolean multisampled = false;
|
||||||
boolean hasDynamicOffset = false;
|
boolean hasDynamicOffset = false;
|
||||||
GPUTextureFormat storageTextureFormat;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef [EnforceRange] unsigned long GPUShaderStageFlags;
|
typedef [EnforceRange] unsigned long GPUShaderStageFlags;
|
||||||
@ -316,7 +318,7 @@ GPUBindGroup includes GPUObjectBase;
|
|||||||
|
|
||||||
dictionary GPUBindGroupDescriptor : GPUObjectDescriptorBase {
|
dictionary GPUBindGroupDescriptor : GPUObjectDescriptorBase {
|
||||||
required GPUBindGroupLayout layout;
|
required GPUBindGroupLayout layout;
|
||||||
required sequence<GPUBindGroupEntry> bindings;
|
required sequence<GPUBindGroupEntry> entries;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef (GPUSampler or GPUTextureView or GPUBufferBinding) GPUBindingResource;
|
typedef (GPUSampler or GPUTextureView or GPUBufferBinding) GPUBindingResource;
|
||||||
@ -345,8 +347,10 @@ interface GPUShaderModule {
|
|||||||
};
|
};
|
||||||
GPUShaderModule includes GPUObjectBase;
|
GPUShaderModule includes GPUObjectBase;
|
||||||
|
|
||||||
|
typedef (DOMString or Uint32Array) GPUCode;
|
||||||
|
|
||||||
dictionary GPUShaderModuleDescriptor : GPUObjectDescriptorBase {
|
dictionary GPUShaderModuleDescriptor : GPUObjectDescriptorBase {
|
||||||
required DOMString code;
|
required GPUCode code;
|
||||||
};
|
};
|
||||||
|
|
||||||
dictionary GPUPipelineDescriptorBase : GPUObjectDescriptorBase {
|
dictionary GPUPipelineDescriptorBase : GPUObjectDescriptorBase {
|
||||||
@ -593,6 +597,13 @@ interface GPUCommandEncoder {
|
|||||||
void popDebugGroup();
|
void popDebugGroup();
|
||||||
void insertDebugMarker(DOMString markerLabel);
|
void insertDebugMarker(DOMString markerLabel);
|
||||||
|
|
||||||
|
void resolveQuerySet(
|
||||||
|
GPUQuerySet querySet,
|
||||||
|
GPUSize32 firstQuery,
|
||||||
|
GPUSize32 queryCount,
|
||||||
|
GPUBuffer destination,
|
||||||
|
GPUSize64 destinationOffset);
|
||||||
|
|
||||||
GPUCommandBuffer finish(optional GPUCommandBufferDescriptor descriptor = {});
|
GPUCommandBuffer finish(optional GPUCommandBufferDescriptor descriptor = {});
|
||||||
};
|
};
|
||||||
GPUCommandEncoder includes GPUObjectBase;
|
GPUCommandEncoder includes GPUObjectBase;
|
||||||
@ -604,8 +615,8 @@ dictionary GPUCommandEncoderDescriptor : GPUObjectDescriptorBase {
|
|||||||
dictionary GPUBufferCopyView {
|
dictionary GPUBufferCopyView {
|
||||||
required GPUBuffer buffer;
|
required GPUBuffer buffer;
|
||||||
GPUSize64 offset = 0;
|
GPUSize64 offset = 0;
|
||||||
required GPUSize32 rowPitch;
|
required GPUSize32 bytesPerRow;
|
||||||
GPUSize32 imageHeight = 0;
|
GPUSize32 rowsPerImage = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
dictionary GPUTextureCopyView {
|
dictionary GPUTextureCopyView {
|
||||||
@ -650,13 +661,15 @@ dictionary GPUComputePassDescriptor : GPUObjectDescriptorBase {
|
|||||||
interface mixin GPURenderEncoderBase {
|
interface mixin GPURenderEncoderBase {
|
||||||
void setPipeline(GPURenderPipeline pipeline);
|
void setPipeline(GPURenderPipeline pipeline);
|
||||||
|
|
||||||
void setIndexBuffer(GPUBuffer buffer, optional GPUSize64 offset = 0);
|
void setIndexBuffer(GPUBuffer buffer, optional GPUSize64 offset = 0, optional GPUSize64 size = 0);
|
||||||
void setVertexBuffer(GPUIndex32 slot, GPUBuffer buffer, optional GPUSize64 offset = 0);
|
void setVertexBuffer(GPUIndex32 slot, GPUBuffer buffer, optional GPUSize64 offset = 0, optional GPUSize64 size = 0);
|
||||||
|
|
||||||
void draw(GPUSize32 vertexCount, GPUSize32 instanceCount,
|
void draw(GPUSize32 vertexCount, optional GPUSize32 instanceCount = 1,
|
||||||
GPUSize32 firstVertex, GPUSize32 firstInstance);
|
optional GPUSize32 firstVertex = 0, optional GPUSize32 firstInstance = 0);
|
||||||
void drawIndexed(GPUSize32 indexCount, GPUSize32 instanceCount,
|
void drawIndexed(GPUSize32 indexCount, optional GPUSize32 instanceCount = 1,
|
||||||
GPUSize32 firstIndex, GPUSignedOffset32 baseVertex, GPUSize32 firstInstance);
|
optional GPUSize32 firstIndex = 0,
|
||||||
|
optional GPUSignedOffset32 baseVertex = 0,
|
||||||
|
optional GPUSize32 firstInstance = 0);
|
||||||
|
|
||||||
void drawIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);
|
void drawIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);
|
||||||
void drawIndexedIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);
|
void drawIndexedIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);
|
||||||
@ -673,6 +686,9 @@ interface GPURenderPassEncoder {
|
|||||||
void setBlendColor(GPUColor color);
|
void setBlendColor(GPUColor color);
|
||||||
void setStencilReference(GPUStencilValue reference);
|
void setStencilReference(GPUStencilValue reference);
|
||||||
|
|
||||||
|
void beginOcclusionQuery(GPUSize32 queryIndex);
|
||||||
|
void endOcclusionQuery(GPUSize32 queryIndex);
|
||||||
|
|
||||||
void executeBundles(sequence<GPURenderBundle> bundles);
|
void executeBundles(sequence<GPURenderBundle> bundles);
|
||||||
void endPass();
|
void endPass();
|
||||||
};
|
};
|
||||||
@ -683,6 +699,7 @@ GPURenderPassEncoder includes GPURenderEncoderBase;
|
|||||||
dictionary GPURenderPassDescriptor : GPUObjectDescriptorBase {
|
dictionary GPURenderPassDescriptor : GPUObjectDescriptorBase {
|
||||||
required sequence<GPURenderPassColorAttachmentDescriptor> colorAttachments;
|
required sequence<GPURenderPassColorAttachmentDescriptor> colorAttachments;
|
||||||
GPURenderPassDepthStencilAttachmentDescriptor depthStencilAttachment;
|
GPURenderPassDepthStencilAttachmentDescriptor depthStencilAttachment;
|
||||||
|
GPUQuerySet occlusionQuerySet;
|
||||||
};
|
};
|
||||||
|
|
||||||
dictionary GPURenderPassColorAttachmentDescriptor {
|
dictionary GPURenderPassColorAttachmentDescriptor {
|
||||||
@ -755,6 +772,20 @@ dictionary GPUFenceDescriptor : GPUObjectDescriptorBase {
|
|||||||
GPUFenceValue initialValue = 0;
|
GPUFenceValue initialValue = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
interface GPUQuerySet {
|
||||||
|
void destroy();
|
||||||
|
};
|
||||||
|
GPUQuerySet includes GPUObjectBase;
|
||||||
|
|
||||||
|
dictionary GPUQuerySetDescriptor : GPUObjectDescriptorBase {
|
||||||
|
required GPUQueryType type;
|
||||||
|
required GPUSize32 count;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum GPUQueryType {
|
||||||
|
"occlusion"
|
||||||
|
};
|
||||||
|
|
||||||
interface GPUCanvasContext {
|
interface GPUCanvasContext {
|
||||||
GPUSwapChain configureSwapChain(GPUSwapChainDescriptor descriptor);
|
GPUSwapChain configureSwapChain(GPUSwapChainDescriptor descriptor);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user