Skip to content

Commit b11a4e3

Browse files
authored
Update to latest WebGPU WebIDL (#2267)
1 parent af60f47 commit b11a4e3

34 files changed

+1085
-98
lines changed

crates/web-sys/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,9 @@ GpuCommandBufferDescriptor = []
408408
GpuCommandEncoder = []
409409
GpuCommandEncoderDescriptor = []
410410
GpuCompareFunction = []
411+
GpuCompilationInfo = []
412+
GpuCompilationMessage = []
413+
GpuCompilationMessageType = []
411414
GpuComputePassDescriptor = []
412415
GpuComputePassEncoder = []
413416
GpuComputePipeline = []
@@ -436,6 +439,7 @@ GpuOutOfMemoryError = []
436439
GpuPipelineDescriptorBase = []
437440
GpuPipelineLayout = []
438441
GpuPipelineLayoutDescriptor = []
442+
GpuPipelineStatisticName = []
439443
GpuPowerPreference = []
440444
GpuPrimitiveTopology = []
441445
GpuProgrammableStageDescriptor = []
@@ -469,6 +473,7 @@ GpuTexture = []
469473
GpuTextureAspect = []
470474
GpuTextureComponentType = []
471475
GpuTextureCopyView = []
476+
GpuTextureDataLayout = []
472477
GpuTextureDescriptor = []
473478
GpuTextureDimension = []
474479
GpuTextureFormat = []

crates/web-sys/src/features/gen_GpuBindGroupLayoutEntry.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,27 @@ impl GpuBindGroupLayoutEntry {
7474
self
7575
}
7676
#[cfg(web_sys_unstable_apis)]
77+
#[doc = "Change the `minBufferBindingSize` field of this object."]
78+
#[doc = ""]
79+
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`*"]
80+
#[doc = ""]
81+
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
82+
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
83+
pub fn min_buffer_binding_size(&mut self, val: f64) -> &mut Self {
84+
use wasm_bindgen::JsValue;
85+
let r = ::js_sys::Reflect::set(
86+
self.as_ref(),
87+
&JsValue::from("minBufferBindingSize"),
88+
&JsValue::from(val),
89+
);
90+
debug_assert!(
91+
r.is_ok(),
92+
"setting properties should never fail on our dictionary objects"
93+
);
94+
let _ = r;
95+
self
96+
}
97+
#[cfg(web_sys_unstable_apis)]
7798
#[doc = "Change the `multisampled` field of this object."]
7899
#[doc = ""]
79100
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`*"]

crates/web-sys/src/features/gen_GpuBufferCopyView.rs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,33 +23,14 @@ impl GpuBufferCopyView {
2323
#[doc = ""]
2424
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
2525
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
26-
pub fn new(buffer: &GpuBuffer, bytes_per_row: u32) -> Self {
26+
pub fn new(bytes_per_row: u32, buffer: &GpuBuffer) -> Self {
2727
#[allow(unused_mut)]
2828
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
29-
ret.buffer(buffer);
3029
ret.bytes_per_row(bytes_per_row);
30+
ret.buffer(buffer);
3131
ret
3232
}
3333
#[cfg(web_sys_unstable_apis)]
34-
#[cfg(feature = "GpuBuffer")]
35-
#[doc = "Change the `buffer` field of this object."]
36-
#[doc = ""]
37-
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuBufferCopyView`*"]
38-
#[doc = ""]
39-
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
40-
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
41-
pub fn buffer(&mut self, val: &GpuBuffer) -> &mut Self {
42-
use wasm_bindgen::JsValue;
43-
let r =
44-
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("buffer"), &JsValue::from(val));
45-
debug_assert!(
46-
r.is_ok(),
47-
"setting properties should never fail on our dictionary objects"
48-
);
49-
let _ = r;
50-
self
51-
}
52-
#[cfg(web_sys_unstable_apis)]
5334
#[doc = "Change the `bytesPerRow` field of this object."]
5435
#[doc = ""]
5536
#[doc = "*This API requires the following crate features to be activated: `GpuBufferCopyView`*"]
@@ -109,4 +90,23 @@ impl GpuBufferCopyView {
10990
let _ = r;
11091
self
11192
}
93+
#[cfg(web_sys_unstable_apis)]
94+
#[cfg(feature = "GpuBuffer")]
95+
#[doc = "Change the `buffer` field of this object."]
96+
#[doc = ""]
97+
#[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuBufferCopyView`*"]
98+
#[doc = ""]
99+
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
100+
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
101+
pub fn buffer(&mut self, val: &GpuBuffer) -> &mut Self {
102+
use wasm_bindgen::JsValue;
103+
let r =
104+
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("buffer"), &JsValue::from(val));
105+
debug_assert!(
106+
r.is_ok(),
107+
"setting properties should never fail on our dictionary objects"
108+
);
109+
let _ = r;
110+
self
111+
}
112112
}

crates/web-sys/src/features/gen_GpuCommandBuffer.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@ extern "C" {
1616
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
1717
pub type GpuCommandBuffer;
1818
#[cfg(web_sys_unstable_apis)]
19+
# [ wasm_bindgen ( structural , method , getter , js_class = "GPUCommandBuffer" , js_name = executionTime ) ]
20+
#[doc = "Getter for the `executionTime` field of this object."]
21+
#[doc = ""]
22+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCommandBuffer/executionTime)"]
23+
#[doc = ""]
24+
#[doc = "*This API requires the following crate features to be activated: `GpuCommandBuffer`*"]
25+
#[doc = ""]
26+
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
27+
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
28+
pub fn execution_time(this: &GpuCommandBuffer) -> ::js_sys::Promise;
29+
#[cfg(web_sys_unstable_apis)]
1930
# [ wasm_bindgen ( structural , method , getter , js_class = "GPUCommandBuffer" , js_name = label ) ]
2031
#[doc = "Getter for the `label` field of this object."]
2132
#[doc = ""]

crates/web-sys/src/features/gen_GpuCommandEncoder.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,4 +442,16 @@ extern "C" {
442442
destination: &GpuBuffer,
443443
destination_offset: f64,
444444
);
445+
#[cfg(web_sys_unstable_apis)]
446+
#[cfg(feature = "GpuQuerySet")]
447+
# [ wasm_bindgen ( method , structural , js_class = "GPUCommandEncoder" , js_name = writeTimestamp ) ]
448+
#[doc = "The `writeTimestamp()` method."]
449+
#[doc = ""]
450+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCommandEncoder/writeTimestamp)"]
451+
#[doc = ""]
452+
#[doc = "*This API requires the following crate features to be activated: `GpuCommandEncoder`, `GpuQuerySet`*"]
453+
#[doc = ""]
454+
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
455+
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
456+
pub fn write_timestamp(this: &GpuCommandEncoder, query_set: &GpuQuerySet, query_index: u32);
445457
}

