Skip to main content

wgpu/backend/webgpu/webgpu_sys/
gen_GpuDevice.rs

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