mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-11 20:11:22 +00:00
Update to latest WebGPU WebIDL (#2037)
This commit is contained in:
@ -381,11 +381,11 @@ Gpu = []
|
|||||||
GpuAdapter = []
|
GpuAdapter = []
|
||||||
GpuAddressMode = []
|
GpuAddressMode = []
|
||||||
GpuBindGroup = []
|
GpuBindGroup = []
|
||||||
GpuBindGroupBinding = []
|
|
||||||
GpuBindGroupDescriptor = []
|
GpuBindGroupDescriptor = []
|
||||||
|
GpuBindGroupEntry = []
|
||||||
GpuBindGroupLayout = []
|
GpuBindGroupLayout = []
|
||||||
GpuBindGroupLayoutBinding = []
|
|
||||||
GpuBindGroupLayoutDescriptor = []
|
GpuBindGroupLayoutDescriptor = []
|
||||||
|
GpuBindGroupLayoutEntry = []
|
||||||
GpuBindingType = []
|
GpuBindingType = []
|
||||||
GpuBlendDescriptor = []
|
GpuBlendDescriptor = []
|
||||||
GpuBlendFactor = []
|
GpuBlendFactor = []
|
||||||
|
@ -4,21 +4,21 @@ use wasm_bindgen::prelude::*;
|
|||||||
#[cfg(web_sys_unstable_apis)]
|
#[cfg(web_sys_unstable_apis)]
|
||||||
#[wasm_bindgen]
|
#[wasm_bindgen]
|
||||||
extern "C" {
|
extern "C" {
|
||||||
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = GPUBindGroupBinding ) ]
|
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = GPUBindGroupEntry ) ]
|
||||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
#[doc = "The `GpuBindGroupBinding` dictionary."]
|
#[doc = "The `GpuBindGroupEntry` dictionary."]
|
||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupBinding`*"]
|
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`*"]
|
||||||
#[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 type GpuBindGroupBinding;
|
pub type GpuBindGroupEntry;
|
||||||
}
|
}
|
||||||
#[cfg(web_sys_unstable_apis)]
|
#[cfg(web_sys_unstable_apis)]
|
||||||
impl GpuBindGroupBinding {
|
impl GpuBindGroupEntry {
|
||||||
#[doc = "Construct a new `GpuBindGroupBinding`."]
|
#[doc = "Construct a new `GpuBindGroupEntry`."]
|
||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupBinding`*"]
|
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`*"]
|
||||||
#[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)*"]
|
||||||
@ -32,7 +32,7 @@ impl GpuBindGroupBinding {
|
|||||||
#[cfg(web_sys_unstable_apis)]
|
#[cfg(web_sys_unstable_apis)]
|
||||||
#[doc = "Change the `binding` field of this object."]
|
#[doc = "Change the `binding` field of this object."]
|
||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupBinding`*"]
|
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`*"]
|
||||||
#[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)*"]
|
||||||
@ -53,7 +53,7 @@ impl GpuBindGroupBinding {
|
|||||||
#[cfg(web_sys_unstable_apis)]
|
#[cfg(web_sys_unstable_apis)]
|
||||||
#[doc = "Change the `resource` field of this object."]
|
#[doc = "Change the `resource` field of this object."]
|
||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupBinding`*"]
|
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`*"]
|
||||||
#[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)*"]
|
@ -4,22 +4,22 @@ use wasm_bindgen::prelude::*;
|
|||||||
#[cfg(web_sys_unstable_apis)]
|
#[cfg(web_sys_unstable_apis)]
|
||||||
#[wasm_bindgen]
|
#[wasm_bindgen]
|
||||||
extern "C" {
|
extern "C" {
|
||||||
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = GPUBindGroupLayoutBinding ) ]
|
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = GPUBindGroupLayoutEntry ) ]
|
||||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
#[doc = "The `GpuBindGroupLayoutBinding` dictionary."]
|
#[doc = "The `GpuBindGroupLayoutEntry` dictionary."]
|
||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutBinding`*"]
|
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`*"]
|
||||||
#[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 type GpuBindGroupLayoutBinding;
|
pub type GpuBindGroupLayoutEntry;
|
||||||
}
|
}
|
||||||
#[cfg(web_sys_unstable_apis)]
|
#[cfg(web_sys_unstable_apis)]
|
||||||
impl GpuBindGroupLayoutBinding {
|
impl GpuBindGroupLayoutEntry {
|
||||||
#[cfg(feature = "GpuBindingType")]
|
#[cfg(feature = "GpuBindingType")]
|
||||||
#[doc = "Construct a new `GpuBindGroupLayoutBinding`."]
|
#[doc = "Construct a new `GpuBindGroupLayoutEntry`."]
|
||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutBinding`, `GpuBindingType`*"]
|
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuBindingType`*"]
|
||||||
#[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)*"]
|
||||||
@ -34,7 +34,7 @@ impl GpuBindGroupLayoutBinding {
|
|||||||
#[cfg(web_sys_unstable_apis)]
|
#[cfg(web_sys_unstable_apis)]
|
||||||
#[doc = "Change the `binding` field of this object."]
|
#[doc = "Change the `binding` field of this object."]
|
||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutBinding`*"]
|
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`*"]
|
||||||
#[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)*"]
|
||||||
@ -55,7 +55,7 @@ impl GpuBindGroupLayoutBinding {
|
|||||||
#[cfg(web_sys_unstable_apis)]
|
#[cfg(web_sys_unstable_apis)]
|
||||||
#[doc = "Change the `hasDynamicOffset` field of this object."]
|
#[doc = "Change the `hasDynamicOffset` field of this object."]
|
||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutBinding`*"]
|
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`*"]
|
||||||
#[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)*"]
|
||||||
@ -76,7 +76,7 @@ impl GpuBindGroupLayoutBinding {
|
|||||||
#[cfg(web_sys_unstable_apis)]
|
#[cfg(web_sys_unstable_apis)]
|
||||||
#[doc = "Change the `multisampled` field of this object."]
|
#[doc = "Change the `multisampled` field of this object."]
|
||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutBinding`*"]
|
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`*"]
|
||||||
#[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)*"]
|
||||||
@ -95,10 +95,32 @@ impl GpuBindGroupLayoutBinding {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
#[cfg(web_sys_unstable_apis)]
|
#[cfg(web_sys_unstable_apis)]
|
||||||
|
#[cfg(feature = "GpuTextureFormat")]
|
||||||
|
#[doc = "Change the `storageTextureFormat` field of this object."]
|
||||||
|
#[doc = ""]
|
||||||
|
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuTextureFormat`*"]
|
||||||
|
#[doc = ""]
|
||||||
|
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
||||||
|
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
|
||||||
|
pub fn storage_texture_format(&mut self, val: GpuTextureFormat) -> &mut Self {
|
||||||
|
use wasm_bindgen::JsValue;
|
||||||
|
let r = ::js_sys::Reflect::set(
|
||||||
|
self.as_ref(),
|
||||||
|
&JsValue::from("storageTextureFormat"),
|
||||||
|
&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 = "GpuTextureComponentType")]
|
#[cfg(feature = "GpuTextureComponentType")]
|
||||||
#[doc = "Change the `textureComponentType` field of this object."]
|
#[doc = "Change the `textureComponentType` field of this object."]
|
||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutBinding`, `GpuTextureComponentType`*"]
|
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuTextureComponentType`*"]
|
||||||
#[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)*"]
|
||||||
@ -117,32 +139,10 @@ impl GpuBindGroupLayoutBinding {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
#[cfg(web_sys_unstable_apis)]
|
#[cfg(web_sys_unstable_apis)]
|
||||||
#[cfg(feature = "GpuTextureViewDimension")]
|
|
||||||
#[doc = "Change the `textureDimension` field of this object."]
|
|
||||||
#[doc = ""]
|
|
||||||
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutBinding`, `GpuTextureViewDimension`*"]
|
|
||||||
#[doc = ""]
|
|
||||||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
|
||||||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
|
|
||||||
pub fn texture_dimension(&mut self, val: GpuTextureViewDimension) -> &mut Self {
|
|
||||||
use wasm_bindgen::JsValue;
|
|
||||||
let r = ::js_sys::Reflect::set(
|
|
||||||
self.as_ref(),
|
|
||||||
&JsValue::from("textureDimension"),
|
|
||||||
&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 = "GpuBindingType")]
|
#[cfg(feature = "GpuBindingType")]
|
||||||
#[doc = "Change the `type` field of this object."]
|
#[doc = "Change the `type` field of this object."]
|
||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutBinding`, `GpuBindingType`*"]
|
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuBindingType`*"]
|
||||||
#[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)*"]
|
||||||
@ -157,9 +157,31 @@ impl GpuBindGroupLayoutBinding {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
#[cfg(web_sys_unstable_apis)]
|
#[cfg(web_sys_unstable_apis)]
|
||||||
|
#[cfg(feature = "GpuTextureViewDimension")]
|
||||||
|
#[doc = "Change the `viewDimension` field of this object."]
|
||||||
|
#[doc = ""]
|
||||||
|
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuTextureViewDimension`*"]
|
||||||
|
#[doc = ""]
|
||||||
|
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
||||||
|
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
|
||||||
|
pub fn view_dimension(&mut self, val: GpuTextureViewDimension) -> &mut Self {
|
||||||
|
use wasm_bindgen::JsValue;
|
||||||
|
let r = ::js_sys::Reflect::set(
|
||||||
|
self.as_ref(),
|
||||||
|
&JsValue::from("viewDimension"),
|
||||||
|
&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 `visibility` field of this object."]
|
#[doc = "Change the `visibility` field of this object."]
|
||||||
#[doc = ""]
|
#[doc = ""]
|
||||||
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutBinding`*"]
|
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`*"]
|
||||||
#[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)*"]
|
@ -14,6 +14,8 @@ pub enum GpuBindingType {
|
|||||||
StorageBuffer = "storage-buffer",
|
StorageBuffer = "storage-buffer",
|
||||||
ReadonlyStorageBuffer = "readonly-storage-buffer",
|
ReadonlyStorageBuffer = "readonly-storage-buffer",
|
||||||
Sampler = "sampler",
|
Sampler = "sampler",
|
||||||
|
ComparisonSampler = "comparison-sampler",
|
||||||
SampledTexture = "sampled-texture",
|
SampledTexture = "sampled-texture",
|
||||||
StorageTexture = "storage-texture",
|
ReadonlyStorageTexture = "readonly-storage-texture",
|
||||||
|
WriteonlyStorageTexture = "writeonly-storage-texture",
|
||||||
}
|
}
|
||||||
|
@ -23,11 +23,10 @@ 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, image_height: u32, row_pitch: u32) -> Self {
|
pub fn new(buffer: &GpuBuffer, row_pitch: 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.image_height(image_height);
|
|
||||||
ret.row_pitch(row_pitch);
|
ret.row_pitch(row_pitch);
|
||||||
ret
|
ret
|
||||||
}
|
}
|
||||||
|
@ -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: &::wasm_bindgen::JsValue) -> Self {
|
pub fn new(code: &str) -> 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: &::wasm_bindgen::JsValue) -> &mut Self {
|
pub fn code(&mut self, val: &str) -> &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!(
|
||||||
|
@ -2104,36 +2104,36 @@ mod gen_GpuBindGroup;
|
|||||||
#[cfg(feature = "GpuBindGroup")]
|
#[cfg(feature = "GpuBindGroup")]
|
||||||
pub use gen_GpuBindGroup::*;
|
pub use gen_GpuBindGroup::*;
|
||||||
|
|
||||||
#[cfg(feature = "GpuBindGroupBinding")]
|
|
||||||
#[allow(non_snake_case)]
|
|
||||||
mod gen_GpuBindGroupBinding;
|
|
||||||
#[cfg(feature = "GpuBindGroupBinding")]
|
|
||||||
pub use gen_GpuBindGroupBinding::*;
|
|
||||||
|
|
||||||
#[cfg(feature = "GpuBindGroupDescriptor")]
|
#[cfg(feature = "GpuBindGroupDescriptor")]
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
mod gen_GpuBindGroupDescriptor;
|
mod gen_GpuBindGroupDescriptor;
|
||||||
#[cfg(feature = "GpuBindGroupDescriptor")]
|
#[cfg(feature = "GpuBindGroupDescriptor")]
|
||||||
pub use gen_GpuBindGroupDescriptor::*;
|
pub use gen_GpuBindGroupDescriptor::*;
|
||||||
|
|
||||||
|
#[cfg(feature = "GpuBindGroupEntry")]
|
||||||
|
#[allow(non_snake_case)]
|
||||||
|
mod gen_GpuBindGroupEntry;
|
||||||
|
#[cfg(feature = "GpuBindGroupEntry")]
|
||||||
|
pub use gen_GpuBindGroupEntry::*;
|
||||||
|
|
||||||
#[cfg(feature = "GpuBindGroupLayout")]
|
#[cfg(feature = "GpuBindGroupLayout")]
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
mod gen_GpuBindGroupLayout;
|
mod gen_GpuBindGroupLayout;
|
||||||
#[cfg(feature = "GpuBindGroupLayout")]
|
#[cfg(feature = "GpuBindGroupLayout")]
|
||||||
pub use gen_GpuBindGroupLayout::*;
|
pub use gen_GpuBindGroupLayout::*;
|
||||||
|
|
||||||
#[cfg(feature = "GpuBindGroupLayoutBinding")]
|
|
||||||
#[allow(non_snake_case)]
|
|
||||||
mod gen_GpuBindGroupLayoutBinding;
|
|
||||||
#[cfg(feature = "GpuBindGroupLayoutBinding")]
|
|
||||||
pub use gen_GpuBindGroupLayoutBinding::*;
|
|
||||||
|
|
||||||
#[cfg(feature = "GpuBindGroupLayoutDescriptor")]
|
#[cfg(feature = "GpuBindGroupLayoutDescriptor")]
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
mod gen_GpuBindGroupLayoutDescriptor;
|
mod gen_GpuBindGroupLayoutDescriptor;
|
||||||
#[cfg(feature = "GpuBindGroupLayoutDescriptor")]
|
#[cfg(feature = "GpuBindGroupLayoutDescriptor")]
|
||||||
pub use gen_GpuBindGroupLayoutDescriptor::*;
|
pub use gen_GpuBindGroupLayoutDescriptor::*;
|
||||||
|
|
||||||
|
#[cfg(feature = "GpuBindGroupLayoutEntry")]
|
||||||
|
#[allow(non_snake_case)]
|
||||||
|
mod gen_GpuBindGroupLayoutEntry;
|
||||||
|
#[cfg(feature = "GpuBindGroupLayoutEntry")]
|
||||||
|
pub use gen_GpuBindGroupLayoutEntry::*;
|
||||||
|
|
||||||
#[cfg(feature = "GpuBindingType")]
|
#[cfg(feature = "GpuBindingType")]
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
mod gen_GpuBindingType;
|
mod gen_GpuBindingType;
|
||||||
|
23
crates/web-sys/webidls/unstable/WebGPU.webidl
vendored
23
crates/web-sys/webidls/unstable/WebGPU.webidl
vendored
@ -246,7 +246,7 @@ dictionary GPUSamplerDescriptor : GPUObjectDescriptorBase {
|
|||||||
GPUFilterMode mipmapFilter = "nearest";
|
GPUFilterMode mipmapFilter = "nearest";
|
||||||
float lodMinClamp = 0;
|
float lodMinClamp = 0;
|
||||||
float lodMaxClamp = 0xffffffff; // TODO: What should this be? Was Number.MAX_VALUE.
|
float lodMaxClamp = 0xffffffff; // TODO: What should this be? Was Number.MAX_VALUE.
|
||||||
GPUCompareFunction compare = "never";
|
GPUCompareFunction compare;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum GPUAddressMode {
|
enum GPUAddressMode {
|
||||||
@ -277,17 +277,18 @@ interface GPUBindGroupLayout {
|
|||||||
GPUBindGroupLayout includes GPUObjectBase;
|
GPUBindGroupLayout includes GPUObjectBase;
|
||||||
|
|
||||||
dictionary GPUBindGroupLayoutDescriptor : GPUObjectDescriptorBase {
|
dictionary GPUBindGroupLayoutDescriptor : GPUObjectDescriptorBase {
|
||||||
required sequence<GPUBindGroupLayoutBinding> bindings;
|
required sequence<GPUBindGroupLayoutEntry> bindings;
|
||||||
};
|
};
|
||||||
|
|
||||||
dictionary GPUBindGroupLayoutBinding {
|
dictionary GPUBindGroupLayoutEntry {
|
||||||
required GPUIndex32 binding;
|
required GPUIndex32 binding;
|
||||||
required GPUShaderStageFlags visibility;
|
required GPUShaderStageFlags visibility;
|
||||||
required GPUBindingType type;
|
required GPUBindingType type;
|
||||||
GPUTextureViewDimension textureDimension = "2d";
|
GPUTextureViewDimension viewDimension = "2d";
|
||||||
GPUTextureComponentType textureComponentType = "float";
|
GPUTextureComponentType textureComponentType = "float";
|
||||||
boolean multisampled = false;
|
boolean multisampled = false;
|
||||||
boolean hasDynamicOffset = false;
|
boolean hasDynamicOffset = false;
|
||||||
|
GPUTextureFormat storageTextureFormat;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef [EnforceRange] unsigned long GPUShaderStageFlags;
|
typedef [EnforceRange] unsigned long GPUShaderStageFlags;
|
||||||
@ -302,8 +303,10 @@ enum GPUBindingType {
|
|||||||
"storage-buffer",
|
"storage-buffer",
|
||||||
"readonly-storage-buffer",
|
"readonly-storage-buffer",
|
||||||
"sampler",
|
"sampler",
|
||||||
|
"comparison-sampler",
|
||||||
"sampled-texture",
|
"sampled-texture",
|
||||||
"storage-texture"
|
"readonly-storage-texture",
|
||||||
|
"writeonly-storage-texture"
|
||||||
// TODO: other binding types
|
// TODO: other binding types
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -313,12 +316,12 @@ GPUBindGroup includes GPUObjectBase;
|
|||||||
|
|
||||||
dictionary GPUBindGroupDescriptor : GPUObjectDescriptorBase {
|
dictionary GPUBindGroupDescriptor : GPUObjectDescriptorBase {
|
||||||
required GPUBindGroupLayout layout;
|
required GPUBindGroupLayout layout;
|
||||||
required sequence<GPUBindGroupBinding> bindings;
|
required sequence<GPUBindGroupEntry> bindings;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef (GPUSampler or GPUTextureView or GPUBufferBinding) GPUBindingResource;
|
typedef (GPUSampler or GPUTextureView or GPUBufferBinding) GPUBindingResource;
|
||||||
|
|
||||||
dictionary GPUBindGroupBinding {
|
dictionary GPUBindGroupEntry {
|
||||||
required GPUIndex32 binding;
|
required GPUIndex32 binding;
|
||||||
required GPUBindingResource resource;
|
required GPUBindingResource resource;
|
||||||
};
|
};
|
||||||
@ -342,10 +345,8 @@ interface GPUShaderModule {
|
|||||||
};
|
};
|
||||||
GPUShaderModule includes GPUObjectBase;
|
GPUShaderModule includes GPUObjectBase;
|
||||||
|
|
||||||
typedef (Uint32Array or DOMString) GPUShaderCode;
|
|
||||||
|
|
||||||
dictionary GPUShaderModuleDescriptor : GPUObjectDescriptorBase {
|
dictionary GPUShaderModuleDescriptor : GPUObjectDescriptorBase {
|
||||||
required GPUShaderCode code;
|
required DOMString code;
|
||||||
};
|
};
|
||||||
|
|
||||||
dictionary GPUPipelineDescriptorBase : GPUObjectDescriptorBase {
|
dictionary GPUPipelineDescriptorBase : GPUObjectDescriptorBase {
|
||||||
@ -604,7 +605,7 @@ dictionary GPUBufferCopyView {
|
|||||||
required GPUBuffer buffer;
|
required GPUBuffer buffer;
|
||||||
GPUSize64 offset = 0;
|
GPUSize64 offset = 0;
|
||||||
required GPUSize32 rowPitch;
|
required GPUSize32 rowPitch;
|
||||||
required GPUSize32 imageHeight;
|
GPUSize32 imageHeight = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
dictionary GPUTextureCopyView {
|
dictionary GPUTextureCopyView {
|
||||||
|
Reference in New Issue
Block a user