crates/web-sys/src/features/gen_GpuCommandEncoderDescriptor.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,25 @@ impl GpuCommandEncoderDescriptor {
4444
let _ = r;
4545
self
4646
}
47+
#[cfg(web_sys_unstable_apis)]
48+
#[doc = "Change the `measureExecutionTime` field of this object."]
49+
#[doc = ""]
50+
#[doc = "*This API requires the following crate features to be activated: `GpuCommandEncoderDescriptor`*"]
51+
#[doc = ""]
52+
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
53+
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
54+
pub fn measure_execution_time(&mut self, val: bool) -> &mut Self {
55+
use wasm_bindgen::JsValue;
56+
let r = ::js_sys::Reflect::set(
57+
self.as_ref(),
58+
&JsValue::from("measureExecutionTime"),
59+
&JsValue::from(val),
60+
);
61+
debug_assert!(
62+
r.is_ok(),
63+
"setting properties should never fail on our dictionary objects"
64+
);
65+
let _ = r;
66+
self
67+
}
4768
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#![allow(unused_imports)]
2+
use super::*;
3+
use wasm_bindgen::prelude::*;
4+
#[cfg(web_sys_unstable_apis)]
5+
#[wasm_bindgen]
6+
extern "C" {
7+
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = GPUCompilationInfo , typescript_type = "GPUCompilationInfo" ) ]
8+
#[derive(Debug, Clone, PartialEq, Eq)]
9+
#[doc = "The `GpuCompilationInfo` class."]
10+
#[doc = ""]
11+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCompilationInfo)"]
12+
#[doc = ""]
13+
#[doc = "*This API requires the following crate features to be activated: `GpuCompilationInfo`*"]
14+
#[doc = ""]
15+
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
16+
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
17+
pub type GpuCompilationInfo;
18+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#![allow(unused_imports)]
2+
use super::*;
3+
use wasm_bindgen::prelude::*;
4+
#[cfg(web_sys_unstable_apis)]
5+
#[wasm_bindgen]
6+
extern "C" {
7+
# [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = GPUCompilationMessage , typescript_type = "GPUCompilationMessage" ) ]
8+
#[derive(Debug, Clone, PartialEq, Eq)]
9+
#[doc = "The `GpuCompilationMessage` class."]
10+
#[doc = ""]
11+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCompilationMessage)"]
12+
#[doc = ""]
13+
#[doc = "*This API requires the following crate features to be activated: `GpuCompilationMessage`*"]
14+
#[doc = ""]
15+
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
16+
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
17+
pub type GpuCompilationMessage;
18+
#[cfg(web_sys_unstable_apis)]
19+
# [ wasm_bindgen ( structural , method , getter , js_class = "GPUCompilationMessage" , js_name = message ) ]
20+
#[doc = "Getter for the `message` field of this object."]
21+
#[doc = ""]
22+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCompilationMessage/message)"]
23+
#[doc = ""]
24+
#[doc = "*This API requires the following crate features to be activated: `GpuCompilationMessage`*"]
25+
#[doc = ""]
26+
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
27+
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
28+
pub fn message(this: &GpuCompilationMessage) -> String;
29+
#[cfg(web_sys_unstable_apis)]
30+
#[cfg(feature = "GpuCompilationMessageType")]
31+
# [ wasm_bindgen ( structural , method , getter , js_class = "GPUCompilationMessage" , js_name = type ) ]
32+
#[doc = "Getter for the `type` field of this object."]
33+
#[doc = ""]
34+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCompilationMessage/type)"]
35+
#[doc = ""]
36+
#[doc = "*This API requires the following crate features to be activated: `GpuCompilationMessage`, `GpuCompilationMessageType`*"]
37+
#[doc = ""]
38+
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
39+
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
40+
pub fn type_(this: &GpuCompilationMessage) -> GpuCompilationMessageType;
41+
#[cfg(web_sys_unstable_apis)]
42+
# [ wasm_bindgen ( structural , method , getter , js_class = "GPUCompilationMessage" , js_name = lineNum ) ]
43+
#[doc = "Getter for the `lineNum` field of this object."]
44+
#[doc = ""]
45+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCompilationMessage/lineNum)"]
46+
#[doc = ""]
47+
#[doc = "*This API requires the following crate features to be activated: `GpuCompilationMessage`*"]
48+
#[doc = ""]
49+
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
50+
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
51+
pub fn line_num(this: &GpuCompilationMessage) -> f64;
52+
#[cfg(web_sys_unstable_apis)]
53+
# [ wasm_bindgen ( structural , method , getter , js_class = "GPUCompilationMessage" , js_name = linePos ) ]
54+
#[doc = "Getter for the `linePos` field of this object."]
55+
#[doc = ""]
56+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCompilationMessage/linePos)"]
57+
#[doc = ""]
58+
#[doc = "*This API requires the following crate features to be activated: `GpuCompilationMessage`*"]
59+
#[doc = ""]
60+
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
61+
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
62+
pub fn line_pos(this: &GpuCompilationMessage) -> f64;
63+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#![allow(unused_imports)]
2+
use wasm_bindgen::prelude::*;
3+
#[cfg(web_sys_unstable_apis)]
4+
#[wasm_bindgen]
5+
#[doc = "The `GpuCompilationMessageType` enum."]
6+
#[doc = ""]
7+
#[doc = "*This API requires the following crate features to be activated: `GpuCompilationMessageType`*"]
8+
#[doc = ""]
9+
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
10+
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
11+
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
12+
pub enum GpuCompilationMessageType {
13+
Error = "error",
14+
Warning = "warning",
15+
Info = "info",
16+
}

