1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8 # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = GPUDevice , typescript_type = "GPUDevice")]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `GpuDevice` class."]
11 #[doc = ""]
12 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice)"]
13 #[doc = ""]
14 #[doc = "*This API requires the following crate features to be activated: `GpuDevice`*"]
15 #[doc = ""]
16 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
17 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
18 pub type GpuDevice;
19 #[cfg(web_sys_unstable_apis)]
20 #[cfg(feature = "GpuSupportedFeatures")]
21 # [wasm_bindgen (structural , method , getter , js_class = "GPUDevice" , js_name = features)]
22 #[doc = "Getter for the `features` field of this object."]
23 #[doc = ""]
24 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/features)"]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuSupportedFeatures`*"]
27 #[doc = ""]
28 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
29 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
30 pub fn features(this: &GpuDevice) -> GpuSupportedFeatures;
31 #[cfg(web_sys_unstable_apis)]
32 #[cfg(feature = "GpuSupportedLimits")]
33 # [wasm_bindgen (structural , method , getter , js_class = "GPUDevice" , js_name = limits)]
34 #[doc = "Getter for the `limits` field of this object."]
35 #[doc = ""]
36 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/limits)"]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuSupportedLimits`*"]
39 #[doc = ""]
40 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
41 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
42 pub fn limits(this: &GpuDevice) -> GpuSupportedLimits;
43 #[cfg(web_sys_unstable_apis)]
44 #[cfg(feature = "GpuAdapterInfo")]
45 # [wasm_bindgen (structural , method , getter , js_class = "GPUDevice" , js_name = adapterInfo)]
46 #[doc = "Getter for the `adapterInfo` field of this object."]
47 #[doc = ""]
48 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/adapterInfo)"]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `GpuAdapterInfo`, `GpuDevice`*"]
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 adapter_info(this: &GpuDevice) -> GpuAdapterInfo;
55 #[cfg(web_sys_unstable_apis)]
56 #[cfg(feature = "GpuQueue")]
57 # [wasm_bindgen (structural , method , getter , js_class = "GPUDevice" , js_name = queue)]
58 #[doc = "Getter for the `queue` field of this object."]
59 #[doc = ""]
60 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/queue)"]
61 #[doc = ""]
62 #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuQueue`*"]
63 #[doc = ""]
64 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
65 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
66 pub fn queue(this: &GpuDevice) -> GpuQueue;
67 #[cfg(web_sys_unstable_apis)]
68 # [wasm_bindgen (structural , method , getter , js_class = "GPUDevice" , js_name = lost)]
69 #[doc = "Getter for the `lost` field of this object."]
70 #[doc = ""]
71 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/lost)"]
72 #[doc = ""]
73 #[doc = "*This API requires the following crate features to be activated: `GpuDevice`*"]
74 #[doc = ""]
75 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
76 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
77 pub fn lost(this: &GpuDevice) -> ::js_sys::Promise;
78 #[cfg(web_sys_unstable_apis)]
79 # [wasm_bindgen (structural , method , getter , js_class = "GPUDevice" , js_name = onuncapturederror)]
80 #[doc = "Getter for the `onuncapturederror` field of this object."]
81 #[doc = ""]
82 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/onuncapturederror)"]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `GpuDevice`*"]
85 #[doc = ""]
86 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
87 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
88 pub fn onuncapturederror(this: &GpuDevice) -> Option<::js_sys::Function>;
89 #[cfg(web_sys_unstable_apis)]
90 # [wasm_bindgen (structural , method , setter , js_class = "GPUDevice" , js_name = onuncapturederror)]
91 #[doc = "Setter for the `onuncapturederror` field of this object."]
92 #[doc = ""]
93 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/onuncapturederror)"]
94 #[doc = ""]
95 #[doc = "*This API requires the following crate features to be activated: `GpuDevice`*"]
96 #[doc = ""]
97 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
98 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
99 pub fn set_onuncapturederror(this: &GpuDevice, value: Option<&::js_sys::Function>);
100 #[cfg(web_sys_unstable_apis)]
101 # [wasm_bindgen (structural , method , getter , js_class = "GPUDevice" , js_name = label)]
102 #[doc = "Getter for the `label` field of this object."]
103 #[doc = ""]
104 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/label)"]
105 #[doc = ""]
106 #[doc = "*This API requires the following crate features to be activated: `GpuDevice`*"]
107 #[doc = ""]
108 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
109 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
110 pub fn label(this: &GpuDevice) -> ::alloc::string::String;
111 #[cfg(web_sys_unstable_apis)]
112 # [wasm_bindgen (structural , method , setter , js_class = "GPUDevice" , js_name = label)]
113 #[doc = "Setter for the `label` field of this object."]
114 #[doc = ""]
115 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/label)"]
116 #[doc = ""]
117 #[doc = "*This API requires the following crate features to be activated: `GpuDevice`*"]
118 #[doc = ""]
119 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
120 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
121 pub fn set_label(this: &GpuDevice, value: &str);
122 #[cfg(web_sys_unstable_apis)]
123 #[cfg(all(feature = "GpuBindGroup", feature = "GpuBindGroupDescriptor",))]
124 # [wasm_bindgen (method , structural , js_class = "GPUDevice" , js_name = createBindGroup)]
125 #[doc = "The `createBindGroup()` method."]
126 #[doc = ""]
127 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createBindGroup)"]
128 #[doc = ""]
129 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroup`, `GpuBindGroupDescriptor`, `GpuDevice`*"]
130 #[doc = ""]
131 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
132 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
133 pub fn create_bind_group(this: &GpuDevice, descriptor: &GpuBindGroupDescriptor)
134 -> GpuBindGroup;
135 #[cfg(web_sys_unstable_apis)]
136 #[cfg(all(
137 feature = "GpuBindGroupLayout",
138 feature = "GpuBindGroupLayoutDescriptor",
139 ))]
140 # [wasm_bindgen (catch , method , structural , js_class = "GPUDevice" , js_name = createBindGroupLayout)]
141 #[doc = "The `createBindGroupLayout()` method."]
142 #[doc = ""]
143 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createBindGroupLayout)"]
144 #[doc = ""]
145 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayout`, `GpuBindGroupLayoutDescriptor`, `GpuDevice`*"]
146 #[doc = ""]
147 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
148 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
149 pub fn create_bind_group_layout(
150 this: &GpuDevice,
151 descriptor: &GpuBindGroupLayoutDescriptor,
152 ) -> Result<GpuBindGroupLayout, JsValue>;
153 #[cfg(web_sys_unstable_apis)]
154 #[cfg(all(feature = "GpuBuffer", feature = "GpuBufferDescriptor",))]
155 # [wasm_bindgen (catch , method , structural , js_class = "GPUDevice" , js_name = createBuffer)]
156 #[doc = "The `createBuffer()` method."]
157 #[doc = ""]
158 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createBuffer)"]
159 #[doc = ""]
160 #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuBufferDescriptor`, `GpuDevice`*"]
161 #[doc = ""]
162 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
163 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
164 pub fn create_buffer(
165 this: &GpuDevice,
166 descriptor: &GpuBufferDescriptor,
167 ) -> Result<GpuBuffer, JsValue>;
168 #[cfg(web_sys_unstable_apis)]
169 #[cfg(feature = "GpuCommandEncoder")]
170 # [wasm_bindgen (method , structural , js_class = "GPUDevice" , js_name = createCommandEncoder)]
171 #[doc = "The `createCommandEncoder()` method."]
172 #[doc = ""]
173 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createCommandEncoder)"]
174 #[doc = ""]
175 #[doc = "*This API requires the following crate features to be activated: `GpuCommandEncoder`, `GpuDevice`*"]
176 #[doc = ""]
177 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
178 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
179 pub fn create_command_encoder(this: &GpuDevice) -> GpuCommandEncoder;
180 #[cfg(web_sys_unstable_apis)]
181 #[cfg(all(feature = "GpuCommandEncoder", feature = "GpuCommandEncoderDescriptor",))]
182 # [wasm_bindgen (method , structural , js_class = "GPUDevice" , js_name = createCommandEncoder)]
183 #[doc = "The `createCommandEncoder()` method."]
184 #[doc = ""]
185 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createCommandEncoder)"]
186 #[doc = ""]
187 #[doc = "*This API requires the following crate features to be activated: `GpuCommandEncoder`, `GpuCommandEncoderDescriptor`, `GpuDevice`*"]
188 #[doc = ""]
189 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
190 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
191 pub fn create_command_encoder_with_descriptor(
192 this: &GpuDevice,
193 descriptor: &GpuCommandEncoderDescriptor,
194 ) -> GpuCommandEncoder;
195 #[cfg(web_sys_unstable_apis)]
196 #[cfg(all(
197 feature = "GpuComputePipeline",
198 feature = "GpuComputePipelineDescriptor",
199 ))]
200 # [wasm_bindgen (method , structural , js_class = "GPUDevice" , js_name = createComputePipeline)]
201 #[doc = "The `createComputePipeline()` method."]
202 #[doc = ""]
203 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createComputePipeline)"]
204 #[doc = ""]
205 #[doc = "*This API requires the following crate features to be activated: `GpuComputePipeline`, `GpuComputePipelineDescriptor`, `GpuDevice`*"]
206 #[doc = ""]
207 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
208 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
209 pub fn create_compute_pipeline(
210 this: &GpuDevice,
211 descriptor: &GpuComputePipelineDescriptor,
212 ) -> GpuComputePipeline;
213 #[cfg(web_sys_unstable_apis)]
214 #[cfg(feature = "GpuComputePipelineDescriptor")]
215 # [wasm_bindgen (method , structural , js_class = "GPUDevice" , js_name = createComputePipelineAsync)]
216 #[doc = "The `createComputePipelineAsync()` method."]
217 #[doc = ""]
218 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createComputePipelineAsync)"]
219 #[doc = ""]
220 #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`, `GpuDevice`*"]
221 #[doc = ""]
222 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
223 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
224 pub fn create_compute_pipeline_async(
225 this: &GpuDevice,
226 descriptor: &GpuComputePipelineDescriptor,
227 ) -> ::js_sys::Promise;
228 #[cfg(web_sys_unstable_apis)]
229 #[cfg(all(feature = "GpuPipelineLayout", feature = "GpuPipelineLayoutDescriptor",))]
230 # [wasm_bindgen (method , structural , js_class = "GPUDevice" , js_name = createPipelineLayout)]
231 #[doc = "The `createPipelineLayout()` method."]
232 #[doc = ""]
233 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createPipelineLayout)"]
234 #[doc = ""]
235 #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuPipelineLayout`, `GpuPipelineLayoutDescriptor`*"]
236 #[doc = ""]
237 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
238 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
239 pub fn create_pipeline_layout(
240 this: &GpuDevice,
241 descriptor: &GpuPipelineLayoutDescriptor,
242 ) -> GpuPipelineLayout;
243 #[cfg(web_sys_unstable_apis)]
244 #[cfg(all(feature = "GpuQuerySet", feature = "GpuQuerySetDescriptor",))]
245 # [wasm_bindgen (catch , method , structural , js_class = "GPUDevice" , js_name = createQuerySet)]
246 #[doc = "The `createQuerySet()` method."]
247 #[doc = ""]
248 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createQuerySet)"]
249 #[doc = ""]
250 #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuQuerySet`, `GpuQuerySetDescriptor`*"]
251 #[doc = ""]
252 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
253 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
254 pub fn create_query_set(
255 this: &GpuDevice,
256 descriptor: &GpuQuerySetDescriptor,
257 ) -> Result<GpuQuerySet, JsValue>;
258 #[cfg(web_sys_unstable_apis)]
259 #[cfg(all(
260 feature = "GpuRenderBundleEncoder",
261 feature = "GpuRenderBundleEncoderDescriptor",
262 ))]
263 # [wasm_bindgen (catch , method , structural , js_class = "GPUDevice" , js_name = createRenderBundleEncoder)]
264 #[doc = "The `createRenderBundleEncoder()` method."]
265 #[doc = ""]
266 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createRenderBundleEncoder)"]
267 #[doc = ""]
268 #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuRenderBundleEncoder`, `GpuRenderBundleEncoderDescriptor`*"]
269 #[doc = ""]
270 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
271 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
272 pub fn create_render_bundle_encoder(
273 this: &GpuDevice,
274 descriptor: &GpuRenderBundleEncoderDescriptor,
275 ) -> Result<GpuRenderBundleEncoder, JsValue>;
276 #[cfg(web_sys_unstable_apis)]
277 #[cfg(all(feature = "GpuRenderPipeline", feature = "GpuRenderPipelineDescriptor",))]
278 # [wasm_bindgen (catch , method , structural , js_class = "GPUDevice" , js_name = createRenderPipeline)]
279 #[doc = "The `createRenderPipeline()` method."]
280 #[doc = ""]
281 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createRenderPipeline)"]
282 #[doc = ""]
283 #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuRenderPipeline`, `GpuRenderPipelineDescriptor`*"]
284 #[doc = ""]
285 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
286 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
287 pub fn create_render_pipeline(
288 this: &GpuDevice,
289 descriptor: &GpuRenderPipelineDescriptor,
290 ) -> Result<GpuRenderPipeline, JsValue>;
291 #[cfg(web_sys_unstable_apis)]
292 #[cfg(feature = "GpuRenderPipelineDescriptor")]
293 # [wasm_bindgen (method , structural , js_class = "GPUDevice" , js_name = createRenderPipelineAsync)]
294 #[doc = "The `createRenderPipelineAsync()` method."]
295 #[doc = ""]
296 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createRenderPipelineAsync)"]
297 #[doc = ""]
298 #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuRenderPipelineDescriptor`*"]
299 #[doc = ""]
300 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
301 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
302 pub fn create_render_pipeline_async(
303 this: &GpuDevice,
304 descriptor: &GpuRenderPipelineDescriptor,
305 ) -> ::js_sys::Promise;
306 #[cfg(web_sys_unstable_apis)]
307 #[cfg(feature = "GpuSampler")]
308 # [wasm_bindgen (method , structural , js_class = "GPUDevice" , js_name = createSampler)]
309 #[doc = "The `createSampler()` method."]
310 #[doc = ""]
311 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createSampler)"]
312 #[doc = ""]
313 #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuSampler`*"]
314 #[doc = ""]
315 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
316 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
317 pub fn create_sampler(this: &GpuDevice) -> GpuSampler;
318 #[cfg(web_sys_unstable_apis)]
319 #[cfg(all(feature = "GpuSampler", feature = "GpuSamplerDescriptor",))]
320 # [wasm_bindgen (method , structural , js_class = "GPUDevice" , js_name = createSampler)]
321 #[doc = "The `createSampler()` method."]
322 #[doc = ""]
323 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createSampler)"]
324 #[doc = ""]
325 #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuSampler`, `GpuSamplerDescriptor`*"]
326 #[doc = ""]
327 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
328 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
329 pub fn create_sampler_with_descriptor(
330 this: &GpuDevice,
331 descriptor: &GpuSamplerDescriptor,
332 ) -> GpuSampler;
333 #[cfg(web_sys_unstable_apis)]
334 #[cfg(all(feature = "GpuShaderModule", feature = "GpuShaderModuleDescriptor",))]
335 # [wasm_bindgen (method , structural , js_class = "GPUDevice" , js_name = createShaderModule)]
336 #[doc = "The `createShaderModule()` method."]
337 #[doc = ""]
338 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createShaderModule)"]
339 #[doc = ""]
340 #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuShaderModule`, `GpuShaderModuleDescriptor`*"]
341 #[doc = ""]
342 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
343 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
344 pub fn create_shader_module(
345 this: &GpuDevice,
346 descriptor: &GpuShaderModuleDescriptor,
347 ) -> GpuShaderModule;
348 #[cfg(web_sys_unstable_apis)]
349 #[cfg(all(feature = "GpuTexture", feature = "GpuTextureDescriptor",))]
350 # [wasm_bindgen (catch , method , structural , js_class = "GPUDevice" , js_name = createTexture)]
351 #[doc = "The `createTexture()` method."]
352 #[doc = ""]
353 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createTexture)"]
354 #[doc = ""]
355 #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuTexture`, `GpuTextureDescriptor`*"]
356 #[doc = ""]
357 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
358 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
359 pub fn create_texture(
360 this: &GpuDevice,
361 descriptor: &GpuTextureDescriptor,
362 ) -> Result<GpuTexture, JsValue>;
363 #[cfg(web_sys_unstable_apis)]
364 # [wasm_bindgen (method , structural , js_class = "GPUDevice" , js_name = destroy)]
365 #[doc = "The `destroy()` method."]
366 #[doc = ""]
367 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/destroy)"]
368 #[doc = ""]
369 #[doc = "*This API requires the following crate features to be activated: `GpuDevice`*"]
370 #[doc = ""]
371 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
372 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
373 pub fn destroy(this: &GpuDevice);
374 #[cfg(web_sys_unstable_apis)]
375 #[cfg(all(
376 feature = "GpuExternalTexture",
377 feature = "GpuExternalTextureDescriptor",
378 ))]
379 # [wasm_bindgen (catch , method , structural , js_class = "GPUDevice" , js_name = importExternalTexture)]
380 #[doc = "The `importExternalTexture()` method."]
381 #[doc = ""]
382 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/importExternalTexture)"]
383 #[doc = ""]
384 #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuExternalTexture`, `GpuExternalTextureDescriptor`*"]
385 #[doc = ""]
386 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
387 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
388 pub fn import_external_texture(
389 this: &GpuDevice,
390 descriptor: &GpuExternalTextureDescriptor,
391 ) -> Result<GpuExternalTexture, JsValue>;
392 #[cfg(web_sys_unstable_apis)]
393 # [wasm_bindgen (method , structural , js_class = "GPUDevice" , js_name = popErrorScope)]
394 #[doc = "The `popErrorScope()` method."]
395 #[doc = ""]
396 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/popErrorScope)"]
397 #[doc = ""]
398 #[doc = "*This API requires the following crate features to be activated: `GpuDevice`*"]
399 #[doc = ""]
400 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
401 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
402 pub fn pop_error_scope(this: &GpuDevice) -> ::js_sys::Promise;
403 #[cfg(web_sys_unstable_apis)]
404 #[cfg(feature = "GpuErrorFilter")]
405 # [wasm_bindgen (method , structural , js_class = "GPUDevice" , js_name = pushErrorScope)]
406 #[doc = "The `pushErrorScope()` method."]
407 #[doc = ""]
408 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/pushErrorScope)"]
409 #[doc = ""]
410 #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuErrorFilter`*"]
411 #[doc = ""]
412 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
413 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
414 pub fn push_error_scope(this: &GpuDevice, filter: GpuErrorFilter);
415}