crates/web-sys/src/features/gen_GpuComputePassEncoder.rs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,22 @@ extern "C" {
3838
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
3939
pub fn set_label(this: &GpuComputePassEncoder, value: Option<&str>);
4040
#[cfg(web_sys_unstable_apis)]
41+
#[cfg(feature = "GpuQuerySet")]
42+
# [ wasm_bindgen ( method , structural , js_class = "GPUComputePassEncoder" , js_name = beginPipelineStatisticsQuery ) ]
43+
#[doc = "The `beginPipelineStatisticsQuery()` method."]
44+
#[doc = ""]
45+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUComputePassEncoder/beginPipelineStatisticsQuery)"]
46+
#[doc = ""]
47+
#[doc = "*This API requires the following crate features to be activated: `GpuComputePassEncoder`, `GpuQuerySet`*"]
48+
#[doc = ""]
49+
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
50+
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
51+
pub fn begin_pipeline_statistics_query(
52+
this: &GpuComputePassEncoder,
53+
query_set: &GpuQuerySet,
54+
query_index: u32,
55+
);
56+
#[cfg(web_sys_unstable_apis)]
4157
# [ wasm_bindgen ( method , structural , js_class = "GPUComputePassEncoder" , js_name = dispatch ) ]
4258
#[doc = "The `dispatch()` method."]
4359
#[doc = ""]
@@ -114,6 +130,17 @@ extern "C" {
114130
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
115131
pub fn end_pass(this: &GpuComputePassEncoder);
116132
#[cfg(web_sys_unstable_apis)]
133+
# [ wasm_bindgen ( method , structural , js_class = "GPUComputePassEncoder" , js_name = endPipelineStatisticsQuery ) ]
134+
#[doc = "The `endPipelineStatisticsQuery()` method."]
135+
#[doc = ""]
136+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUComputePassEncoder/endPipelineStatisticsQuery)"]
137+
#[doc = ""]
138+
#[doc = "*This API requires the following crate features to be activated: `GpuComputePassEncoder`*"]
139+
#[doc = ""]
140+
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
141+
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
142+
pub fn end_pipeline_statistics_query(this: &GpuComputePassEncoder);
143+
#[cfg(web_sys_unstable_apis)]
117144
#[cfg(feature = "GpuComputePipeline")]
118145
# [ wasm_bindgen ( method , structural , js_class = "GPUComputePassEncoder" , js_name = setPipeline ) ]
119146
#[doc = "The `setPipeline()` method."]
@@ -126,6 +153,18 @@ extern "C" {
126153
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
127154
pub fn set_pipeline(this: &GpuComputePassEncoder, pipeline: &GpuComputePipeline);
128155
#[cfg(web_sys_unstable_apis)]
156+
#[cfg(feature = "GpuQuerySet")]
157+
# [ wasm_bindgen ( method , structural , js_class = "GPUComputePassEncoder" , js_name = writeTimestamp ) ]
158+
#[doc = "The `writeTimestamp()` method."]
159+
#[doc = ""]
160+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUComputePassEncoder/writeTimestamp)"]
161+
#[doc = ""]
162+
#[doc = "*This API requires the following crate features to be activated: `GpuComputePassEncoder`, `GpuQuerySet`*"]
163+
#[doc = ""]
164+
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
165+
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
166+
pub fn write_timestamp(this: &GpuComputePassEncoder, query_set: &GpuQuerySet, query_index: u32);
167+
#[cfg(web_sys_unstable_apis)]
129168
# [ wasm_bindgen ( method , structural , js_class = "GPUComputePassEncoder" , js_name = insertDebugMarker ) ]
130169
#[doc = "The `insertDebugMarker()` method."]
131170
#[doc = ""]

crates/web-sys/src/features/gen_GpuComputePipeline.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,16 @@ extern "C" {
3737
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
3838
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
3939
pub fn set_label(this: &GpuComputePipeline, value: Option<&str>);
40+
#[cfg(web_sys_unstable_apis)]
41+
#[cfg(feature = "GpuBindGroupLayout")]
42+
# [ wasm_bindgen ( method , structural , js_class = "GPUComputePipeline" , js_name = getBindGroupLayout ) ]
43+
#[doc = "The `getBindGroupLayout()` method."]
44+
#[doc = ""]
45+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUComputePipeline/getBindGroupLayout)"]
46+
#[doc = ""]
47+
#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayout`, `GpuComputePipeline`*"]
48+
#[doc = ""]
49+
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
50+
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
51+
pub fn get_bind_group_layout(this: &GpuComputePipeline, index: u32) -> GpuBindGroupLayout;
4052
}

crates/web-sys/src/features/gen_GpuComputePipelineDescriptor.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,16 @@ extern "C" {
1616
}
1717
#[cfg(web_sys_unstable_apis)]
1818
impl GpuComputePipelineDescriptor {
19-
#[cfg(all(
20-
feature = "GpuPipelineLayout",
21-
feature = "GpuProgrammableStageDescriptor",
22-
))]
19+
#[cfg(feature = "GpuProgrammableStageDescriptor")]
2320
#[doc = "Construct a new `GpuComputePipelineDescriptor`."]
2421
#[doc = ""]
25-
#[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`, `GpuPipelineLayout`, `GpuProgrammableStageDescriptor`*"]
22+
#[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`, `GpuProgrammableStageDescriptor`*"]
2623
#[doc = ""]
2724
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
2825
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
29-
pub fn new(layout: &GpuPipelineLayout, compute_stage: &GpuProgrammableStageDescriptor) -> Self {
26+
pub fn new(compute_stage: &GpuProgrammableStageDescriptor) -> Self {
3027
#[allow(unused_mut)]
3128
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
32-
ret.layout(layout);
3329
ret.compute_stage(compute_stage);
3430
ret
3531
}

0 commit comments

Comments
 (0)