Skip to main content

dawn_rs/generated/
enums.rs

1#![allow(dead_code, unused_imports)]
2use crate::ffi;
3use bitflags::bitflags;
4#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
5#[repr(u32)]
6pub enum WGSLLanguageFeatureName {
7    ReadonlyAndReadwriteStorageTextures = ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_ReadonlyAndReadwriteStorageTextures
8        as u32,
9    Packed4X8IntegerDotProduct = ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_Packed4x8IntegerDotProduct
10        as u32,
11    UnrestrictedPointerParameters = ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_UnrestrictedPointerParameters
12        as u32,
13    PointerCompositeAccess = ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_PointerCompositeAccess
14        as u32,
15    UniformBufferStandardLayout = ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_UniformBufferStandardLayout
16        as u32,
17    SubgroupId = ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_SubgroupId
18        as u32,
19    TextureAndSamplerLet = ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_TextureAndSamplerLet
20        as u32,
21    SizedBindingArray = ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_SizedBindingArray
22        as u32,
23    TexelBuffers = ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_TexelBuffers
24        as u32,
25    ChromiumPrint = ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_ChromiumPrint
26        as u32,
27    FragmentDepth = ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_FragmentDepth
28        as u32,
29    ImmediateAddressSpace = ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_ImmediateAddressSpace
30        as u32,
31    SubgroupUniformity = ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_SubgroupUniformity
32        as u32,
33    BufferView = ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_BufferView
34        as u32,
35    FilteringParameters = ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_FilteringParameters
36        as u32,
37    SwizzleAssignment = ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_SwizzleAssignment
38        as u32,
39    ChromiumTestingUnimplemented = ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_ChromiumTestingUnimplemented
40        as u32,
41    ChromiumTestingUnsafeExperimental = ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_ChromiumTestingUnsafeExperimental
42        as u32,
43    ChromiumTestingExperimental = ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_ChromiumTestingExperimental
44        as u32,
45    ChromiumTestingShippedWithKillswitch = ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_ChromiumTestingShippedWithKillswitch
46        as u32,
47    ChromiumTestingShipped = ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_ChromiumTestingShipped
48        as u32,
49}
50impl From<ffi::WGPUWGSLLanguageFeatureName> for WGSLLanguageFeatureName {
51    fn from(value: ffi::WGPUWGSLLanguageFeatureName) -> Self {
52        match value as u32 {
53            ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_ReadonlyAndReadwriteStorageTextures => {
54                WGSLLanguageFeatureName::ReadonlyAndReadwriteStorageTextures
55            }
56            ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_Packed4x8IntegerDotProduct => {
57                WGSLLanguageFeatureName::Packed4X8IntegerDotProduct
58            }
59            ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_UnrestrictedPointerParameters => {
60                WGSLLanguageFeatureName::UnrestrictedPointerParameters
61            }
62            ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_PointerCompositeAccess => {
63                WGSLLanguageFeatureName::PointerCompositeAccess
64            }
65            ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_UniformBufferStandardLayout => {
66                WGSLLanguageFeatureName::UniformBufferStandardLayout
67            }
68            ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_SubgroupId => {
69                WGSLLanguageFeatureName::SubgroupId
70            }
71            ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_TextureAndSamplerLet => {
72                WGSLLanguageFeatureName::TextureAndSamplerLet
73            }
74            ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_SizedBindingArray => {
75                WGSLLanguageFeatureName::SizedBindingArray
76            }
77            ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_TexelBuffers => {
78                WGSLLanguageFeatureName::TexelBuffers
79            }
80            ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_ChromiumPrint => {
81                WGSLLanguageFeatureName::ChromiumPrint
82            }
83            ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_FragmentDepth => {
84                WGSLLanguageFeatureName::FragmentDepth
85            }
86            ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_ImmediateAddressSpace => {
87                WGSLLanguageFeatureName::ImmediateAddressSpace
88            }
89            ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_SubgroupUniformity => {
90                WGSLLanguageFeatureName::SubgroupUniformity
91            }
92            ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_BufferView => {
93                WGSLLanguageFeatureName::BufferView
94            }
95            ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_FilteringParameters => {
96                WGSLLanguageFeatureName::FilteringParameters
97            }
98            ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_SwizzleAssignment => {
99                WGSLLanguageFeatureName::SwizzleAssignment
100            }
101            ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_ChromiumTestingUnimplemented => {
102                WGSLLanguageFeatureName::ChromiumTestingUnimplemented
103            }
104            ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_ChromiumTestingUnsafeExperimental => {
105                WGSLLanguageFeatureName::ChromiumTestingUnsafeExperimental
106            }
107            ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_ChromiumTestingExperimental => {
108                WGSLLanguageFeatureName::ChromiumTestingExperimental
109            }
110            ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_ChromiumTestingShippedWithKillswitch => {
111                WGSLLanguageFeatureName::ChromiumTestingShippedWithKillswitch
112            }
113            ffi::WGPUWGSLLanguageFeatureName_WGPUWGSLLanguageFeatureName_ChromiumTestingShipped => {
114                WGSLLanguageFeatureName::ChromiumTestingShipped
115            }
116            _ => WGSLLanguageFeatureName::ReadonlyAndReadwriteStorageTextures,
117        }
118    }
119}
120impl From<WGSLLanguageFeatureName> for ffi::WGPUWGSLLanguageFeatureName {
121    fn from(value: WGSLLanguageFeatureName) -> Self {
122        value as ffi::WGPUWGSLLanguageFeatureName
123    }
124}
125#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
126#[repr(u32)]
127pub enum AdapterType {
128    DiscreteGpu = ffi::WGPUAdapterType_WGPUAdapterType_DiscreteGPU as u32,
129    IntegratedGpu = ffi::WGPUAdapterType_WGPUAdapterType_IntegratedGPU as u32,
130    Cpu = ffi::WGPUAdapterType_WGPUAdapterType_CPU as u32,
131    Unknown = ffi::WGPUAdapterType_WGPUAdapterType_Unknown as u32,
132}
133impl From<ffi::WGPUAdapterType> for AdapterType {
134    fn from(value: ffi::WGPUAdapterType) -> Self {
135        match value as u32 {
136            ffi::WGPUAdapterType_WGPUAdapterType_DiscreteGPU => AdapterType::DiscreteGpu,
137            ffi::WGPUAdapterType_WGPUAdapterType_IntegratedGPU => {
138                AdapterType::IntegratedGpu
139            }
140            ffi::WGPUAdapterType_WGPUAdapterType_CPU => AdapterType::Cpu,
141            ffi::WGPUAdapterType_WGPUAdapterType_Unknown => AdapterType::Unknown,
142            _ => AdapterType::DiscreteGpu,
143        }
144    }
145}
146impl From<AdapterType> for ffi::WGPUAdapterType {
147    fn from(value: AdapterType) -> Self {
148        value as ffi::WGPUAdapterType
149    }
150}
151#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
152#[repr(u32)]
153pub enum AddressMode {
154    Undefined = ffi::WGPUAddressMode_WGPUAddressMode_Undefined as u32,
155    ClampToEdge = ffi::WGPUAddressMode_WGPUAddressMode_ClampToEdge as u32,
156    Repeat = ffi::WGPUAddressMode_WGPUAddressMode_Repeat as u32,
157    MirrorRepeat = ffi::WGPUAddressMode_WGPUAddressMode_MirrorRepeat as u32,
158}
159impl From<ffi::WGPUAddressMode> for AddressMode {
160    fn from(value: ffi::WGPUAddressMode) -> Self {
161        match value as u32 {
162            ffi::WGPUAddressMode_WGPUAddressMode_Undefined => AddressMode::Undefined,
163            ffi::WGPUAddressMode_WGPUAddressMode_ClampToEdge => AddressMode::ClampToEdge,
164            ffi::WGPUAddressMode_WGPUAddressMode_Repeat => AddressMode::Repeat,
165            ffi::WGPUAddressMode_WGPUAddressMode_MirrorRepeat => {
166                AddressMode::MirrorRepeat
167            }
168            _ => AddressMode::Undefined,
169        }
170    }
171}
172impl From<AddressMode> for ffi::WGPUAddressMode {
173    fn from(value: AddressMode) -> Self {
174        value as ffi::WGPUAddressMode
175    }
176}
177#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
178#[repr(u32)]
179pub enum AlphaMode {
180    Opaque = ffi::WGPUAlphaMode_WGPUAlphaMode_Opaque as u32,
181    Premultiplied = ffi::WGPUAlphaMode_WGPUAlphaMode_Premultiplied as u32,
182    Unpremultiplied = ffi::WGPUAlphaMode_WGPUAlphaMode_Unpremultiplied as u32,
183}
184impl From<ffi::WGPUAlphaMode> for AlphaMode {
185    fn from(value: ffi::WGPUAlphaMode) -> Self {
186        match value as u32 {
187            ffi::WGPUAlphaMode_WGPUAlphaMode_Opaque => AlphaMode::Opaque,
188            ffi::WGPUAlphaMode_WGPUAlphaMode_Premultiplied => AlphaMode::Premultiplied,
189            ffi::WGPUAlphaMode_WGPUAlphaMode_Unpremultiplied => {
190                AlphaMode::Unpremultiplied
191            }
192            _ => AlphaMode::Opaque,
193        }
194    }
195}
196impl From<AlphaMode> for ffi::WGPUAlphaMode {
197    fn from(value: AlphaMode) -> Self {
198        value as ffi::WGPUAlphaMode
199    }
200}
201#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
202#[repr(u32)]
203pub enum BackendType {
204    Undefined = ffi::WGPUBackendType_WGPUBackendType_Undefined as u32,
205    Null = ffi::WGPUBackendType_WGPUBackendType_Null as u32,
206    WebGPU = ffi::WGPUBackendType_WGPUBackendType_WebGPU as u32,
207    D3D11 = ffi::WGPUBackendType_WGPUBackendType_D3D11 as u32,
208    D3D12 = ffi::WGPUBackendType_WGPUBackendType_D3D12 as u32,
209    Metal = ffi::WGPUBackendType_WGPUBackendType_Metal as u32,
210    Vulkan = ffi::WGPUBackendType_WGPUBackendType_Vulkan as u32,
211    OpenGL = ffi::WGPUBackendType_WGPUBackendType_OpenGL as u32,
212    OpenGLes = ffi::WGPUBackendType_WGPUBackendType_OpenGLES as u32,
213}
214impl From<ffi::WGPUBackendType> for BackendType {
215    fn from(value: ffi::WGPUBackendType) -> Self {
216        match value as u32 {
217            ffi::WGPUBackendType_WGPUBackendType_Undefined => BackendType::Undefined,
218            ffi::WGPUBackendType_WGPUBackendType_Null => BackendType::Null,
219            ffi::WGPUBackendType_WGPUBackendType_WebGPU => BackendType::WebGPU,
220            ffi::WGPUBackendType_WGPUBackendType_D3D11 => BackendType::D3D11,
221            ffi::WGPUBackendType_WGPUBackendType_D3D12 => BackendType::D3D12,
222            ffi::WGPUBackendType_WGPUBackendType_Metal => BackendType::Metal,
223            ffi::WGPUBackendType_WGPUBackendType_Vulkan => BackendType::Vulkan,
224            ffi::WGPUBackendType_WGPUBackendType_OpenGL => BackendType::OpenGL,
225            ffi::WGPUBackendType_WGPUBackendType_OpenGLES => BackendType::OpenGLes,
226            _ => BackendType::Undefined,
227        }
228    }
229}
230impl From<BackendType> for ffi::WGPUBackendType {
231    fn from(value: BackendType) -> Self {
232        value as ffi::WGPUBackendType
233    }
234}
235#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
236#[repr(u32)]
237pub enum BlendFactor {
238    Undefined = ffi::WGPUBlendFactor_WGPUBlendFactor_Undefined as u32,
239    Zero = ffi::WGPUBlendFactor_WGPUBlendFactor_Zero as u32,
240    One = ffi::WGPUBlendFactor_WGPUBlendFactor_One as u32,
241    Src = ffi::WGPUBlendFactor_WGPUBlendFactor_Src as u32,
242    OneMinusSrc = ffi::WGPUBlendFactor_WGPUBlendFactor_OneMinusSrc as u32,
243    SrcAlpha = ffi::WGPUBlendFactor_WGPUBlendFactor_SrcAlpha as u32,
244    OneMinusSrcAlpha = ffi::WGPUBlendFactor_WGPUBlendFactor_OneMinusSrcAlpha as u32,
245    Dst = ffi::WGPUBlendFactor_WGPUBlendFactor_Dst as u32,
246    OneMinusDst = ffi::WGPUBlendFactor_WGPUBlendFactor_OneMinusDst as u32,
247    DstAlpha = ffi::WGPUBlendFactor_WGPUBlendFactor_DstAlpha as u32,
248    OneMinusDstAlpha = ffi::WGPUBlendFactor_WGPUBlendFactor_OneMinusDstAlpha as u32,
249    SrcAlphaSaturated = ffi::WGPUBlendFactor_WGPUBlendFactor_SrcAlphaSaturated as u32,
250    Constant = ffi::WGPUBlendFactor_WGPUBlendFactor_Constant as u32,
251    OneMinusConstant = ffi::WGPUBlendFactor_WGPUBlendFactor_OneMinusConstant as u32,
252    Src1 = ffi::WGPUBlendFactor_WGPUBlendFactor_Src1 as u32,
253    OneMinusSrc1 = ffi::WGPUBlendFactor_WGPUBlendFactor_OneMinusSrc1 as u32,
254    Src1Alpha = ffi::WGPUBlendFactor_WGPUBlendFactor_Src1Alpha as u32,
255    OneMinusSrc1Alpha = ffi::WGPUBlendFactor_WGPUBlendFactor_OneMinusSrc1Alpha as u32,
256}
257impl From<ffi::WGPUBlendFactor> for BlendFactor {
258    fn from(value: ffi::WGPUBlendFactor) -> Self {
259        match value as u32 {
260            ffi::WGPUBlendFactor_WGPUBlendFactor_Undefined => BlendFactor::Undefined,
261            ffi::WGPUBlendFactor_WGPUBlendFactor_Zero => BlendFactor::Zero,
262            ffi::WGPUBlendFactor_WGPUBlendFactor_One => BlendFactor::One,
263            ffi::WGPUBlendFactor_WGPUBlendFactor_Src => BlendFactor::Src,
264            ffi::WGPUBlendFactor_WGPUBlendFactor_OneMinusSrc => BlendFactor::OneMinusSrc,
265            ffi::WGPUBlendFactor_WGPUBlendFactor_SrcAlpha => BlendFactor::SrcAlpha,
266            ffi::WGPUBlendFactor_WGPUBlendFactor_OneMinusSrcAlpha => {
267                BlendFactor::OneMinusSrcAlpha
268            }
269            ffi::WGPUBlendFactor_WGPUBlendFactor_Dst => BlendFactor::Dst,
270            ffi::WGPUBlendFactor_WGPUBlendFactor_OneMinusDst => BlendFactor::OneMinusDst,
271            ffi::WGPUBlendFactor_WGPUBlendFactor_DstAlpha => BlendFactor::DstAlpha,
272            ffi::WGPUBlendFactor_WGPUBlendFactor_OneMinusDstAlpha => {
273                BlendFactor::OneMinusDstAlpha
274            }
275            ffi::WGPUBlendFactor_WGPUBlendFactor_SrcAlphaSaturated => {
276                BlendFactor::SrcAlphaSaturated
277            }
278            ffi::WGPUBlendFactor_WGPUBlendFactor_Constant => BlendFactor::Constant,
279            ffi::WGPUBlendFactor_WGPUBlendFactor_OneMinusConstant => {
280                BlendFactor::OneMinusConstant
281            }
282            ffi::WGPUBlendFactor_WGPUBlendFactor_Src1 => BlendFactor::Src1,
283            ffi::WGPUBlendFactor_WGPUBlendFactor_OneMinusSrc1 => {
284                BlendFactor::OneMinusSrc1
285            }
286            ffi::WGPUBlendFactor_WGPUBlendFactor_Src1Alpha => BlendFactor::Src1Alpha,
287            ffi::WGPUBlendFactor_WGPUBlendFactor_OneMinusSrc1Alpha => {
288                BlendFactor::OneMinusSrc1Alpha
289            }
290            _ => BlendFactor::Undefined,
291        }
292    }
293}
294impl From<BlendFactor> for ffi::WGPUBlendFactor {
295    fn from(value: BlendFactor) -> Self {
296        value as ffi::WGPUBlendFactor
297    }
298}
299#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
300#[repr(u32)]
301pub enum BlendOperation {
302    Undefined = ffi::WGPUBlendOperation_WGPUBlendOperation_Undefined as u32,
303    Add = ffi::WGPUBlendOperation_WGPUBlendOperation_Add as u32,
304    Subtract = ffi::WGPUBlendOperation_WGPUBlendOperation_Subtract as u32,
305    ReverseSubtract = ffi::WGPUBlendOperation_WGPUBlendOperation_ReverseSubtract as u32,
306    Min = ffi::WGPUBlendOperation_WGPUBlendOperation_Min as u32,
307    Max = ffi::WGPUBlendOperation_WGPUBlendOperation_Max as u32,
308}
309impl From<ffi::WGPUBlendOperation> for BlendOperation {
310    fn from(value: ffi::WGPUBlendOperation) -> Self {
311        match value as u32 {
312            ffi::WGPUBlendOperation_WGPUBlendOperation_Undefined => {
313                BlendOperation::Undefined
314            }
315            ffi::WGPUBlendOperation_WGPUBlendOperation_Add => BlendOperation::Add,
316            ffi::WGPUBlendOperation_WGPUBlendOperation_Subtract => {
317                BlendOperation::Subtract
318            }
319            ffi::WGPUBlendOperation_WGPUBlendOperation_ReverseSubtract => {
320                BlendOperation::ReverseSubtract
321            }
322            ffi::WGPUBlendOperation_WGPUBlendOperation_Min => BlendOperation::Min,
323            ffi::WGPUBlendOperation_WGPUBlendOperation_Max => BlendOperation::Max,
324            _ => BlendOperation::Undefined,
325        }
326    }
327}
328impl From<BlendOperation> for ffi::WGPUBlendOperation {
329    fn from(value: BlendOperation) -> Self {
330        value as ffi::WGPUBlendOperation
331    }
332}
333#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
334#[repr(u32)]
335pub enum BufferBindingType {
336    BindingNotUsed = ffi::WGPUBufferBindingType_WGPUBufferBindingType_BindingNotUsed
337        as u32,
338    Undefined = ffi::WGPUBufferBindingType_WGPUBufferBindingType_Undefined as u32,
339    Uniform = ffi::WGPUBufferBindingType_WGPUBufferBindingType_Uniform as u32,
340    Storage = ffi::WGPUBufferBindingType_WGPUBufferBindingType_Storage as u32,
341    ReadOnlyStorage = ffi::WGPUBufferBindingType_WGPUBufferBindingType_ReadOnlyStorage
342        as u32,
343}
344impl From<ffi::WGPUBufferBindingType> for BufferBindingType {
345    fn from(value: ffi::WGPUBufferBindingType) -> Self {
346        match value as u32 {
347            ffi::WGPUBufferBindingType_WGPUBufferBindingType_BindingNotUsed => {
348                BufferBindingType::BindingNotUsed
349            }
350            ffi::WGPUBufferBindingType_WGPUBufferBindingType_Undefined => {
351                BufferBindingType::Undefined
352            }
353            ffi::WGPUBufferBindingType_WGPUBufferBindingType_Uniform => {
354                BufferBindingType::Uniform
355            }
356            ffi::WGPUBufferBindingType_WGPUBufferBindingType_Storage => {
357                BufferBindingType::Storage
358            }
359            ffi::WGPUBufferBindingType_WGPUBufferBindingType_ReadOnlyStorage => {
360                BufferBindingType::ReadOnlyStorage
361            }
362            _ => BufferBindingType::BindingNotUsed,
363        }
364    }
365}
366impl From<BufferBindingType> for ffi::WGPUBufferBindingType {
367    fn from(value: BufferBindingType) -> Self {
368        value as ffi::WGPUBufferBindingType
369    }
370}
371#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
372#[repr(u32)]
373pub enum BufferMapState {
374    Unmapped = ffi::WGPUBufferMapState_WGPUBufferMapState_Unmapped as u32,
375    Pending = ffi::WGPUBufferMapState_WGPUBufferMapState_Pending as u32,
376    Mapped = ffi::WGPUBufferMapState_WGPUBufferMapState_Mapped as u32,
377}
378impl From<ffi::WGPUBufferMapState> for BufferMapState {
379    fn from(value: ffi::WGPUBufferMapState) -> Self {
380        match value as u32 {
381            ffi::WGPUBufferMapState_WGPUBufferMapState_Unmapped => {
382                BufferMapState::Unmapped
383            }
384            ffi::WGPUBufferMapState_WGPUBufferMapState_Pending => BufferMapState::Pending,
385            ffi::WGPUBufferMapState_WGPUBufferMapState_Mapped => BufferMapState::Mapped,
386            _ => BufferMapState::Unmapped,
387        }
388    }
389}
390impl From<BufferMapState> for ffi::WGPUBufferMapState {
391    fn from(value: BufferMapState) -> Self {
392        value as ffi::WGPUBufferMapState
393    }
394}
395#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
396#[repr(u32)]
397pub enum CallbackMode {
398    WaitAnyOnly = ffi::WGPUCallbackMode_WGPUCallbackMode_WaitAnyOnly as u32,
399    AllowProcessEvents = ffi::WGPUCallbackMode_WGPUCallbackMode_AllowProcessEvents
400        as u32,
401    AllowSpontaneous = ffi::WGPUCallbackMode_WGPUCallbackMode_AllowSpontaneous as u32,
402}
403impl From<ffi::WGPUCallbackMode> for CallbackMode {
404    fn from(value: ffi::WGPUCallbackMode) -> Self {
405        match value as u32 {
406            ffi::WGPUCallbackMode_WGPUCallbackMode_WaitAnyOnly => {
407                CallbackMode::WaitAnyOnly
408            }
409            ffi::WGPUCallbackMode_WGPUCallbackMode_AllowProcessEvents => {
410                CallbackMode::AllowProcessEvents
411            }
412            ffi::WGPUCallbackMode_WGPUCallbackMode_AllowSpontaneous => {
413                CallbackMode::AllowSpontaneous
414            }
415            _ => CallbackMode::WaitAnyOnly,
416        }
417    }
418}
419impl From<CallbackMode> for ffi::WGPUCallbackMode {
420    fn from(value: CallbackMode) -> Self {
421        value as ffi::WGPUCallbackMode
422    }
423}
424#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
425#[repr(u32)]
426pub enum CompareFunction {
427    Undefined = ffi::WGPUCompareFunction_WGPUCompareFunction_Undefined as u32,
428    Never = ffi::WGPUCompareFunction_WGPUCompareFunction_Never as u32,
429    Less = ffi::WGPUCompareFunction_WGPUCompareFunction_Less as u32,
430    Equal = ffi::WGPUCompareFunction_WGPUCompareFunction_Equal as u32,
431    LessEqual = ffi::WGPUCompareFunction_WGPUCompareFunction_LessEqual as u32,
432    Greater = ffi::WGPUCompareFunction_WGPUCompareFunction_Greater as u32,
433    NotEqual = ffi::WGPUCompareFunction_WGPUCompareFunction_NotEqual as u32,
434    GreaterEqual = ffi::WGPUCompareFunction_WGPUCompareFunction_GreaterEqual as u32,
435    Always = ffi::WGPUCompareFunction_WGPUCompareFunction_Always as u32,
436}
437impl From<ffi::WGPUCompareFunction> for CompareFunction {
438    fn from(value: ffi::WGPUCompareFunction) -> Self {
439        match value as u32 {
440            ffi::WGPUCompareFunction_WGPUCompareFunction_Undefined => {
441                CompareFunction::Undefined
442            }
443            ffi::WGPUCompareFunction_WGPUCompareFunction_Never => CompareFunction::Never,
444            ffi::WGPUCompareFunction_WGPUCompareFunction_Less => CompareFunction::Less,
445            ffi::WGPUCompareFunction_WGPUCompareFunction_Equal => CompareFunction::Equal,
446            ffi::WGPUCompareFunction_WGPUCompareFunction_LessEqual => {
447                CompareFunction::LessEqual
448            }
449            ffi::WGPUCompareFunction_WGPUCompareFunction_Greater => {
450                CompareFunction::Greater
451            }
452            ffi::WGPUCompareFunction_WGPUCompareFunction_NotEqual => {
453                CompareFunction::NotEqual
454            }
455            ffi::WGPUCompareFunction_WGPUCompareFunction_GreaterEqual => {
456                CompareFunction::GreaterEqual
457            }
458            ffi::WGPUCompareFunction_WGPUCompareFunction_Always => {
459                CompareFunction::Always
460            }
461            _ => CompareFunction::Undefined,
462        }
463    }
464}
465impl From<CompareFunction> for ffi::WGPUCompareFunction {
466    fn from(value: CompareFunction) -> Self {
467        value as ffi::WGPUCompareFunction
468    }
469}
470#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
471#[repr(u32)]
472pub enum CompilationInfoRequestStatus {
473    Success = ffi::WGPUCompilationInfoRequestStatus_WGPUCompilationInfoRequestStatus_Success
474        as u32,
475    CallbackCancelled = ffi::WGPUCompilationInfoRequestStatus_WGPUCompilationInfoRequestStatus_CallbackCancelled
476        as u32,
477}
478impl From<ffi::WGPUCompilationInfoRequestStatus> for CompilationInfoRequestStatus {
479    fn from(value: ffi::WGPUCompilationInfoRequestStatus) -> Self {
480        match value as u32 {
481            ffi::WGPUCompilationInfoRequestStatus_WGPUCompilationInfoRequestStatus_Success => {
482                CompilationInfoRequestStatus::Success
483            }
484            ffi::WGPUCompilationInfoRequestStatus_WGPUCompilationInfoRequestStatus_CallbackCancelled => {
485                CompilationInfoRequestStatus::CallbackCancelled
486            }
487            _ => CompilationInfoRequestStatus::Success,
488        }
489    }
490}
491impl From<CompilationInfoRequestStatus> for ffi::WGPUCompilationInfoRequestStatus {
492    fn from(value: CompilationInfoRequestStatus) -> Self {
493        value as ffi::WGPUCompilationInfoRequestStatus
494    }
495}
496#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
497#[repr(u32)]
498pub enum CompilationMessageType {
499    Error = ffi::WGPUCompilationMessageType_WGPUCompilationMessageType_Error as u32,
500    Warning = ffi::WGPUCompilationMessageType_WGPUCompilationMessageType_Warning as u32,
501    Info = ffi::WGPUCompilationMessageType_WGPUCompilationMessageType_Info as u32,
502}
503impl From<ffi::WGPUCompilationMessageType> for CompilationMessageType {
504    fn from(value: ffi::WGPUCompilationMessageType) -> Self {
505        match value as u32 {
506            ffi::WGPUCompilationMessageType_WGPUCompilationMessageType_Error => {
507                CompilationMessageType::Error
508            }
509            ffi::WGPUCompilationMessageType_WGPUCompilationMessageType_Warning => {
510                CompilationMessageType::Warning
511            }
512            ffi::WGPUCompilationMessageType_WGPUCompilationMessageType_Info => {
513                CompilationMessageType::Info
514            }
515            _ => CompilationMessageType::Error,
516        }
517    }
518}
519impl From<CompilationMessageType> for ffi::WGPUCompilationMessageType {
520    fn from(value: CompilationMessageType) -> Self {
521        value as ffi::WGPUCompilationMessageType
522    }
523}
524#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
525#[repr(u32)]
526pub enum ComponentSwizzle {
527    Undefined = ffi::WGPUComponentSwizzle_WGPUComponentSwizzle_Undefined as u32,
528    Zero = ffi::WGPUComponentSwizzle_WGPUComponentSwizzle_Zero as u32,
529    One = ffi::WGPUComponentSwizzle_WGPUComponentSwizzle_One as u32,
530    R = ffi::WGPUComponentSwizzle_WGPUComponentSwizzle_R as u32,
531    G = ffi::WGPUComponentSwizzle_WGPUComponentSwizzle_G as u32,
532    B = ffi::WGPUComponentSwizzle_WGPUComponentSwizzle_B as u32,
533    A = ffi::WGPUComponentSwizzle_WGPUComponentSwizzle_A as u32,
534}
535impl From<ffi::WGPUComponentSwizzle> for ComponentSwizzle {
536    fn from(value: ffi::WGPUComponentSwizzle) -> Self {
537        match value as u32 {
538            ffi::WGPUComponentSwizzle_WGPUComponentSwizzle_Undefined => {
539                ComponentSwizzle::Undefined
540            }
541            ffi::WGPUComponentSwizzle_WGPUComponentSwizzle_Zero => ComponentSwizzle::Zero,
542            ffi::WGPUComponentSwizzle_WGPUComponentSwizzle_One => ComponentSwizzle::One,
543            ffi::WGPUComponentSwizzle_WGPUComponentSwizzle_R => ComponentSwizzle::R,
544            ffi::WGPUComponentSwizzle_WGPUComponentSwizzle_G => ComponentSwizzle::G,
545            ffi::WGPUComponentSwizzle_WGPUComponentSwizzle_B => ComponentSwizzle::B,
546            ffi::WGPUComponentSwizzle_WGPUComponentSwizzle_A => ComponentSwizzle::A,
547            _ => ComponentSwizzle::Undefined,
548        }
549    }
550}
551impl From<ComponentSwizzle> for ffi::WGPUComponentSwizzle {
552    fn from(value: ComponentSwizzle) -> Self {
553        value as ffi::WGPUComponentSwizzle
554    }
555}
556#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
557#[repr(u32)]
558pub enum CompositeAlphaMode {
559    Auto = ffi::WGPUCompositeAlphaMode_WGPUCompositeAlphaMode_Auto as u32,
560    Opaque = ffi::WGPUCompositeAlphaMode_WGPUCompositeAlphaMode_Opaque as u32,
561    Premultiplied = ffi::WGPUCompositeAlphaMode_WGPUCompositeAlphaMode_Premultiplied
562        as u32,
563    Unpremultiplied = ffi::WGPUCompositeAlphaMode_WGPUCompositeAlphaMode_Unpremultiplied
564        as u32,
565    Inherit = ffi::WGPUCompositeAlphaMode_WGPUCompositeAlphaMode_Inherit as u32,
566}
567impl From<ffi::WGPUCompositeAlphaMode> for CompositeAlphaMode {
568    fn from(value: ffi::WGPUCompositeAlphaMode) -> Self {
569        match value as u32 {
570            ffi::WGPUCompositeAlphaMode_WGPUCompositeAlphaMode_Auto => {
571                CompositeAlphaMode::Auto
572            }
573            ffi::WGPUCompositeAlphaMode_WGPUCompositeAlphaMode_Opaque => {
574                CompositeAlphaMode::Opaque
575            }
576            ffi::WGPUCompositeAlphaMode_WGPUCompositeAlphaMode_Premultiplied => {
577                CompositeAlphaMode::Premultiplied
578            }
579            ffi::WGPUCompositeAlphaMode_WGPUCompositeAlphaMode_Unpremultiplied => {
580                CompositeAlphaMode::Unpremultiplied
581            }
582            ffi::WGPUCompositeAlphaMode_WGPUCompositeAlphaMode_Inherit => {
583                CompositeAlphaMode::Inherit
584            }
585            _ => CompositeAlphaMode::Auto,
586        }
587    }
588}
589impl From<CompositeAlphaMode> for ffi::WGPUCompositeAlphaMode {
590    fn from(value: CompositeAlphaMode) -> Self {
591        value as ffi::WGPUCompositeAlphaMode
592    }
593}
594#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
595#[repr(u32)]
596pub enum CreatePipelineAsyncStatus {
597    Success = ffi::WGPUCreatePipelineAsyncStatus_WGPUCreatePipelineAsyncStatus_Success
598        as u32,
599    CallbackCancelled = ffi::WGPUCreatePipelineAsyncStatus_WGPUCreatePipelineAsyncStatus_CallbackCancelled
600        as u32,
601    ValidationError = ffi::WGPUCreatePipelineAsyncStatus_WGPUCreatePipelineAsyncStatus_ValidationError
602        as u32,
603    InternalError = ffi::WGPUCreatePipelineAsyncStatus_WGPUCreatePipelineAsyncStatus_InternalError
604        as u32,
605}
606impl From<ffi::WGPUCreatePipelineAsyncStatus> for CreatePipelineAsyncStatus {
607    fn from(value: ffi::WGPUCreatePipelineAsyncStatus) -> Self {
608        match value as u32 {
609            ffi::WGPUCreatePipelineAsyncStatus_WGPUCreatePipelineAsyncStatus_Success => {
610                CreatePipelineAsyncStatus::Success
611            }
612            ffi::WGPUCreatePipelineAsyncStatus_WGPUCreatePipelineAsyncStatus_CallbackCancelled => {
613                CreatePipelineAsyncStatus::CallbackCancelled
614            }
615            ffi::WGPUCreatePipelineAsyncStatus_WGPUCreatePipelineAsyncStatus_ValidationError => {
616                CreatePipelineAsyncStatus::ValidationError
617            }
618            ffi::WGPUCreatePipelineAsyncStatus_WGPUCreatePipelineAsyncStatus_InternalError => {
619                CreatePipelineAsyncStatus::InternalError
620            }
621            _ => CreatePipelineAsyncStatus::Success,
622        }
623    }
624}
625impl From<CreatePipelineAsyncStatus> for ffi::WGPUCreatePipelineAsyncStatus {
626    fn from(value: CreatePipelineAsyncStatus) -> Self {
627        value as ffi::WGPUCreatePipelineAsyncStatus
628    }
629}
630#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
631#[repr(u32)]
632pub enum CullMode {
633    Undefined = ffi::WGPUCullMode_WGPUCullMode_Undefined as u32,
634    None = ffi::WGPUCullMode_WGPUCullMode_None as u32,
635    Front = ffi::WGPUCullMode_WGPUCullMode_Front as u32,
636    Back = ffi::WGPUCullMode_WGPUCullMode_Back as u32,
637}
638impl From<ffi::WGPUCullMode> for CullMode {
639    fn from(value: ffi::WGPUCullMode) -> Self {
640        match value as u32 {
641            ffi::WGPUCullMode_WGPUCullMode_Undefined => CullMode::Undefined,
642            ffi::WGPUCullMode_WGPUCullMode_None => CullMode::None,
643            ffi::WGPUCullMode_WGPUCullMode_Front => CullMode::Front,
644            ffi::WGPUCullMode_WGPUCullMode_Back => CullMode::Back,
645            _ => CullMode::Undefined,
646        }
647    }
648}
649impl From<CullMode> for ffi::WGPUCullMode {
650    fn from(value: CullMode) -> Self {
651        value as ffi::WGPUCullMode
652    }
653}
654#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
655#[repr(u32)]
656pub enum DeviceLostReason {
657    Unknown = ffi::WGPUDeviceLostReason_WGPUDeviceLostReason_Unknown as u32,
658    Destroyed = ffi::WGPUDeviceLostReason_WGPUDeviceLostReason_Destroyed as u32,
659    CallbackCancelled = ffi::WGPUDeviceLostReason_WGPUDeviceLostReason_CallbackCancelled
660        as u32,
661    FailedCreation = ffi::WGPUDeviceLostReason_WGPUDeviceLostReason_FailedCreation
662        as u32,
663}
664impl From<ffi::WGPUDeviceLostReason> for DeviceLostReason {
665    fn from(value: ffi::WGPUDeviceLostReason) -> Self {
666        match value as u32 {
667            ffi::WGPUDeviceLostReason_WGPUDeviceLostReason_Unknown => {
668                DeviceLostReason::Unknown
669            }
670            ffi::WGPUDeviceLostReason_WGPUDeviceLostReason_Destroyed => {
671                DeviceLostReason::Destroyed
672            }
673            ffi::WGPUDeviceLostReason_WGPUDeviceLostReason_CallbackCancelled => {
674                DeviceLostReason::CallbackCancelled
675            }
676            ffi::WGPUDeviceLostReason_WGPUDeviceLostReason_FailedCreation => {
677                DeviceLostReason::FailedCreation
678            }
679            _ => DeviceLostReason::Unknown,
680        }
681    }
682}
683impl From<DeviceLostReason> for ffi::WGPUDeviceLostReason {
684    fn from(value: DeviceLostReason) -> Self {
685        value as ffi::WGPUDeviceLostReason
686    }
687}
688#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
689#[repr(u32)]
690pub enum ErrorFilter {
691    Validation = ffi::WGPUErrorFilter_WGPUErrorFilter_Validation as u32,
692    OutOfMemory = ffi::WGPUErrorFilter_WGPUErrorFilter_OutOfMemory as u32,
693    Internal = ffi::WGPUErrorFilter_WGPUErrorFilter_Internal as u32,
694}
695impl From<ffi::WGPUErrorFilter> for ErrorFilter {
696    fn from(value: ffi::WGPUErrorFilter) -> Self {
697        match value as u32 {
698            ffi::WGPUErrorFilter_WGPUErrorFilter_Validation => ErrorFilter::Validation,
699            ffi::WGPUErrorFilter_WGPUErrorFilter_OutOfMemory => ErrorFilter::OutOfMemory,
700            ffi::WGPUErrorFilter_WGPUErrorFilter_Internal => ErrorFilter::Internal,
701            _ => ErrorFilter::Validation,
702        }
703    }
704}
705impl From<ErrorFilter> for ffi::WGPUErrorFilter {
706    fn from(value: ErrorFilter) -> Self {
707        value as ffi::WGPUErrorFilter
708    }
709}
710#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
711#[repr(u32)]
712pub enum ErrorType {
713    NoError = ffi::WGPUErrorType_WGPUErrorType_NoError as u32,
714    Validation = ffi::WGPUErrorType_WGPUErrorType_Validation as u32,
715    OutOfMemory = ffi::WGPUErrorType_WGPUErrorType_OutOfMemory as u32,
716    Internal = ffi::WGPUErrorType_WGPUErrorType_Internal as u32,
717    Unknown = ffi::WGPUErrorType_WGPUErrorType_Unknown as u32,
718}
719impl From<ffi::WGPUErrorType> for ErrorType {
720    fn from(value: ffi::WGPUErrorType) -> Self {
721        match value as u32 {
722            ffi::WGPUErrorType_WGPUErrorType_NoError => ErrorType::NoError,
723            ffi::WGPUErrorType_WGPUErrorType_Validation => ErrorType::Validation,
724            ffi::WGPUErrorType_WGPUErrorType_OutOfMemory => ErrorType::OutOfMemory,
725            ffi::WGPUErrorType_WGPUErrorType_Internal => ErrorType::Internal,
726            ffi::WGPUErrorType_WGPUErrorType_Unknown => ErrorType::Unknown,
727            _ => ErrorType::NoError,
728        }
729    }
730}
731impl From<ErrorType> for ffi::WGPUErrorType {
732    fn from(value: ErrorType) -> Self {
733        value as ffi::WGPUErrorType
734    }
735}
736#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
737#[repr(u32)]
738pub enum ExternalTextureRotation {
739    Rotate0Degrees = ffi::WGPUExternalTextureRotation_WGPUExternalTextureRotation_Rotate0Degrees
740        as u32,
741    Rotate90Degrees = ffi::WGPUExternalTextureRotation_WGPUExternalTextureRotation_Rotate90Degrees
742        as u32,
743    Rotate180Degrees = ffi::WGPUExternalTextureRotation_WGPUExternalTextureRotation_Rotate180Degrees
744        as u32,
745    Rotate270Degrees = ffi::WGPUExternalTextureRotation_WGPUExternalTextureRotation_Rotate270Degrees
746        as u32,
747}
748impl From<ffi::WGPUExternalTextureRotation> for ExternalTextureRotation {
749    fn from(value: ffi::WGPUExternalTextureRotation) -> Self {
750        match value as u32 {
751            ffi::WGPUExternalTextureRotation_WGPUExternalTextureRotation_Rotate0Degrees => {
752                ExternalTextureRotation::Rotate0Degrees
753            }
754            ffi::WGPUExternalTextureRotation_WGPUExternalTextureRotation_Rotate90Degrees => {
755                ExternalTextureRotation::Rotate90Degrees
756            }
757            ffi::WGPUExternalTextureRotation_WGPUExternalTextureRotation_Rotate180Degrees => {
758                ExternalTextureRotation::Rotate180Degrees
759            }
760            ffi::WGPUExternalTextureRotation_WGPUExternalTextureRotation_Rotate270Degrees => {
761                ExternalTextureRotation::Rotate270Degrees
762            }
763            _ => ExternalTextureRotation::Rotate0Degrees,
764        }
765    }
766}
767impl From<ExternalTextureRotation> for ffi::WGPUExternalTextureRotation {
768    fn from(value: ExternalTextureRotation) -> Self {
769        value as ffi::WGPUExternalTextureRotation
770    }
771}
772#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
773#[repr(u32)]
774pub enum FeatureLevel {
775    Undefined = ffi::WGPUFeatureLevel_WGPUFeatureLevel_Undefined as u32,
776    Compatibility = ffi::WGPUFeatureLevel_WGPUFeatureLevel_Compatibility as u32,
777    Core = ffi::WGPUFeatureLevel_WGPUFeatureLevel_Core as u32,
778}
779impl From<ffi::WGPUFeatureLevel> for FeatureLevel {
780    fn from(value: ffi::WGPUFeatureLevel) -> Self {
781        match value as u32 {
782            ffi::WGPUFeatureLevel_WGPUFeatureLevel_Undefined => FeatureLevel::Undefined,
783            ffi::WGPUFeatureLevel_WGPUFeatureLevel_Compatibility => {
784                FeatureLevel::Compatibility
785            }
786            ffi::WGPUFeatureLevel_WGPUFeatureLevel_Core => FeatureLevel::Core,
787            _ => FeatureLevel::Undefined,
788        }
789    }
790}
791impl From<FeatureLevel> for ffi::WGPUFeatureLevel {
792    fn from(value: FeatureLevel) -> Self {
793        value as ffi::WGPUFeatureLevel
794    }
795}
796#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
797#[repr(u32)]
798pub enum FeatureName {
799    CoreFeaturesAndLimits = ffi::WGPUFeatureName_WGPUFeatureName_CoreFeaturesAndLimits
800        as u32,
801    DepthClipControl = ffi::WGPUFeatureName_WGPUFeatureName_DepthClipControl as u32,
802    Depth32FloatStencil8 = ffi::WGPUFeatureName_WGPUFeatureName_Depth32FloatStencil8
803        as u32,
804    TextureCompressionBc = ffi::WGPUFeatureName_WGPUFeatureName_TextureCompressionBC
805        as u32,
806    TextureCompressionBcSliced3D = ffi::WGPUFeatureName_WGPUFeatureName_TextureCompressionBCSliced3D
807        as u32,
808    TextureCompressionEtc2 = ffi::WGPUFeatureName_WGPUFeatureName_TextureCompressionETC2
809        as u32,
810    TextureCompressionAstc = ffi::WGPUFeatureName_WGPUFeatureName_TextureCompressionASTC
811        as u32,
812    TextureCompressionAstcSliced3D = ffi::WGPUFeatureName_WGPUFeatureName_TextureCompressionASTCSliced3D
813        as u32,
814    TimestampQuery = ffi::WGPUFeatureName_WGPUFeatureName_TimestampQuery as u32,
815    IndirectFirstInstance = ffi::WGPUFeatureName_WGPUFeatureName_IndirectFirstInstance
816        as u32,
817    ShaderF16 = ffi::WGPUFeatureName_WGPUFeatureName_ShaderF16 as u32,
818    Rg11B10UfloatRenderable = ffi::WGPUFeatureName_WGPUFeatureName_RG11B10UfloatRenderable
819        as u32,
820    Bgra8UnormStorage = ffi::WGPUFeatureName_WGPUFeatureName_BGRA8UnormStorage as u32,
821    Float32Filterable = ffi::WGPUFeatureName_WGPUFeatureName_Float32Filterable as u32,
822    Float32Blendable = ffi::WGPUFeatureName_WGPUFeatureName_Float32Blendable as u32,
823    ClipDistances = ffi::WGPUFeatureName_WGPUFeatureName_ClipDistances as u32,
824    DualSourceBlending = ffi::WGPUFeatureName_WGPUFeatureName_DualSourceBlending as u32,
825    Subgroups = ffi::WGPUFeatureName_WGPUFeatureName_Subgroups as u32,
826    TextureFormatsTier1 = ffi::WGPUFeatureName_WGPUFeatureName_TextureFormatsTier1
827        as u32,
828    TextureFormatsTier2 = ffi::WGPUFeatureName_WGPUFeatureName_TextureFormatsTier2
829        as u32,
830    PrimitiveIndex = ffi::WGPUFeatureName_WGPUFeatureName_PrimitiveIndex as u32,
831    TextureComponentSwizzle = ffi::WGPUFeatureName_WGPUFeatureName_TextureComponentSwizzle
832        as u32,
833    DawnInternalUsages = ffi::WGPUFeatureName_WGPUFeatureName_DawnInternalUsages as u32,
834    DawnMultiPlanarFormats = ffi::WGPUFeatureName_WGPUFeatureName_DawnMultiPlanarFormats
835        as u32,
836    DawnNative = ffi::WGPUFeatureName_WGPUFeatureName_DawnNative as u32,
837    ChromiumExperimentalTimestampQueryInsidePasses = ffi::WGPUFeatureName_WGPUFeatureName_ChromiumExperimentalTimestampQueryInsidePasses
838        as u32,
839    ImplicitDeviceSynchronization = ffi::WGPUFeatureName_WGPUFeatureName_ImplicitDeviceSynchronization
840        as u32,
841    TransientAttachments = ffi::WGPUFeatureName_WGPUFeatureName_TransientAttachments
842        as u32,
843    MsaaRenderToSingleSampled = ffi::WGPUFeatureName_WGPUFeatureName_MSAARenderToSingleSampled
844        as u32,
845    D3D11MultithreadProtected = ffi::WGPUFeatureName_WGPUFeatureName_D3D11MultithreadProtected
846        as u32,
847    AngleTextureSharing = ffi::WGPUFeatureName_WGPUFeatureName_ANGLETextureSharing
848        as u32,
849    PixelLocalStorageCoherent = ffi::WGPUFeatureName_WGPUFeatureName_PixelLocalStorageCoherent
850        as u32,
851    PixelLocalStorageNonCoherent = ffi::WGPUFeatureName_WGPUFeatureName_PixelLocalStorageNonCoherent
852        as u32,
853    Unorm16TextureFormats = ffi::WGPUFeatureName_WGPUFeatureName_Unorm16TextureFormats
854        as u32,
855    MultiPlanarFormatExtendedUsages = ffi::WGPUFeatureName_WGPUFeatureName_MultiPlanarFormatExtendedUsages
856        as u32,
857    MultiPlanarFormatP010 = ffi::WGPUFeatureName_WGPUFeatureName_MultiPlanarFormatP010
858        as u32,
859    HostMappedPointer = ffi::WGPUFeatureName_WGPUFeatureName_HostMappedPointer as u32,
860    MultiPlanarRenderTargets = ffi::WGPUFeatureName_WGPUFeatureName_MultiPlanarRenderTargets
861        as u32,
862    MultiPlanarFormatNv12A = ffi::WGPUFeatureName_WGPUFeatureName_MultiPlanarFormatNv12a
863        as u32,
864    FramebufferFetch = ffi::WGPUFeatureName_WGPUFeatureName_FramebufferFetch as u32,
865    BufferMapExtendedUsages = ffi::WGPUFeatureName_WGPUFeatureName_BufferMapExtendedUsages
866        as u32,
867    AdapterPropertiesMemoryHeaps = ffi::WGPUFeatureName_WGPUFeatureName_AdapterPropertiesMemoryHeaps
868        as u32,
869    AdapterPropertiesD3D = ffi::WGPUFeatureName_WGPUFeatureName_AdapterPropertiesD3D
870        as u32,
871    AdapterPropertiesVk = ffi::WGPUFeatureName_WGPUFeatureName_AdapterPropertiesVk
872        as u32,
873    DawnFormatCapabilities = ffi::WGPUFeatureName_WGPUFeatureName_DawnFormatCapabilities
874        as u32,
875    DawnDrmFormatCapabilities = ffi::WGPUFeatureName_WGPUFeatureName_DawnDrmFormatCapabilities
876        as u32,
877    MultiPlanarFormatNv16 = ffi::WGPUFeatureName_WGPUFeatureName_MultiPlanarFormatNv16
878        as u32,
879    MultiPlanarFormatNv24 = ffi::WGPUFeatureName_WGPUFeatureName_MultiPlanarFormatNv24
880        as u32,
881    MultiPlanarFormatP210 = ffi::WGPUFeatureName_WGPUFeatureName_MultiPlanarFormatP210
882        as u32,
883    MultiPlanarFormatP410 = ffi::WGPUFeatureName_WGPUFeatureName_MultiPlanarFormatP410
884        as u32,
885    SharedTextureMemoryVkDedicatedAllocation = ffi::WGPUFeatureName_WGPUFeatureName_SharedTextureMemoryVkDedicatedAllocation
886        as u32,
887    SharedTextureMemoryAHardwareBuffer = ffi::WGPUFeatureName_WGPUFeatureName_SharedTextureMemoryAHardwareBuffer
888        as u32,
889    SharedTextureMemoryDmaBuf = ffi::WGPUFeatureName_WGPUFeatureName_SharedTextureMemoryDmaBuf
890        as u32,
891    SharedTextureMemoryOpaqueFD = ffi::WGPUFeatureName_WGPUFeatureName_SharedTextureMemoryOpaqueFD
892        as u32,
893    SharedTextureMemoryZirconHandle = ffi::WGPUFeatureName_WGPUFeatureName_SharedTextureMemoryZirconHandle
894        as u32,
895    SharedTextureMemoryDXGISharedHandle = ffi::WGPUFeatureName_WGPUFeatureName_SharedTextureMemoryDXGISharedHandle
896        as u32,
897    SharedTextureMemoryD3D11Texture2D = ffi::WGPUFeatureName_WGPUFeatureName_SharedTextureMemoryD3D11Texture2D
898        as u32,
899    SharedTextureMemoryIOSurface = ffi::WGPUFeatureName_WGPUFeatureName_SharedTextureMemoryIOSurface
900        as u32,
901    SharedTextureMemoryEGLImage = ffi::WGPUFeatureName_WGPUFeatureName_SharedTextureMemoryEGLImage
902        as u32,
903    SharedFenceVkSemaphoreOpaqueFD = ffi::WGPUFeatureName_WGPUFeatureName_SharedFenceVkSemaphoreOpaqueFD
904        as u32,
905    SharedFenceSyncFD = ffi::WGPUFeatureName_WGPUFeatureName_SharedFenceSyncFD as u32,
906    SharedFenceVkSemaphoreZirconHandle = ffi::WGPUFeatureName_WGPUFeatureName_SharedFenceVkSemaphoreZirconHandle
907        as u32,
908    SharedFenceDXGISharedHandle = ffi::WGPUFeatureName_WGPUFeatureName_SharedFenceDXGISharedHandle
909        as u32,
910    SharedFenceMTLSharedEvent = ffi::WGPUFeatureName_WGPUFeatureName_SharedFenceMTLSharedEvent
911        as u32,
912    SharedBufferMemoryD3D12Resource = ffi::WGPUFeatureName_WGPUFeatureName_SharedBufferMemoryD3D12Resource
913        as u32,
914    StaticSamplers = ffi::WGPUFeatureName_WGPUFeatureName_StaticSamplers as u32,
915    YCbCrVulkanSamplers = ffi::WGPUFeatureName_WGPUFeatureName_YCbCrVulkanSamplers
916        as u32,
917    ShaderModuleCompilationOptions = ffi::WGPUFeatureName_WGPUFeatureName_ShaderModuleCompilationOptions
918        as u32,
919    DawnLoadResolveTexture = ffi::WGPUFeatureName_WGPUFeatureName_DawnLoadResolveTexture
920        as u32,
921    DawnPartialLoadResolveTexture = ffi::WGPUFeatureName_WGPUFeatureName_DawnPartialLoadResolveTexture
922        as u32,
923    MultiDrawIndirect = ffi::WGPUFeatureName_WGPUFeatureName_MultiDrawIndirect as u32,
924    DawnTexelCopyBufferRowAlignment = ffi::WGPUFeatureName_WGPUFeatureName_DawnTexelCopyBufferRowAlignment
925        as u32,
926    FlexibleTextureViews = ffi::WGPUFeatureName_WGPUFeatureName_FlexibleTextureViews
927        as u32,
928    ChromiumExperimentalSubgroupMatrix = ffi::WGPUFeatureName_WGPUFeatureName_ChromiumExperimentalSubgroupMatrix
929        as u32,
930    SharedFenceEGLSync = ffi::WGPUFeatureName_WGPUFeatureName_SharedFenceEGLSync as u32,
931    DawnDeviceAllocatorControl = ffi::WGPUFeatureName_WGPUFeatureName_DawnDeviceAllocatorControl
932        as u32,
933    AdapterPropertiesWGPU = ffi::WGPUFeatureName_WGPUFeatureName_AdapterPropertiesWGPU
934        as u32,
935    SharedBufferMemoryD3D12SharedMemoryFileMappingHandle = ffi::WGPUFeatureName_WGPUFeatureName_SharedBufferMemoryD3D12SharedMemoryFileMappingHandle
936        as u32,
937    SharedTextureMemoryD3D12Resource = ffi::WGPUFeatureName_WGPUFeatureName_SharedTextureMemoryD3D12Resource
938        as u32,
939    ChromiumExperimentalSamplingResourceTable = ffi::WGPUFeatureName_WGPUFeatureName_ChromiumExperimentalSamplingResourceTable
940        as u32,
941    ChromiumExperimentalSubgroupSizeControl = ffi::WGPUFeatureName_WGPUFeatureName_ChromiumExperimentalSubgroupSizeControl
942        as u32,
943}
944impl From<ffi::WGPUFeatureName> for FeatureName {
945    fn from(value: ffi::WGPUFeatureName) -> Self {
946        match value as u32 {
947            ffi::WGPUFeatureName_WGPUFeatureName_CoreFeaturesAndLimits => {
948                FeatureName::CoreFeaturesAndLimits
949            }
950            ffi::WGPUFeatureName_WGPUFeatureName_DepthClipControl => {
951                FeatureName::DepthClipControl
952            }
953            ffi::WGPUFeatureName_WGPUFeatureName_Depth32FloatStencil8 => {
954                FeatureName::Depth32FloatStencil8
955            }
956            ffi::WGPUFeatureName_WGPUFeatureName_TextureCompressionBC => {
957                FeatureName::TextureCompressionBc
958            }
959            ffi::WGPUFeatureName_WGPUFeatureName_TextureCompressionBCSliced3D => {
960                FeatureName::TextureCompressionBcSliced3D
961            }
962            ffi::WGPUFeatureName_WGPUFeatureName_TextureCompressionETC2 => {
963                FeatureName::TextureCompressionEtc2
964            }
965            ffi::WGPUFeatureName_WGPUFeatureName_TextureCompressionASTC => {
966                FeatureName::TextureCompressionAstc
967            }
968            ffi::WGPUFeatureName_WGPUFeatureName_TextureCompressionASTCSliced3D => {
969                FeatureName::TextureCompressionAstcSliced3D
970            }
971            ffi::WGPUFeatureName_WGPUFeatureName_TimestampQuery => {
972                FeatureName::TimestampQuery
973            }
974            ffi::WGPUFeatureName_WGPUFeatureName_IndirectFirstInstance => {
975                FeatureName::IndirectFirstInstance
976            }
977            ffi::WGPUFeatureName_WGPUFeatureName_ShaderF16 => FeatureName::ShaderF16,
978            ffi::WGPUFeatureName_WGPUFeatureName_RG11B10UfloatRenderable => {
979                FeatureName::Rg11B10UfloatRenderable
980            }
981            ffi::WGPUFeatureName_WGPUFeatureName_BGRA8UnormStorage => {
982                FeatureName::Bgra8UnormStorage
983            }
984            ffi::WGPUFeatureName_WGPUFeatureName_Float32Filterable => {
985                FeatureName::Float32Filterable
986            }
987            ffi::WGPUFeatureName_WGPUFeatureName_Float32Blendable => {
988                FeatureName::Float32Blendable
989            }
990            ffi::WGPUFeatureName_WGPUFeatureName_ClipDistances => {
991                FeatureName::ClipDistances
992            }
993            ffi::WGPUFeatureName_WGPUFeatureName_DualSourceBlending => {
994                FeatureName::DualSourceBlending
995            }
996            ffi::WGPUFeatureName_WGPUFeatureName_Subgroups => FeatureName::Subgroups,
997            ffi::WGPUFeatureName_WGPUFeatureName_TextureFormatsTier1 => {
998                FeatureName::TextureFormatsTier1
999            }
1000            ffi::WGPUFeatureName_WGPUFeatureName_TextureFormatsTier2 => {
1001                FeatureName::TextureFormatsTier2
1002            }
1003            ffi::WGPUFeatureName_WGPUFeatureName_PrimitiveIndex => {
1004                FeatureName::PrimitiveIndex
1005            }
1006            ffi::WGPUFeatureName_WGPUFeatureName_TextureComponentSwizzle => {
1007                FeatureName::TextureComponentSwizzle
1008            }
1009            ffi::WGPUFeatureName_WGPUFeatureName_DawnInternalUsages => {
1010                FeatureName::DawnInternalUsages
1011            }
1012            ffi::WGPUFeatureName_WGPUFeatureName_DawnMultiPlanarFormats => {
1013                FeatureName::DawnMultiPlanarFormats
1014            }
1015            ffi::WGPUFeatureName_WGPUFeatureName_DawnNative => FeatureName::DawnNative,
1016            ffi::WGPUFeatureName_WGPUFeatureName_ChromiumExperimentalTimestampQueryInsidePasses => {
1017                FeatureName::ChromiumExperimentalTimestampQueryInsidePasses
1018            }
1019            ffi::WGPUFeatureName_WGPUFeatureName_ImplicitDeviceSynchronization => {
1020                FeatureName::ImplicitDeviceSynchronization
1021            }
1022            ffi::WGPUFeatureName_WGPUFeatureName_TransientAttachments => {
1023                FeatureName::TransientAttachments
1024            }
1025            ffi::WGPUFeatureName_WGPUFeatureName_MSAARenderToSingleSampled => {
1026                FeatureName::MsaaRenderToSingleSampled
1027            }
1028            ffi::WGPUFeatureName_WGPUFeatureName_D3D11MultithreadProtected => {
1029                FeatureName::D3D11MultithreadProtected
1030            }
1031            ffi::WGPUFeatureName_WGPUFeatureName_ANGLETextureSharing => {
1032                FeatureName::AngleTextureSharing
1033            }
1034            ffi::WGPUFeatureName_WGPUFeatureName_PixelLocalStorageCoherent => {
1035                FeatureName::PixelLocalStorageCoherent
1036            }
1037            ffi::WGPUFeatureName_WGPUFeatureName_PixelLocalStorageNonCoherent => {
1038                FeatureName::PixelLocalStorageNonCoherent
1039            }
1040            ffi::WGPUFeatureName_WGPUFeatureName_Unorm16TextureFormats => {
1041                FeatureName::Unorm16TextureFormats
1042            }
1043            ffi::WGPUFeatureName_WGPUFeatureName_MultiPlanarFormatExtendedUsages => {
1044                FeatureName::MultiPlanarFormatExtendedUsages
1045            }
1046            ffi::WGPUFeatureName_WGPUFeatureName_MultiPlanarFormatP010 => {
1047                FeatureName::MultiPlanarFormatP010
1048            }
1049            ffi::WGPUFeatureName_WGPUFeatureName_HostMappedPointer => {
1050                FeatureName::HostMappedPointer
1051            }
1052            ffi::WGPUFeatureName_WGPUFeatureName_MultiPlanarRenderTargets => {
1053                FeatureName::MultiPlanarRenderTargets
1054            }
1055            ffi::WGPUFeatureName_WGPUFeatureName_MultiPlanarFormatNv12a => {
1056                FeatureName::MultiPlanarFormatNv12A
1057            }
1058            ffi::WGPUFeatureName_WGPUFeatureName_FramebufferFetch => {
1059                FeatureName::FramebufferFetch
1060            }
1061            ffi::WGPUFeatureName_WGPUFeatureName_BufferMapExtendedUsages => {
1062                FeatureName::BufferMapExtendedUsages
1063            }
1064            ffi::WGPUFeatureName_WGPUFeatureName_AdapterPropertiesMemoryHeaps => {
1065                FeatureName::AdapterPropertiesMemoryHeaps
1066            }
1067            ffi::WGPUFeatureName_WGPUFeatureName_AdapterPropertiesD3D => {
1068                FeatureName::AdapterPropertiesD3D
1069            }
1070            ffi::WGPUFeatureName_WGPUFeatureName_AdapterPropertiesVk => {
1071                FeatureName::AdapterPropertiesVk
1072            }
1073            ffi::WGPUFeatureName_WGPUFeatureName_DawnFormatCapabilities => {
1074                FeatureName::DawnFormatCapabilities
1075            }
1076            ffi::WGPUFeatureName_WGPUFeatureName_DawnDrmFormatCapabilities => {
1077                FeatureName::DawnDrmFormatCapabilities
1078            }
1079            ffi::WGPUFeatureName_WGPUFeatureName_MultiPlanarFormatNv16 => {
1080                FeatureName::MultiPlanarFormatNv16
1081            }
1082            ffi::WGPUFeatureName_WGPUFeatureName_MultiPlanarFormatNv24 => {
1083                FeatureName::MultiPlanarFormatNv24
1084            }
1085            ffi::WGPUFeatureName_WGPUFeatureName_MultiPlanarFormatP210 => {
1086                FeatureName::MultiPlanarFormatP210
1087            }
1088            ffi::WGPUFeatureName_WGPUFeatureName_MultiPlanarFormatP410 => {
1089                FeatureName::MultiPlanarFormatP410
1090            }
1091            ffi::WGPUFeatureName_WGPUFeatureName_SharedTextureMemoryVkDedicatedAllocation => {
1092                FeatureName::SharedTextureMemoryVkDedicatedAllocation
1093            }
1094            ffi::WGPUFeatureName_WGPUFeatureName_SharedTextureMemoryAHardwareBuffer => {
1095                FeatureName::SharedTextureMemoryAHardwareBuffer
1096            }
1097            ffi::WGPUFeatureName_WGPUFeatureName_SharedTextureMemoryDmaBuf => {
1098                FeatureName::SharedTextureMemoryDmaBuf
1099            }
1100            ffi::WGPUFeatureName_WGPUFeatureName_SharedTextureMemoryOpaqueFD => {
1101                FeatureName::SharedTextureMemoryOpaqueFD
1102            }
1103            ffi::WGPUFeatureName_WGPUFeatureName_SharedTextureMemoryZirconHandle => {
1104                FeatureName::SharedTextureMemoryZirconHandle
1105            }
1106            ffi::WGPUFeatureName_WGPUFeatureName_SharedTextureMemoryDXGISharedHandle => {
1107                FeatureName::SharedTextureMemoryDXGISharedHandle
1108            }
1109            ffi::WGPUFeatureName_WGPUFeatureName_SharedTextureMemoryD3D11Texture2D => {
1110                FeatureName::SharedTextureMemoryD3D11Texture2D
1111            }
1112            ffi::WGPUFeatureName_WGPUFeatureName_SharedTextureMemoryIOSurface => {
1113                FeatureName::SharedTextureMemoryIOSurface
1114            }
1115            ffi::WGPUFeatureName_WGPUFeatureName_SharedTextureMemoryEGLImage => {
1116                FeatureName::SharedTextureMemoryEGLImage
1117            }
1118            ffi::WGPUFeatureName_WGPUFeatureName_SharedFenceVkSemaphoreOpaqueFD => {
1119                FeatureName::SharedFenceVkSemaphoreOpaqueFD
1120            }
1121            ffi::WGPUFeatureName_WGPUFeatureName_SharedFenceSyncFD => {
1122                FeatureName::SharedFenceSyncFD
1123            }
1124            ffi::WGPUFeatureName_WGPUFeatureName_SharedFenceVkSemaphoreZirconHandle => {
1125                FeatureName::SharedFenceVkSemaphoreZirconHandle
1126            }
1127            ffi::WGPUFeatureName_WGPUFeatureName_SharedFenceDXGISharedHandle => {
1128                FeatureName::SharedFenceDXGISharedHandle
1129            }
1130            ffi::WGPUFeatureName_WGPUFeatureName_SharedFenceMTLSharedEvent => {
1131                FeatureName::SharedFenceMTLSharedEvent
1132            }
1133            ffi::WGPUFeatureName_WGPUFeatureName_SharedBufferMemoryD3D12Resource => {
1134                FeatureName::SharedBufferMemoryD3D12Resource
1135            }
1136            ffi::WGPUFeatureName_WGPUFeatureName_StaticSamplers => {
1137                FeatureName::StaticSamplers
1138            }
1139            ffi::WGPUFeatureName_WGPUFeatureName_YCbCrVulkanSamplers => {
1140                FeatureName::YCbCrVulkanSamplers
1141            }
1142            ffi::WGPUFeatureName_WGPUFeatureName_ShaderModuleCompilationOptions => {
1143                FeatureName::ShaderModuleCompilationOptions
1144            }
1145            ffi::WGPUFeatureName_WGPUFeatureName_DawnLoadResolveTexture => {
1146                FeatureName::DawnLoadResolveTexture
1147            }
1148            ffi::WGPUFeatureName_WGPUFeatureName_DawnPartialLoadResolveTexture => {
1149                FeatureName::DawnPartialLoadResolveTexture
1150            }
1151            ffi::WGPUFeatureName_WGPUFeatureName_MultiDrawIndirect => {
1152                FeatureName::MultiDrawIndirect
1153            }
1154            ffi::WGPUFeatureName_WGPUFeatureName_DawnTexelCopyBufferRowAlignment => {
1155                FeatureName::DawnTexelCopyBufferRowAlignment
1156            }
1157            ffi::WGPUFeatureName_WGPUFeatureName_FlexibleTextureViews => {
1158                FeatureName::FlexibleTextureViews
1159            }
1160            ffi::WGPUFeatureName_WGPUFeatureName_ChromiumExperimentalSubgroupMatrix => {
1161                FeatureName::ChromiumExperimentalSubgroupMatrix
1162            }
1163            ffi::WGPUFeatureName_WGPUFeatureName_SharedFenceEGLSync => {
1164                FeatureName::SharedFenceEGLSync
1165            }
1166            ffi::WGPUFeatureName_WGPUFeatureName_DawnDeviceAllocatorControl => {
1167                FeatureName::DawnDeviceAllocatorControl
1168            }
1169            ffi::WGPUFeatureName_WGPUFeatureName_AdapterPropertiesWGPU => {
1170                FeatureName::AdapterPropertiesWGPU
1171            }
1172            ffi::WGPUFeatureName_WGPUFeatureName_SharedBufferMemoryD3D12SharedMemoryFileMappingHandle => {
1173                FeatureName::SharedBufferMemoryD3D12SharedMemoryFileMappingHandle
1174            }
1175            ffi::WGPUFeatureName_WGPUFeatureName_SharedTextureMemoryD3D12Resource => {
1176                FeatureName::SharedTextureMemoryD3D12Resource
1177            }
1178            ffi::WGPUFeatureName_WGPUFeatureName_ChromiumExperimentalSamplingResourceTable => {
1179                FeatureName::ChromiumExperimentalSamplingResourceTable
1180            }
1181            ffi::WGPUFeatureName_WGPUFeatureName_ChromiumExperimentalSubgroupSizeControl => {
1182                FeatureName::ChromiumExperimentalSubgroupSizeControl
1183            }
1184            _ => FeatureName::CoreFeaturesAndLimits,
1185        }
1186    }
1187}
1188impl From<FeatureName> for ffi::WGPUFeatureName {
1189    fn from(value: FeatureName) -> Self {
1190        value as ffi::WGPUFeatureName
1191    }
1192}
1193#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
1194#[repr(u32)]
1195pub enum FilterMode {
1196    Undefined = ffi::WGPUFilterMode_WGPUFilterMode_Undefined as u32,
1197    Nearest = ffi::WGPUFilterMode_WGPUFilterMode_Nearest as u32,
1198    Linear = ffi::WGPUFilterMode_WGPUFilterMode_Linear as u32,
1199}
1200impl From<ffi::WGPUFilterMode> for FilterMode {
1201    fn from(value: ffi::WGPUFilterMode) -> Self {
1202        match value as u32 {
1203            ffi::WGPUFilterMode_WGPUFilterMode_Undefined => FilterMode::Undefined,
1204            ffi::WGPUFilterMode_WGPUFilterMode_Nearest => FilterMode::Nearest,
1205            ffi::WGPUFilterMode_WGPUFilterMode_Linear => FilterMode::Linear,
1206            _ => FilterMode::Undefined,
1207        }
1208    }
1209}
1210impl From<FilterMode> for ffi::WGPUFilterMode {
1211    fn from(value: FilterMode) -> Self {
1212        value as ffi::WGPUFilterMode
1213    }
1214}
1215#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
1216#[repr(u32)]
1217pub enum FrontFace {
1218    Undefined = ffi::WGPUFrontFace_WGPUFrontFace_Undefined as u32,
1219    Ccw = ffi::WGPUFrontFace_WGPUFrontFace_CCW as u32,
1220    Cw = ffi::WGPUFrontFace_WGPUFrontFace_CW as u32,
1221}
1222impl From<ffi::WGPUFrontFace> for FrontFace {
1223    fn from(value: ffi::WGPUFrontFace) -> Self {
1224        match value as u32 {
1225            ffi::WGPUFrontFace_WGPUFrontFace_Undefined => FrontFace::Undefined,
1226            ffi::WGPUFrontFace_WGPUFrontFace_CCW => FrontFace::Ccw,
1227            ffi::WGPUFrontFace_WGPUFrontFace_CW => FrontFace::Cw,
1228            _ => FrontFace::Undefined,
1229        }
1230    }
1231}
1232impl From<FrontFace> for ffi::WGPUFrontFace {
1233    fn from(value: FrontFace) -> Self {
1234        value as ffi::WGPUFrontFace
1235    }
1236}
1237#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
1238#[repr(u32)]
1239pub enum IndexFormat {
1240    Undefined = ffi::WGPUIndexFormat_WGPUIndexFormat_Undefined as u32,
1241    Uint16 = ffi::WGPUIndexFormat_WGPUIndexFormat_Uint16 as u32,
1242    Uint32 = ffi::WGPUIndexFormat_WGPUIndexFormat_Uint32 as u32,
1243}
1244impl From<ffi::WGPUIndexFormat> for IndexFormat {
1245    fn from(value: ffi::WGPUIndexFormat) -> Self {
1246        match value as u32 {
1247            ffi::WGPUIndexFormat_WGPUIndexFormat_Undefined => IndexFormat::Undefined,
1248            ffi::WGPUIndexFormat_WGPUIndexFormat_Uint16 => IndexFormat::Uint16,
1249            ffi::WGPUIndexFormat_WGPUIndexFormat_Uint32 => IndexFormat::Uint32,
1250            _ => IndexFormat::Undefined,
1251        }
1252    }
1253}
1254impl From<IndexFormat> for ffi::WGPUIndexFormat {
1255    fn from(value: IndexFormat) -> Self {
1256        value as ffi::WGPUIndexFormat
1257    }
1258}
1259#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
1260#[repr(u32)]
1261pub enum InstanceFeatureName {
1262    TimedWaitAny = ffi::WGPUInstanceFeatureName_WGPUInstanceFeatureName_TimedWaitAny
1263        as u32,
1264    ShaderSourceSPIRV = ffi::WGPUInstanceFeatureName_WGPUInstanceFeatureName_ShaderSourceSPIRV
1265        as u32,
1266    MultipleDevicesPerAdapter = ffi::WGPUInstanceFeatureName_WGPUInstanceFeatureName_MultipleDevicesPerAdapter
1267        as u32,
1268}
1269impl From<ffi::WGPUInstanceFeatureName> for InstanceFeatureName {
1270    fn from(value: ffi::WGPUInstanceFeatureName) -> Self {
1271        match value as u32 {
1272            ffi::WGPUInstanceFeatureName_WGPUInstanceFeatureName_TimedWaitAny => {
1273                InstanceFeatureName::TimedWaitAny
1274            }
1275            ffi::WGPUInstanceFeatureName_WGPUInstanceFeatureName_ShaderSourceSPIRV => {
1276                InstanceFeatureName::ShaderSourceSPIRV
1277            }
1278            ffi::WGPUInstanceFeatureName_WGPUInstanceFeatureName_MultipleDevicesPerAdapter => {
1279                InstanceFeatureName::MultipleDevicesPerAdapter
1280            }
1281            _ => InstanceFeatureName::TimedWaitAny,
1282        }
1283    }
1284}
1285impl From<InstanceFeatureName> for ffi::WGPUInstanceFeatureName {
1286    fn from(value: InstanceFeatureName) -> Self {
1287        value as ffi::WGPUInstanceFeatureName
1288    }
1289}
1290#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
1291#[repr(u32)]
1292pub enum LoadOp {
1293    Undefined = ffi::WGPULoadOp_WGPULoadOp_Undefined as u32,
1294    Load = ffi::WGPULoadOp_WGPULoadOp_Load as u32,
1295    Clear = ffi::WGPULoadOp_WGPULoadOp_Clear as u32,
1296    ExpandResolveTexture = ffi::WGPULoadOp_WGPULoadOp_ExpandResolveTexture as u32,
1297}
1298impl From<ffi::WGPULoadOp> for LoadOp {
1299    fn from(value: ffi::WGPULoadOp) -> Self {
1300        match value as u32 {
1301            ffi::WGPULoadOp_WGPULoadOp_Undefined => LoadOp::Undefined,
1302            ffi::WGPULoadOp_WGPULoadOp_Load => LoadOp::Load,
1303            ffi::WGPULoadOp_WGPULoadOp_Clear => LoadOp::Clear,
1304            ffi::WGPULoadOp_WGPULoadOp_ExpandResolveTexture => {
1305                LoadOp::ExpandResolveTexture
1306            }
1307            _ => LoadOp::Undefined,
1308        }
1309    }
1310}
1311impl From<LoadOp> for ffi::WGPULoadOp {
1312    fn from(value: LoadOp) -> Self {
1313        value as ffi::WGPULoadOp
1314    }
1315}
1316#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
1317#[repr(u32)]
1318pub enum LoggingType {
1319    Verbose = ffi::WGPULoggingType_WGPULoggingType_Verbose as u32,
1320    Info = ffi::WGPULoggingType_WGPULoggingType_Info as u32,
1321    Warning = ffi::WGPULoggingType_WGPULoggingType_Warning as u32,
1322    Error = ffi::WGPULoggingType_WGPULoggingType_Error as u32,
1323}
1324impl From<ffi::WGPULoggingType> for LoggingType {
1325    fn from(value: ffi::WGPULoggingType) -> Self {
1326        match value as u32 {
1327            ffi::WGPULoggingType_WGPULoggingType_Verbose => LoggingType::Verbose,
1328            ffi::WGPULoggingType_WGPULoggingType_Info => LoggingType::Info,
1329            ffi::WGPULoggingType_WGPULoggingType_Warning => LoggingType::Warning,
1330            ffi::WGPULoggingType_WGPULoggingType_Error => LoggingType::Error,
1331            _ => LoggingType::Verbose,
1332        }
1333    }
1334}
1335impl From<LoggingType> for ffi::WGPULoggingType {
1336    fn from(value: LoggingType) -> Self {
1337        value as ffi::WGPULoggingType
1338    }
1339}
1340#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
1341#[repr(u32)]
1342pub enum MapAsyncStatus {
1343    Success = ffi::WGPUMapAsyncStatus_WGPUMapAsyncStatus_Success as u32,
1344    CallbackCancelled = ffi::WGPUMapAsyncStatus_WGPUMapAsyncStatus_CallbackCancelled
1345        as u32,
1346    Error = ffi::WGPUMapAsyncStatus_WGPUMapAsyncStatus_Error as u32,
1347    Aborted = ffi::WGPUMapAsyncStatus_WGPUMapAsyncStatus_Aborted as u32,
1348}
1349impl From<ffi::WGPUMapAsyncStatus> for MapAsyncStatus {
1350    fn from(value: ffi::WGPUMapAsyncStatus) -> Self {
1351        match value as u32 {
1352            ffi::WGPUMapAsyncStatus_WGPUMapAsyncStatus_Success => MapAsyncStatus::Success,
1353            ffi::WGPUMapAsyncStatus_WGPUMapAsyncStatus_CallbackCancelled => {
1354                MapAsyncStatus::CallbackCancelled
1355            }
1356            ffi::WGPUMapAsyncStatus_WGPUMapAsyncStatus_Error => MapAsyncStatus::Error,
1357            ffi::WGPUMapAsyncStatus_WGPUMapAsyncStatus_Aborted => MapAsyncStatus::Aborted,
1358            _ => MapAsyncStatus::Success,
1359        }
1360    }
1361}
1362impl From<MapAsyncStatus> for ffi::WGPUMapAsyncStatus {
1363    fn from(value: MapAsyncStatus) -> Self {
1364        value as ffi::WGPUMapAsyncStatus
1365    }
1366}
1367#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
1368#[repr(u32)]
1369pub enum MipmapFilterMode {
1370    Undefined = ffi::WGPUMipmapFilterMode_WGPUMipmapFilterMode_Undefined as u32,
1371    Nearest = ffi::WGPUMipmapFilterMode_WGPUMipmapFilterMode_Nearest as u32,
1372    Linear = ffi::WGPUMipmapFilterMode_WGPUMipmapFilterMode_Linear as u32,
1373}
1374impl From<ffi::WGPUMipmapFilterMode> for MipmapFilterMode {
1375    fn from(value: ffi::WGPUMipmapFilterMode) -> Self {
1376        match value as u32 {
1377            ffi::WGPUMipmapFilterMode_WGPUMipmapFilterMode_Undefined => {
1378                MipmapFilterMode::Undefined
1379            }
1380            ffi::WGPUMipmapFilterMode_WGPUMipmapFilterMode_Nearest => {
1381                MipmapFilterMode::Nearest
1382            }
1383            ffi::WGPUMipmapFilterMode_WGPUMipmapFilterMode_Linear => {
1384                MipmapFilterMode::Linear
1385            }
1386            _ => MipmapFilterMode::Undefined,
1387        }
1388    }
1389}
1390impl From<MipmapFilterMode> for ffi::WGPUMipmapFilterMode {
1391    fn from(value: MipmapFilterMode) -> Self {
1392        value as ffi::WGPUMipmapFilterMode
1393    }
1394}
1395#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
1396#[repr(u32)]
1397pub enum OptionalBool {
1398    False = ffi::WGPUOptionalBool_WGPUOptionalBool_False as u32,
1399    True = ffi::WGPUOptionalBool_WGPUOptionalBool_True as u32,
1400    Undefined = ffi::WGPUOptionalBool_WGPUOptionalBool_Undefined as u32,
1401}
1402impl From<ffi::WGPUOptionalBool> for OptionalBool {
1403    fn from(value: ffi::WGPUOptionalBool) -> Self {
1404        match value as u32 {
1405            ffi::WGPUOptionalBool_WGPUOptionalBool_False => OptionalBool::False,
1406            ffi::WGPUOptionalBool_WGPUOptionalBool_True => OptionalBool::True,
1407            ffi::WGPUOptionalBool_WGPUOptionalBool_Undefined => OptionalBool::Undefined,
1408            _ => OptionalBool::False,
1409        }
1410    }
1411}
1412impl From<OptionalBool> for ffi::WGPUOptionalBool {
1413    fn from(value: OptionalBool) -> Self {
1414        value as ffi::WGPUOptionalBool
1415    }
1416}
1417#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
1418#[repr(u32)]
1419pub enum PopErrorScopeStatus {
1420    Success = ffi::WGPUPopErrorScopeStatus_WGPUPopErrorScopeStatus_Success as u32,
1421    CallbackCancelled = ffi::WGPUPopErrorScopeStatus_WGPUPopErrorScopeStatus_CallbackCancelled
1422        as u32,
1423    Error = ffi::WGPUPopErrorScopeStatus_WGPUPopErrorScopeStatus_Error as u32,
1424}
1425impl From<ffi::WGPUPopErrorScopeStatus> for PopErrorScopeStatus {
1426    fn from(value: ffi::WGPUPopErrorScopeStatus) -> Self {
1427        match value as u32 {
1428            ffi::WGPUPopErrorScopeStatus_WGPUPopErrorScopeStatus_Success => {
1429                PopErrorScopeStatus::Success
1430            }
1431            ffi::WGPUPopErrorScopeStatus_WGPUPopErrorScopeStatus_CallbackCancelled => {
1432                PopErrorScopeStatus::CallbackCancelled
1433            }
1434            ffi::WGPUPopErrorScopeStatus_WGPUPopErrorScopeStatus_Error => {
1435                PopErrorScopeStatus::Error
1436            }
1437            _ => PopErrorScopeStatus::Success,
1438        }
1439    }
1440}
1441impl From<PopErrorScopeStatus> for ffi::WGPUPopErrorScopeStatus {
1442    fn from(value: PopErrorScopeStatus) -> Self {
1443        value as ffi::WGPUPopErrorScopeStatus
1444    }
1445}
1446#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
1447#[repr(u32)]
1448pub enum PowerPreference {
1449    Undefined = ffi::WGPUPowerPreference_WGPUPowerPreference_Undefined as u32,
1450    LowPower = ffi::WGPUPowerPreference_WGPUPowerPreference_LowPower as u32,
1451    HighPerformance = ffi::WGPUPowerPreference_WGPUPowerPreference_HighPerformance
1452        as u32,
1453}
1454impl From<ffi::WGPUPowerPreference> for PowerPreference {
1455    fn from(value: ffi::WGPUPowerPreference) -> Self {
1456        match value as u32 {
1457            ffi::WGPUPowerPreference_WGPUPowerPreference_Undefined => {
1458                PowerPreference::Undefined
1459            }
1460            ffi::WGPUPowerPreference_WGPUPowerPreference_LowPower => {
1461                PowerPreference::LowPower
1462            }
1463            ffi::WGPUPowerPreference_WGPUPowerPreference_HighPerformance => {
1464                PowerPreference::HighPerformance
1465            }
1466            _ => PowerPreference::Undefined,
1467        }
1468    }
1469}
1470impl From<PowerPreference> for ffi::WGPUPowerPreference {
1471    fn from(value: PowerPreference) -> Self {
1472        value as ffi::WGPUPowerPreference
1473    }
1474}
1475#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
1476#[repr(u32)]
1477pub enum PredefinedColorSpace {
1478    SRgb = ffi::WGPUPredefinedColorSpace_WGPUPredefinedColorSpace_SRGB as u32,
1479    DisplayP3 = ffi::WGPUPredefinedColorSpace_WGPUPredefinedColorSpace_DisplayP3 as u32,
1480}
1481impl From<ffi::WGPUPredefinedColorSpace> for PredefinedColorSpace {
1482    fn from(value: ffi::WGPUPredefinedColorSpace) -> Self {
1483        match value as u32 {
1484            ffi::WGPUPredefinedColorSpace_WGPUPredefinedColorSpace_SRGB => {
1485                PredefinedColorSpace::SRgb
1486            }
1487            ffi::WGPUPredefinedColorSpace_WGPUPredefinedColorSpace_DisplayP3 => {
1488                PredefinedColorSpace::DisplayP3
1489            }
1490            _ => PredefinedColorSpace::SRgb,
1491        }
1492    }
1493}
1494impl From<PredefinedColorSpace> for ffi::WGPUPredefinedColorSpace {
1495    fn from(value: PredefinedColorSpace) -> Self {
1496        value as ffi::WGPUPredefinedColorSpace
1497    }
1498}
1499#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
1500#[repr(u32)]
1501pub enum PresentMode {
1502    Undefined = ffi::WGPUPresentMode_WGPUPresentMode_Undefined as u32,
1503    Fifo = ffi::WGPUPresentMode_WGPUPresentMode_Fifo as u32,
1504    FifoRelaxed = ffi::WGPUPresentMode_WGPUPresentMode_FifoRelaxed as u32,
1505    Immediate = ffi::WGPUPresentMode_WGPUPresentMode_Immediate as u32,
1506    Mailbox = ffi::WGPUPresentMode_WGPUPresentMode_Mailbox as u32,
1507}
1508impl From<ffi::WGPUPresentMode> for PresentMode {
1509    fn from(value: ffi::WGPUPresentMode) -> Self {
1510        match value as u32 {
1511            ffi::WGPUPresentMode_WGPUPresentMode_Undefined => PresentMode::Undefined,
1512            ffi::WGPUPresentMode_WGPUPresentMode_Fifo => PresentMode::Fifo,
1513            ffi::WGPUPresentMode_WGPUPresentMode_FifoRelaxed => PresentMode::FifoRelaxed,
1514            ffi::WGPUPresentMode_WGPUPresentMode_Immediate => PresentMode::Immediate,
1515            ffi::WGPUPresentMode_WGPUPresentMode_Mailbox => PresentMode::Mailbox,
1516            _ => PresentMode::Undefined,
1517        }
1518    }
1519}
1520impl From<PresentMode> for ffi::WGPUPresentMode {
1521    fn from(value: PresentMode) -> Self {
1522        value as ffi::WGPUPresentMode
1523    }
1524}
1525#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
1526#[repr(u32)]
1527pub enum PrimitiveTopology {
1528    Undefined = ffi::WGPUPrimitiveTopology_WGPUPrimitiveTopology_Undefined as u32,
1529    PointList = ffi::WGPUPrimitiveTopology_WGPUPrimitiveTopology_PointList as u32,
1530    LineList = ffi::WGPUPrimitiveTopology_WGPUPrimitiveTopology_LineList as u32,
1531    LineStrip = ffi::WGPUPrimitiveTopology_WGPUPrimitiveTopology_LineStrip as u32,
1532    TriangleList = ffi::WGPUPrimitiveTopology_WGPUPrimitiveTopology_TriangleList as u32,
1533    TriangleStrip = ffi::WGPUPrimitiveTopology_WGPUPrimitiveTopology_TriangleStrip
1534        as u32,
1535}
1536impl From<ffi::WGPUPrimitiveTopology> for PrimitiveTopology {
1537    fn from(value: ffi::WGPUPrimitiveTopology) -> Self {
1538        match value as u32 {
1539            ffi::WGPUPrimitiveTopology_WGPUPrimitiveTopology_Undefined => {
1540                PrimitiveTopology::Undefined
1541            }
1542            ffi::WGPUPrimitiveTopology_WGPUPrimitiveTopology_PointList => {
1543                PrimitiveTopology::PointList
1544            }
1545            ffi::WGPUPrimitiveTopology_WGPUPrimitiveTopology_LineList => {
1546                PrimitiveTopology::LineList
1547            }
1548            ffi::WGPUPrimitiveTopology_WGPUPrimitiveTopology_LineStrip => {
1549                PrimitiveTopology::LineStrip
1550            }
1551            ffi::WGPUPrimitiveTopology_WGPUPrimitiveTopology_TriangleList => {
1552                PrimitiveTopology::TriangleList
1553            }
1554            ffi::WGPUPrimitiveTopology_WGPUPrimitiveTopology_TriangleStrip => {
1555                PrimitiveTopology::TriangleStrip
1556            }
1557            _ => PrimitiveTopology::Undefined,
1558        }
1559    }
1560}
1561impl From<PrimitiveTopology> for ffi::WGPUPrimitiveTopology {
1562    fn from(value: PrimitiveTopology) -> Self {
1563        value as ffi::WGPUPrimitiveTopology
1564    }
1565}
1566#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
1567#[repr(u32)]
1568pub enum QueryType {
1569    Occlusion = ffi::WGPUQueryType_WGPUQueryType_Occlusion as u32,
1570    Timestamp = ffi::WGPUQueryType_WGPUQueryType_Timestamp as u32,
1571}
1572impl From<ffi::WGPUQueryType> for QueryType {
1573    fn from(value: ffi::WGPUQueryType) -> Self {
1574        match value as u32 {
1575            ffi::WGPUQueryType_WGPUQueryType_Occlusion => QueryType::Occlusion,
1576            ffi::WGPUQueryType_WGPUQueryType_Timestamp => QueryType::Timestamp,
1577            _ => QueryType::Occlusion,
1578        }
1579    }
1580}
1581impl From<QueryType> for ffi::WGPUQueryType {
1582    fn from(value: QueryType) -> Self {
1583        value as ffi::WGPUQueryType
1584    }
1585}
1586#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
1587#[repr(u32)]
1588pub enum QueueWorkDoneStatus {
1589    Success = ffi::WGPUQueueWorkDoneStatus_WGPUQueueWorkDoneStatus_Success as u32,
1590    CallbackCancelled = ffi::WGPUQueueWorkDoneStatus_WGPUQueueWorkDoneStatus_CallbackCancelled
1591        as u32,
1592    Error = ffi::WGPUQueueWorkDoneStatus_WGPUQueueWorkDoneStatus_Error as u32,
1593}
1594impl From<ffi::WGPUQueueWorkDoneStatus> for QueueWorkDoneStatus {
1595    fn from(value: ffi::WGPUQueueWorkDoneStatus) -> Self {
1596        match value as u32 {
1597            ffi::WGPUQueueWorkDoneStatus_WGPUQueueWorkDoneStatus_Success => {
1598                QueueWorkDoneStatus::Success
1599            }
1600            ffi::WGPUQueueWorkDoneStatus_WGPUQueueWorkDoneStatus_CallbackCancelled => {
1601                QueueWorkDoneStatus::CallbackCancelled
1602            }
1603            ffi::WGPUQueueWorkDoneStatus_WGPUQueueWorkDoneStatus_Error => {
1604                QueueWorkDoneStatus::Error
1605            }
1606            _ => QueueWorkDoneStatus::Success,
1607        }
1608    }
1609}
1610impl From<QueueWorkDoneStatus> for ffi::WGPUQueueWorkDoneStatus {
1611    fn from(value: QueueWorkDoneStatus) -> Self {
1612        value as ffi::WGPUQueueWorkDoneStatus
1613    }
1614}
1615#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
1616#[repr(u32)]
1617pub enum RequestAdapterStatus {
1618    Success = ffi::WGPURequestAdapterStatus_WGPURequestAdapterStatus_Success as u32,
1619    CallbackCancelled = ffi::WGPURequestAdapterStatus_WGPURequestAdapterStatus_CallbackCancelled
1620        as u32,
1621    Unavailable = ffi::WGPURequestAdapterStatus_WGPURequestAdapterStatus_Unavailable
1622        as u32,
1623    Error = ffi::WGPURequestAdapterStatus_WGPURequestAdapterStatus_Error as u32,
1624}
1625impl From<ffi::WGPURequestAdapterStatus> for RequestAdapterStatus {
1626    fn from(value: ffi::WGPURequestAdapterStatus) -> Self {
1627        match value as u32 {
1628            ffi::WGPURequestAdapterStatus_WGPURequestAdapterStatus_Success => {
1629                RequestAdapterStatus::Success
1630            }
1631            ffi::WGPURequestAdapterStatus_WGPURequestAdapterStatus_CallbackCancelled => {
1632                RequestAdapterStatus::CallbackCancelled
1633            }
1634            ffi::WGPURequestAdapterStatus_WGPURequestAdapterStatus_Unavailable => {
1635                RequestAdapterStatus::Unavailable
1636            }
1637            ffi::WGPURequestAdapterStatus_WGPURequestAdapterStatus_Error => {
1638                RequestAdapterStatus::Error
1639            }
1640            _ => RequestAdapterStatus::Success,
1641        }
1642    }
1643}
1644impl From<RequestAdapterStatus> for ffi::WGPURequestAdapterStatus {
1645    fn from(value: RequestAdapterStatus) -> Self {
1646        value as ffi::WGPURequestAdapterStatus
1647    }
1648}
1649#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
1650#[repr(u32)]
1651pub enum RequestDeviceStatus {
1652    Success = ffi::WGPURequestDeviceStatus_WGPURequestDeviceStatus_Success as u32,
1653    CallbackCancelled = ffi::WGPURequestDeviceStatus_WGPURequestDeviceStatus_CallbackCancelled
1654        as u32,
1655    Error = ffi::WGPURequestDeviceStatus_WGPURequestDeviceStatus_Error as u32,
1656}
1657impl From<ffi::WGPURequestDeviceStatus> for RequestDeviceStatus {
1658    fn from(value: ffi::WGPURequestDeviceStatus) -> Self {
1659        match value as u32 {
1660            ffi::WGPURequestDeviceStatus_WGPURequestDeviceStatus_Success => {
1661                RequestDeviceStatus::Success
1662            }
1663            ffi::WGPURequestDeviceStatus_WGPURequestDeviceStatus_CallbackCancelled => {
1664                RequestDeviceStatus::CallbackCancelled
1665            }
1666            ffi::WGPURequestDeviceStatus_WGPURequestDeviceStatus_Error => {
1667                RequestDeviceStatus::Error
1668            }
1669            _ => RequestDeviceStatus::Success,
1670        }
1671    }
1672}
1673impl From<RequestDeviceStatus> for ffi::WGPURequestDeviceStatus {
1674    fn from(value: RequestDeviceStatus) -> Self {
1675        value as ffi::WGPURequestDeviceStatus
1676    }
1677}
1678#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
1679#[repr(u32)]
1680pub enum SType {
1681    ShaderSourceSPIRV = ffi::WGPUSType_WGPUSType_ShaderSourceSPIRV as u32,
1682    ShaderSourceWGSL = ffi::WGPUSType_WGPUSType_ShaderSourceWGSL as u32,
1683    RenderPassMaxDrawCount = ffi::WGPUSType_WGPUSType_RenderPassMaxDrawCount as u32,
1684    SurfaceSourceMetalLayer = ffi::WGPUSType_WGPUSType_SurfaceSourceMetalLayer as u32,
1685    SurfaceSourceWindowsHWND = ffi::WGPUSType_WGPUSType_SurfaceSourceWindowsHWND as u32,
1686    SurfaceSourceXlibWindow = ffi::WGPUSType_WGPUSType_SurfaceSourceXlibWindow as u32,
1687    SurfaceSourceWaylandSurface = ffi::WGPUSType_WGPUSType_SurfaceSourceWaylandSurface
1688        as u32,
1689    SurfaceSourceAndroidNativeWindow = ffi::WGPUSType_WGPUSType_SurfaceSourceAndroidNativeWindow
1690        as u32,
1691    SurfaceSourceXCBWindow = ffi::WGPUSType_WGPUSType_SurfaceSourceXCBWindow as u32,
1692    SurfaceColorManagement = ffi::WGPUSType_WGPUSType_SurfaceColorManagement as u32,
1693    RequestAdapterWebXROptions = ffi::WGPUSType_WGPUSType_RequestAdapterWebXROptions
1694        as u32,
1695    TextureComponentSwizzleDescriptor = ffi::WGPUSType_WGPUSType_TextureComponentSwizzleDescriptor
1696        as u32,
1697    CompatibilityModeLimits = ffi::WGPUSType_WGPUSType_CompatibilityModeLimits as u32,
1698    TextureBindingViewDimensionDescriptor = ffi::WGPUSType_WGPUSType_TextureBindingViewDimensionDescriptor
1699        as u32,
1700    EmscriptenSurfaceSourceCanvasHTMLSelector = ffi::WGPUSType_WGPUSType_EmscriptenSurfaceSourceCanvasHTMLSelector
1701        as u32,
1702    SurfaceDescriptorFromWindowsCoreWindow = ffi::WGPUSType_WGPUSType_SurfaceDescriptorFromWindowsCoreWindow
1703        as u32,
1704    ExternalTextureBindingEntry = ffi::WGPUSType_WGPUSType_ExternalTextureBindingEntry
1705        as u32,
1706    ExternalTextureBindingLayout = ffi::WGPUSType_WGPUSType_ExternalTextureBindingLayout
1707        as u32,
1708    SurfaceDescriptorFromWindowsUWPSwapChainPanel = ffi::WGPUSType_WGPUSType_SurfaceDescriptorFromWindowsUWPSwapChainPanel
1709        as u32,
1710    DawnTextureInternalUsageDescriptor = ffi::WGPUSType_WGPUSType_DawnTextureInternalUsageDescriptor
1711        as u32,
1712    DawnEncoderInternalUsageDescriptor = ffi::WGPUSType_WGPUSType_DawnEncoderInternalUsageDescriptor
1713        as u32,
1714    DawnInstanceDescriptor = ffi::WGPUSType_WGPUSType_DawnInstanceDescriptor as u32,
1715    DawnCacheDeviceDescriptor = ffi::WGPUSType_WGPUSType_DawnCacheDeviceDescriptor
1716        as u32,
1717    DawnAdapterPropertiesPowerPreference = ffi::WGPUSType_WGPUSType_DawnAdapterPropertiesPowerPreference
1718        as u32,
1719    DawnBufferDescriptorErrorInfoFromWireClient = ffi::WGPUSType_WGPUSType_DawnBufferDescriptorErrorInfoFromWireClient
1720        as u32,
1721    DawnTogglesDescriptor = ffi::WGPUSType_WGPUSType_DawnTogglesDescriptor as u32,
1722    DawnShaderModuleSPIRVOptionsDescriptor = ffi::WGPUSType_WGPUSType_DawnShaderModuleSPIRVOptionsDescriptor
1723        as u32,
1724    RequestAdapterOptionsLuid = ffi::WGPUSType_WGPUSType_RequestAdapterOptionsLUID
1725        as u32,
1726    RequestAdapterOptionsGetGlProc = ffi::WGPUSType_WGPUSType_RequestAdapterOptionsGetGLProc
1727        as u32,
1728    RequestAdapterOptionsD3D11Device = ffi::WGPUSType_WGPUSType_RequestAdapterOptionsD3D11Device
1729        as u32,
1730    DawnRenderPassSampleCount = ffi::WGPUSType_WGPUSType_DawnRenderPassSampleCount
1731        as u32,
1732    RenderPassPixelLocalStorage = ffi::WGPUSType_WGPUSType_RenderPassPixelLocalStorage
1733        as u32,
1734    PipelineLayoutPixelLocalStorage = ffi::WGPUSType_WGPUSType_PipelineLayoutPixelLocalStorage
1735        as u32,
1736    BufferHostMappedPointer = ffi::WGPUSType_WGPUSType_BufferHostMappedPointer as u32,
1737    AdapterPropertiesMemoryHeaps = ffi::WGPUSType_WGPUSType_AdapterPropertiesMemoryHeaps
1738        as u32,
1739    AdapterPropertiesD3D = ffi::WGPUSType_WGPUSType_AdapterPropertiesD3D as u32,
1740    AdapterPropertiesVk = ffi::WGPUSType_WGPUSType_AdapterPropertiesVk as u32,
1741    DawnWireWGSLControl = ffi::WGPUSType_WGPUSType_DawnWireWGSLControl as u32,
1742    DawnWGSLBlocklist = ffi::WGPUSType_WGPUSType_DawnWGSLBlocklist as u32,
1743    DawnDrmFormatCapabilities = ffi::WGPUSType_WGPUSType_DawnDrmFormatCapabilities
1744        as u32,
1745    ShaderModuleCompilationOptions = ffi::WGPUSType_WGPUSType_ShaderModuleCompilationOptions
1746        as u32,
1747    ColorTargetStateExpandResolveTextureDawn = ffi::WGPUSType_WGPUSType_ColorTargetStateExpandResolveTextureDawn
1748        as u32,
1749    RenderPassDescriptorExpandResolveRect = ffi::WGPUSType_WGPUSType_RenderPassDescriptorExpandResolveRect
1750        as u32,
1751    SharedTextureMemoryVkDedicatedAllocationDescriptor = ffi::WGPUSType_WGPUSType_SharedTextureMemoryVkDedicatedAllocationDescriptor
1752        as u32,
1753    SharedTextureMemoryAHardwareBufferDescriptor = ffi::WGPUSType_WGPUSType_SharedTextureMemoryAHardwareBufferDescriptor
1754        as u32,
1755    SharedTextureMemoryDmaBufDescriptor = ffi::WGPUSType_WGPUSType_SharedTextureMemoryDmaBufDescriptor
1756        as u32,
1757    SharedTextureMemoryOpaqueFDDescriptor = ffi::WGPUSType_WGPUSType_SharedTextureMemoryOpaqueFDDescriptor
1758        as u32,
1759    SharedTextureMemoryZirconHandleDescriptor = ffi::WGPUSType_WGPUSType_SharedTextureMemoryZirconHandleDescriptor
1760        as u32,
1761    SharedTextureMemoryDXGISharedHandleDescriptor = ffi::WGPUSType_WGPUSType_SharedTextureMemoryDXGISharedHandleDescriptor
1762        as u32,
1763    SharedTextureMemoryD3D11Texture2DDescriptor = ffi::WGPUSType_WGPUSType_SharedTextureMemoryD3D11Texture2DDescriptor
1764        as u32,
1765    SharedTextureMemoryIOSurfaceDescriptor = ffi::WGPUSType_WGPUSType_SharedTextureMemoryIOSurfaceDescriptor
1766        as u32,
1767    SharedTextureMemoryEGLImageDescriptor = ffi::WGPUSType_WGPUSType_SharedTextureMemoryEGLImageDescriptor
1768        as u32,
1769    SharedTextureMemoryInitializedBeginState = ffi::WGPUSType_WGPUSType_SharedTextureMemoryInitializedBeginState
1770        as u32,
1771    SharedTextureMemoryInitializedEndState = ffi::WGPUSType_WGPUSType_SharedTextureMemoryInitializedEndState
1772        as u32,
1773    SharedTextureMemoryVkImageLayoutBeginState = ffi::WGPUSType_WGPUSType_SharedTextureMemoryVkImageLayoutBeginState
1774        as u32,
1775    SharedTextureMemoryVkImageLayoutEndState = ffi::WGPUSType_WGPUSType_SharedTextureMemoryVkImageLayoutEndState
1776        as u32,
1777    SharedTextureMemoryD3DSwapchainBeginState = ffi::WGPUSType_WGPUSType_SharedTextureMemoryD3DSwapchainBeginState
1778        as u32,
1779    SharedFenceVkSemaphoreOpaqueFDDescriptor = ffi::WGPUSType_WGPUSType_SharedFenceVkSemaphoreOpaqueFDDescriptor
1780        as u32,
1781    SharedFenceVkSemaphoreOpaqueFDExportInfo = ffi::WGPUSType_WGPUSType_SharedFenceVkSemaphoreOpaqueFDExportInfo
1782        as u32,
1783    SharedFenceSyncFDDescriptor = ffi::WGPUSType_WGPUSType_SharedFenceSyncFDDescriptor
1784        as u32,
1785    SharedFenceSyncFDExportInfo = ffi::WGPUSType_WGPUSType_SharedFenceSyncFDExportInfo
1786        as u32,
1787    SharedFenceVkSemaphoreZirconHandleDescriptor = ffi::WGPUSType_WGPUSType_SharedFenceVkSemaphoreZirconHandleDescriptor
1788        as u32,
1789    SharedFenceVkSemaphoreZirconHandleExportInfo = ffi::WGPUSType_WGPUSType_SharedFenceVkSemaphoreZirconHandleExportInfo
1790        as u32,
1791    SharedFenceDXGISharedHandleDescriptor = ffi::WGPUSType_WGPUSType_SharedFenceDXGISharedHandleDescriptor
1792        as u32,
1793    SharedFenceDXGISharedHandleExportInfo = ffi::WGPUSType_WGPUSType_SharedFenceDXGISharedHandleExportInfo
1794        as u32,
1795    SharedFenceMTLSharedEventDescriptor = ffi::WGPUSType_WGPUSType_SharedFenceMTLSharedEventDescriptor
1796        as u32,
1797    SharedFenceMTLSharedEventExportInfo = ffi::WGPUSType_WGPUSType_SharedFenceMTLSharedEventExportInfo
1798        as u32,
1799    SharedBufferMemoryD3D12ResourceDescriptor = ffi::WGPUSType_WGPUSType_SharedBufferMemoryD3D12ResourceDescriptor
1800        as u32,
1801    StaticSamplerBindingLayout = ffi::WGPUSType_WGPUSType_StaticSamplerBindingLayout
1802        as u32,
1803    YCbCrVkDescriptor = ffi::WGPUSType_WGPUSType_YCbCrVkDescriptor as u32,
1804    SharedTextureMemoryAHardwareBufferProperties = ffi::WGPUSType_WGPUSType_SharedTextureMemoryAHardwareBufferProperties
1805        as u32,
1806    AHardwareBufferProperties = ffi::WGPUSType_WGPUSType_AHardwareBufferProperties
1807        as u32,
1808    DawnTexelCopyBufferRowAlignmentLimits = ffi::WGPUSType_WGPUSType_DawnTexelCopyBufferRowAlignmentLimits
1809        as u32,
1810    AdapterPropertiesSubgroupMatrixConfigs = ffi::WGPUSType_WGPUSType_AdapterPropertiesSubgroupMatrixConfigs
1811        as u32,
1812    SharedFenceEGLSyncDescriptor = ffi::WGPUSType_WGPUSType_SharedFenceEGLSyncDescriptor
1813        as u32,
1814    SharedFenceEGLSyncExportInfo = ffi::WGPUSType_WGPUSType_SharedFenceEGLSyncExportInfo
1815        as u32,
1816    DawnInjectedInvalidSType = ffi::WGPUSType_WGPUSType_DawnInjectedInvalidSType as u32,
1817    DawnCompilationMessageUtf16 = ffi::WGPUSType_WGPUSType_DawnCompilationMessageUtf16
1818        as u32,
1819    DawnFakeBufferOOMForTesting = ffi::WGPUSType_WGPUSType_DawnFakeBufferOOMForTesting
1820        as u32,
1821    SurfaceDescriptorFromWindowsWinUISwapChainPanel = ffi::WGPUSType_WGPUSType_SurfaceDescriptorFromWindowsWinUISwapChainPanel
1822        as u32,
1823    DawnDeviceAllocatorControl = ffi::WGPUSType_WGPUSType_DawnDeviceAllocatorControl
1824        as u32,
1825    DawnHostMappedPointerLimits = ffi::WGPUSType_WGPUSType_DawnHostMappedPointerLimits
1826        as u32,
1827    RenderPassDescriptorResolveRect = ffi::WGPUSType_WGPUSType_RenderPassDescriptorResolveRect
1828        as u32,
1829    RequestAdapterWebGPUBackendOptions = ffi::WGPUSType_WGPUSType_RequestAdapterWebGPUBackendOptions
1830        as u32,
1831    DawnFakeDeviceInitializeErrorForTesting = ffi::WGPUSType_WGPUSType_DawnFakeDeviceInitializeErrorForTesting
1832        as u32,
1833    SharedTextureMemoryD3D11BeginState = ffi::WGPUSType_WGPUSType_SharedTextureMemoryD3D11BeginState
1834        as u32,
1835    DawnConsumeAdapterDescriptor = ffi::WGPUSType_WGPUSType_DawnConsumeAdapterDescriptor
1836        as u32,
1837    TexelBufferBindingEntry = ffi::WGPUSType_WGPUSType_TexelBufferBindingEntry as u32,
1838    TexelBufferBindingLayout = ffi::WGPUSType_WGPUSType_TexelBufferBindingLayout as u32,
1839    SharedTextureMemoryMetalEndAccessState = ffi::WGPUSType_WGPUSType_SharedTextureMemoryMetalEndAccessState
1840        as u32,
1841    AdapterPropertiesWGPU = ffi::WGPUSType_WGPUSType_AdapterPropertiesWGPU as u32,
1842    SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor = ffi::WGPUSType_WGPUSType_SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor
1843        as u32,
1844    SharedTextureMemoryD3D12ResourceDescriptor = ffi::WGPUSType_WGPUSType_SharedTextureMemoryD3D12ResourceDescriptor
1845        as u32,
1846    RequestAdapterOptionsAngleVirtualizationGroup = ffi::WGPUSType_WGPUSType_RequestAdapterOptionsAngleVirtualizationGroup
1847        as u32,
1848    ResourceTableLimits = ffi::WGPUSType_WGPUSType_ResourceTableLimits as u32,
1849    PipelineLayoutResourceTable = ffi::WGPUSType_WGPUSType_PipelineLayoutResourceTable
1850        as u32,
1851    AdapterPropertiesExplicitComputeSubgroupSizeConfigs = ffi::WGPUSType_WGPUSType_AdapterPropertiesExplicitComputeSubgroupSizeConfigs
1852        as u32,
1853    DawnRenderPassColorAttachmentRenderToSingleSampled = ffi::WGPUSType_WGPUSType_DawnRenderPassColorAttachmentRenderToSingleSampled
1854        as u32,
1855}
1856impl From<ffi::WGPUSType> for SType {
1857    fn from(value: ffi::WGPUSType) -> Self {
1858        match value as u32 {
1859            ffi::WGPUSType_WGPUSType_ShaderSourceSPIRV => SType::ShaderSourceSPIRV,
1860            ffi::WGPUSType_WGPUSType_ShaderSourceWGSL => SType::ShaderSourceWGSL,
1861            ffi::WGPUSType_WGPUSType_RenderPassMaxDrawCount => {
1862                SType::RenderPassMaxDrawCount
1863            }
1864            ffi::WGPUSType_WGPUSType_SurfaceSourceMetalLayer => {
1865                SType::SurfaceSourceMetalLayer
1866            }
1867            ffi::WGPUSType_WGPUSType_SurfaceSourceWindowsHWND => {
1868                SType::SurfaceSourceWindowsHWND
1869            }
1870            ffi::WGPUSType_WGPUSType_SurfaceSourceXlibWindow => {
1871                SType::SurfaceSourceXlibWindow
1872            }
1873            ffi::WGPUSType_WGPUSType_SurfaceSourceWaylandSurface => {
1874                SType::SurfaceSourceWaylandSurface
1875            }
1876            ffi::WGPUSType_WGPUSType_SurfaceSourceAndroidNativeWindow => {
1877                SType::SurfaceSourceAndroidNativeWindow
1878            }
1879            ffi::WGPUSType_WGPUSType_SurfaceSourceXCBWindow => {
1880                SType::SurfaceSourceXCBWindow
1881            }
1882            ffi::WGPUSType_WGPUSType_SurfaceColorManagement => {
1883                SType::SurfaceColorManagement
1884            }
1885            ffi::WGPUSType_WGPUSType_RequestAdapterWebXROptions => {
1886                SType::RequestAdapterWebXROptions
1887            }
1888            ffi::WGPUSType_WGPUSType_TextureComponentSwizzleDescriptor => {
1889                SType::TextureComponentSwizzleDescriptor
1890            }
1891            ffi::WGPUSType_WGPUSType_CompatibilityModeLimits => {
1892                SType::CompatibilityModeLimits
1893            }
1894            ffi::WGPUSType_WGPUSType_TextureBindingViewDimensionDescriptor => {
1895                SType::TextureBindingViewDimensionDescriptor
1896            }
1897            ffi::WGPUSType_WGPUSType_EmscriptenSurfaceSourceCanvasHTMLSelector => {
1898                SType::EmscriptenSurfaceSourceCanvasHTMLSelector
1899            }
1900            ffi::WGPUSType_WGPUSType_SurfaceDescriptorFromWindowsCoreWindow => {
1901                SType::SurfaceDescriptorFromWindowsCoreWindow
1902            }
1903            ffi::WGPUSType_WGPUSType_ExternalTextureBindingEntry => {
1904                SType::ExternalTextureBindingEntry
1905            }
1906            ffi::WGPUSType_WGPUSType_ExternalTextureBindingLayout => {
1907                SType::ExternalTextureBindingLayout
1908            }
1909            ffi::WGPUSType_WGPUSType_SurfaceDescriptorFromWindowsUWPSwapChainPanel => {
1910                SType::SurfaceDescriptorFromWindowsUWPSwapChainPanel
1911            }
1912            ffi::WGPUSType_WGPUSType_DawnTextureInternalUsageDescriptor => {
1913                SType::DawnTextureInternalUsageDescriptor
1914            }
1915            ffi::WGPUSType_WGPUSType_DawnEncoderInternalUsageDescriptor => {
1916                SType::DawnEncoderInternalUsageDescriptor
1917            }
1918            ffi::WGPUSType_WGPUSType_DawnInstanceDescriptor => {
1919                SType::DawnInstanceDescriptor
1920            }
1921            ffi::WGPUSType_WGPUSType_DawnCacheDeviceDescriptor => {
1922                SType::DawnCacheDeviceDescriptor
1923            }
1924            ffi::WGPUSType_WGPUSType_DawnAdapterPropertiesPowerPreference => {
1925                SType::DawnAdapterPropertiesPowerPreference
1926            }
1927            ffi::WGPUSType_WGPUSType_DawnBufferDescriptorErrorInfoFromWireClient => {
1928                SType::DawnBufferDescriptorErrorInfoFromWireClient
1929            }
1930            ffi::WGPUSType_WGPUSType_DawnTogglesDescriptor => {
1931                SType::DawnTogglesDescriptor
1932            }
1933            ffi::WGPUSType_WGPUSType_DawnShaderModuleSPIRVOptionsDescriptor => {
1934                SType::DawnShaderModuleSPIRVOptionsDescriptor
1935            }
1936            ffi::WGPUSType_WGPUSType_RequestAdapterOptionsLUID => {
1937                SType::RequestAdapterOptionsLuid
1938            }
1939            ffi::WGPUSType_WGPUSType_RequestAdapterOptionsGetGLProc => {
1940                SType::RequestAdapterOptionsGetGlProc
1941            }
1942            ffi::WGPUSType_WGPUSType_RequestAdapterOptionsD3D11Device => {
1943                SType::RequestAdapterOptionsD3D11Device
1944            }
1945            ffi::WGPUSType_WGPUSType_DawnRenderPassSampleCount => {
1946                SType::DawnRenderPassSampleCount
1947            }
1948            ffi::WGPUSType_WGPUSType_RenderPassPixelLocalStorage => {
1949                SType::RenderPassPixelLocalStorage
1950            }
1951            ffi::WGPUSType_WGPUSType_PipelineLayoutPixelLocalStorage => {
1952                SType::PipelineLayoutPixelLocalStorage
1953            }
1954            ffi::WGPUSType_WGPUSType_BufferHostMappedPointer => {
1955                SType::BufferHostMappedPointer
1956            }
1957            ffi::WGPUSType_WGPUSType_AdapterPropertiesMemoryHeaps => {
1958                SType::AdapterPropertiesMemoryHeaps
1959            }
1960            ffi::WGPUSType_WGPUSType_AdapterPropertiesD3D => SType::AdapterPropertiesD3D,
1961            ffi::WGPUSType_WGPUSType_AdapterPropertiesVk => SType::AdapterPropertiesVk,
1962            ffi::WGPUSType_WGPUSType_DawnWireWGSLControl => SType::DawnWireWGSLControl,
1963            ffi::WGPUSType_WGPUSType_DawnWGSLBlocklist => SType::DawnWGSLBlocklist,
1964            ffi::WGPUSType_WGPUSType_DawnDrmFormatCapabilities => {
1965                SType::DawnDrmFormatCapabilities
1966            }
1967            ffi::WGPUSType_WGPUSType_ShaderModuleCompilationOptions => {
1968                SType::ShaderModuleCompilationOptions
1969            }
1970            ffi::WGPUSType_WGPUSType_ColorTargetStateExpandResolveTextureDawn => {
1971                SType::ColorTargetStateExpandResolveTextureDawn
1972            }
1973            ffi::WGPUSType_WGPUSType_RenderPassDescriptorExpandResolveRect => {
1974                SType::RenderPassDescriptorExpandResolveRect
1975            }
1976            ffi::WGPUSType_WGPUSType_SharedTextureMemoryVkDedicatedAllocationDescriptor => {
1977                SType::SharedTextureMemoryVkDedicatedAllocationDescriptor
1978            }
1979            ffi::WGPUSType_WGPUSType_SharedTextureMemoryAHardwareBufferDescriptor => {
1980                SType::SharedTextureMemoryAHardwareBufferDescriptor
1981            }
1982            ffi::WGPUSType_WGPUSType_SharedTextureMemoryDmaBufDescriptor => {
1983                SType::SharedTextureMemoryDmaBufDescriptor
1984            }
1985            ffi::WGPUSType_WGPUSType_SharedTextureMemoryOpaqueFDDescriptor => {
1986                SType::SharedTextureMemoryOpaqueFDDescriptor
1987            }
1988            ffi::WGPUSType_WGPUSType_SharedTextureMemoryZirconHandleDescriptor => {
1989                SType::SharedTextureMemoryZirconHandleDescriptor
1990            }
1991            ffi::WGPUSType_WGPUSType_SharedTextureMemoryDXGISharedHandleDescriptor => {
1992                SType::SharedTextureMemoryDXGISharedHandleDescriptor
1993            }
1994            ffi::WGPUSType_WGPUSType_SharedTextureMemoryD3D11Texture2DDescriptor => {
1995                SType::SharedTextureMemoryD3D11Texture2DDescriptor
1996            }
1997            ffi::WGPUSType_WGPUSType_SharedTextureMemoryIOSurfaceDescriptor => {
1998                SType::SharedTextureMemoryIOSurfaceDescriptor
1999            }
2000            ffi::WGPUSType_WGPUSType_SharedTextureMemoryEGLImageDescriptor => {
2001                SType::SharedTextureMemoryEGLImageDescriptor
2002            }
2003            ffi::WGPUSType_WGPUSType_SharedTextureMemoryInitializedBeginState => {
2004                SType::SharedTextureMemoryInitializedBeginState
2005            }
2006            ffi::WGPUSType_WGPUSType_SharedTextureMemoryInitializedEndState => {
2007                SType::SharedTextureMemoryInitializedEndState
2008            }
2009            ffi::WGPUSType_WGPUSType_SharedTextureMemoryVkImageLayoutBeginState => {
2010                SType::SharedTextureMemoryVkImageLayoutBeginState
2011            }
2012            ffi::WGPUSType_WGPUSType_SharedTextureMemoryVkImageLayoutEndState => {
2013                SType::SharedTextureMemoryVkImageLayoutEndState
2014            }
2015            ffi::WGPUSType_WGPUSType_SharedTextureMemoryD3DSwapchainBeginState => {
2016                SType::SharedTextureMemoryD3DSwapchainBeginState
2017            }
2018            ffi::WGPUSType_WGPUSType_SharedFenceVkSemaphoreOpaqueFDDescriptor => {
2019                SType::SharedFenceVkSemaphoreOpaqueFDDescriptor
2020            }
2021            ffi::WGPUSType_WGPUSType_SharedFenceVkSemaphoreOpaqueFDExportInfo => {
2022                SType::SharedFenceVkSemaphoreOpaqueFDExportInfo
2023            }
2024            ffi::WGPUSType_WGPUSType_SharedFenceSyncFDDescriptor => {
2025                SType::SharedFenceSyncFDDescriptor
2026            }
2027            ffi::WGPUSType_WGPUSType_SharedFenceSyncFDExportInfo => {
2028                SType::SharedFenceSyncFDExportInfo
2029            }
2030            ffi::WGPUSType_WGPUSType_SharedFenceVkSemaphoreZirconHandleDescriptor => {
2031                SType::SharedFenceVkSemaphoreZirconHandleDescriptor
2032            }
2033            ffi::WGPUSType_WGPUSType_SharedFenceVkSemaphoreZirconHandleExportInfo => {
2034                SType::SharedFenceVkSemaphoreZirconHandleExportInfo
2035            }
2036            ffi::WGPUSType_WGPUSType_SharedFenceDXGISharedHandleDescriptor => {
2037                SType::SharedFenceDXGISharedHandleDescriptor
2038            }
2039            ffi::WGPUSType_WGPUSType_SharedFenceDXGISharedHandleExportInfo => {
2040                SType::SharedFenceDXGISharedHandleExportInfo
2041            }
2042            ffi::WGPUSType_WGPUSType_SharedFenceMTLSharedEventDescriptor => {
2043                SType::SharedFenceMTLSharedEventDescriptor
2044            }
2045            ffi::WGPUSType_WGPUSType_SharedFenceMTLSharedEventExportInfo => {
2046                SType::SharedFenceMTLSharedEventExportInfo
2047            }
2048            ffi::WGPUSType_WGPUSType_SharedBufferMemoryD3D12ResourceDescriptor => {
2049                SType::SharedBufferMemoryD3D12ResourceDescriptor
2050            }
2051            ffi::WGPUSType_WGPUSType_StaticSamplerBindingLayout => {
2052                SType::StaticSamplerBindingLayout
2053            }
2054            ffi::WGPUSType_WGPUSType_YCbCrVkDescriptor => SType::YCbCrVkDescriptor,
2055            ffi::WGPUSType_WGPUSType_SharedTextureMemoryAHardwareBufferProperties => {
2056                SType::SharedTextureMemoryAHardwareBufferProperties
2057            }
2058            ffi::WGPUSType_WGPUSType_AHardwareBufferProperties => {
2059                SType::AHardwareBufferProperties
2060            }
2061            ffi::WGPUSType_WGPUSType_DawnTexelCopyBufferRowAlignmentLimits => {
2062                SType::DawnTexelCopyBufferRowAlignmentLimits
2063            }
2064            ffi::WGPUSType_WGPUSType_AdapterPropertiesSubgroupMatrixConfigs => {
2065                SType::AdapterPropertiesSubgroupMatrixConfigs
2066            }
2067            ffi::WGPUSType_WGPUSType_SharedFenceEGLSyncDescriptor => {
2068                SType::SharedFenceEGLSyncDescriptor
2069            }
2070            ffi::WGPUSType_WGPUSType_SharedFenceEGLSyncExportInfo => {
2071                SType::SharedFenceEGLSyncExportInfo
2072            }
2073            ffi::WGPUSType_WGPUSType_DawnInjectedInvalidSType => {
2074                SType::DawnInjectedInvalidSType
2075            }
2076            ffi::WGPUSType_WGPUSType_DawnCompilationMessageUtf16 => {
2077                SType::DawnCompilationMessageUtf16
2078            }
2079            ffi::WGPUSType_WGPUSType_DawnFakeBufferOOMForTesting => {
2080                SType::DawnFakeBufferOOMForTesting
2081            }
2082            ffi::WGPUSType_WGPUSType_SurfaceDescriptorFromWindowsWinUISwapChainPanel => {
2083                SType::SurfaceDescriptorFromWindowsWinUISwapChainPanel
2084            }
2085            ffi::WGPUSType_WGPUSType_DawnDeviceAllocatorControl => {
2086                SType::DawnDeviceAllocatorControl
2087            }
2088            ffi::WGPUSType_WGPUSType_DawnHostMappedPointerLimits => {
2089                SType::DawnHostMappedPointerLimits
2090            }
2091            ffi::WGPUSType_WGPUSType_RenderPassDescriptorResolveRect => {
2092                SType::RenderPassDescriptorResolveRect
2093            }
2094            ffi::WGPUSType_WGPUSType_RequestAdapterWebGPUBackendOptions => {
2095                SType::RequestAdapterWebGPUBackendOptions
2096            }
2097            ffi::WGPUSType_WGPUSType_DawnFakeDeviceInitializeErrorForTesting => {
2098                SType::DawnFakeDeviceInitializeErrorForTesting
2099            }
2100            ffi::WGPUSType_WGPUSType_SharedTextureMemoryD3D11BeginState => {
2101                SType::SharedTextureMemoryD3D11BeginState
2102            }
2103            ffi::WGPUSType_WGPUSType_DawnConsumeAdapterDescriptor => {
2104                SType::DawnConsumeAdapterDescriptor
2105            }
2106            ffi::WGPUSType_WGPUSType_TexelBufferBindingEntry => {
2107                SType::TexelBufferBindingEntry
2108            }
2109            ffi::WGPUSType_WGPUSType_TexelBufferBindingLayout => {
2110                SType::TexelBufferBindingLayout
2111            }
2112            ffi::WGPUSType_WGPUSType_SharedTextureMemoryMetalEndAccessState => {
2113                SType::SharedTextureMemoryMetalEndAccessState
2114            }
2115            ffi::WGPUSType_WGPUSType_AdapterPropertiesWGPU => {
2116                SType::AdapterPropertiesWGPU
2117            }
2118            ffi::WGPUSType_WGPUSType_SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor => {
2119                SType::SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor
2120            }
2121            ffi::WGPUSType_WGPUSType_SharedTextureMemoryD3D12ResourceDescriptor => {
2122                SType::SharedTextureMemoryD3D12ResourceDescriptor
2123            }
2124            ffi::WGPUSType_WGPUSType_RequestAdapterOptionsAngleVirtualizationGroup => {
2125                SType::RequestAdapterOptionsAngleVirtualizationGroup
2126            }
2127            ffi::WGPUSType_WGPUSType_ResourceTableLimits => SType::ResourceTableLimits,
2128            ffi::WGPUSType_WGPUSType_PipelineLayoutResourceTable => {
2129                SType::PipelineLayoutResourceTable
2130            }
2131            ffi::WGPUSType_WGPUSType_AdapterPropertiesExplicitComputeSubgroupSizeConfigs => {
2132                SType::AdapterPropertiesExplicitComputeSubgroupSizeConfigs
2133            }
2134            ffi::WGPUSType_WGPUSType_DawnRenderPassColorAttachmentRenderToSingleSampled => {
2135                SType::DawnRenderPassColorAttachmentRenderToSingleSampled
2136            }
2137            _ => SType::ShaderSourceSPIRV,
2138        }
2139    }
2140}
2141impl From<SType> for ffi::WGPUSType {
2142    fn from(value: SType) -> Self {
2143        value as ffi::WGPUSType
2144    }
2145}
2146#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
2147#[repr(u32)]
2148pub enum SamplerBindingType {
2149    BindingNotUsed = ffi::WGPUSamplerBindingType_WGPUSamplerBindingType_BindingNotUsed
2150        as u32,
2151    Undefined = ffi::WGPUSamplerBindingType_WGPUSamplerBindingType_Undefined as u32,
2152    Filtering = ffi::WGPUSamplerBindingType_WGPUSamplerBindingType_Filtering as u32,
2153    NonFiltering = ffi::WGPUSamplerBindingType_WGPUSamplerBindingType_NonFiltering
2154        as u32,
2155    Comparison = ffi::WGPUSamplerBindingType_WGPUSamplerBindingType_Comparison as u32,
2156}
2157impl From<ffi::WGPUSamplerBindingType> for SamplerBindingType {
2158    fn from(value: ffi::WGPUSamplerBindingType) -> Self {
2159        match value as u32 {
2160            ffi::WGPUSamplerBindingType_WGPUSamplerBindingType_BindingNotUsed => {
2161                SamplerBindingType::BindingNotUsed
2162            }
2163            ffi::WGPUSamplerBindingType_WGPUSamplerBindingType_Undefined => {
2164                SamplerBindingType::Undefined
2165            }
2166            ffi::WGPUSamplerBindingType_WGPUSamplerBindingType_Filtering => {
2167                SamplerBindingType::Filtering
2168            }
2169            ffi::WGPUSamplerBindingType_WGPUSamplerBindingType_NonFiltering => {
2170                SamplerBindingType::NonFiltering
2171            }
2172            ffi::WGPUSamplerBindingType_WGPUSamplerBindingType_Comparison => {
2173                SamplerBindingType::Comparison
2174            }
2175            _ => SamplerBindingType::BindingNotUsed,
2176        }
2177    }
2178}
2179impl From<SamplerBindingType> for ffi::WGPUSamplerBindingType {
2180    fn from(value: SamplerBindingType) -> Self {
2181        value as ffi::WGPUSamplerBindingType
2182    }
2183}
2184#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
2185#[repr(u32)]
2186pub enum SharedFenceType {
2187    VkSemaphoreOpaqueFD = ffi::WGPUSharedFenceType_WGPUSharedFenceType_VkSemaphoreOpaqueFD
2188        as u32,
2189    SyncFD = ffi::WGPUSharedFenceType_WGPUSharedFenceType_SyncFD as u32,
2190    VkSemaphoreZirconHandle = ffi::WGPUSharedFenceType_WGPUSharedFenceType_VkSemaphoreZirconHandle
2191        as u32,
2192    DXGISharedHandle = ffi::WGPUSharedFenceType_WGPUSharedFenceType_DXGISharedHandle
2193        as u32,
2194    MTLSharedEvent = ffi::WGPUSharedFenceType_WGPUSharedFenceType_MTLSharedEvent as u32,
2195    EGLSync = ffi::WGPUSharedFenceType_WGPUSharedFenceType_EGLSync as u32,
2196}
2197impl From<ffi::WGPUSharedFenceType> for SharedFenceType {
2198    fn from(value: ffi::WGPUSharedFenceType) -> Self {
2199        match value as u32 {
2200            ffi::WGPUSharedFenceType_WGPUSharedFenceType_VkSemaphoreOpaqueFD => {
2201                SharedFenceType::VkSemaphoreOpaqueFD
2202            }
2203            ffi::WGPUSharedFenceType_WGPUSharedFenceType_SyncFD => {
2204                SharedFenceType::SyncFD
2205            }
2206            ffi::WGPUSharedFenceType_WGPUSharedFenceType_VkSemaphoreZirconHandle => {
2207                SharedFenceType::VkSemaphoreZirconHandle
2208            }
2209            ffi::WGPUSharedFenceType_WGPUSharedFenceType_DXGISharedHandle => {
2210                SharedFenceType::DXGISharedHandle
2211            }
2212            ffi::WGPUSharedFenceType_WGPUSharedFenceType_MTLSharedEvent => {
2213                SharedFenceType::MTLSharedEvent
2214            }
2215            ffi::WGPUSharedFenceType_WGPUSharedFenceType_EGLSync => {
2216                SharedFenceType::EGLSync
2217            }
2218            _ => SharedFenceType::VkSemaphoreOpaqueFD,
2219        }
2220    }
2221}
2222impl From<SharedFenceType> for ffi::WGPUSharedFenceType {
2223    fn from(value: SharedFenceType) -> Self {
2224        value as ffi::WGPUSharedFenceType
2225    }
2226}
2227#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
2228#[repr(u32)]
2229pub enum Status {
2230    Success = ffi::WGPUStatus_WGPUStatus_Success as u32,
2231    Error = ffi::WGPUStatus_WGPUStatus_Error as u32,
2232}
2233impl From<ffi::WGPUStatus> for Status {
2234    fn from(value: ffi::WGPUStatus) -> Self {
2235        match value as u32 {
2236            ffi::WGPUStatus_WGPUStatus_Success => Status::Success,
2237            ffi::WGPUStatus_WGPUStatus_Error => Status::Error,
2238            _ => Status::Success,
2239        }
2240    }
2241}
2242impl From<Status> for ffi::WGPUStatus {
2243    fn from(value: Status) -> Self {
2244        value as ffi::WGPUStatus
2245    }
2246}
2247#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
2248#[repr(u32)]
2249pub enum StencilOperation {
2250    Undefined = ffi::WGPUStencilOperation_WGPUStencilOperation_Undefined as u32,
2251    Keep = ffi::WGPUStencilOperation_WGPUStencilOperation_Keep as u32,
2252    Zero = ffi::WGPUStencilOperation_WGPUStencilOperation_Zero as u32,
2253    Replace = ffi::WGPUStencilOperation_WGPUStencilOperation_Replace as u32,
2254    Invert = ffi::WGPUStencilOperation_WGPUStencilOperation_Invert as u32,
2255    IncrementClamp = ffi::WGPUStencilOperation_WGPUStencilOperation_IncrementClamp
2256        as u32,
2257    DecrementClamp = ffi::WGPUStencilOperation_WGPUStencilOperation_DecrementClamp
2258        as u32,
2259    IncrementWrap = ffi::WGPUStencilOperation_WGPUStencilOperation_IncrementWrap as u32,
2260    DecrementWrap = ffi::WGPUStencilOperation_WGPUStencilOperation_DecrementWrap as u32,
2261}
2262impl From<ffi::WGPUStencilOperation> for StencilOperation {
2263    fn from(value: ffi::WGPUStencilOperation) -> Self {
2264        match value as u32 {
2265            ffi::WGPUStencilOperation_WGPUStencilOperation_Undefined => {
2266                StencilOperation::Undefined
2267            }
2268            ffi::WGPUStencilOperation_WGPUStencilOperation_Keep => StencilOperation::Keep,
2269            ffi::WGPUStencilOperation_WGPUStencilOperation_Zero => StencilOperation::Zero,
2270            ffi::WGPUStencilOperation_WGPUStencilOperation_Replace => {
2271                StencilOperation::Replace
2272            }
2273            ffi::WGPUStencilOperation_WGPUStencilOperation_Invert => {
2274                StencilOperation::Invert
2275            }
2276            ffi::WGPUStencilOperation_WGPUStencilOperation_IncrementClamp => {
2277                StencilOperation::IncrementClamp
2278            }
2279            ffi::WGPUStencilOperation_WGPUStencilOperation_DecrementClamp => {
2280                StencilOperation::DecrementClamp
2281            }
2282            ffi::WGPUStencilOperation_WGPUStencilOperation_IncrementWrap => {
2283                StencilOperation::IncrementWrap
2284            }
2285            ffi::WGPUStencilOperation_WGPUStencilOperation_DecrementWrap => {
2286                StencilOperation::DecrementWrap
2287            }
2288            _ => StencilOperation::Undefined,
2289        }
2290    }
2291}
2292impl From<StencilOperation> for ffi::WGPUStencilOperation {
2293    fn from(value: StencilOperation) -> Self {
2294        value as ffi::WGPUStencilOperation
2295    }
2296}
2297#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
2298#[repr(u32)]
2299pub enum StorageTextureAccess {
2300    BindingNotUsed = ffi::WGPUStorageTextureAccess_WGPUStorageTextureAccess_BindingNotUsed
2301        as u32,
2302    Undefined = ffi::WGPUStorageTextureAccess_WGPUStorageTextureAccess_Undefined as u32,
2303    WriteOnly = ffi::WGPUStorageTextureAccess_WGPUStorageTextureAccess_WriteOnly as u32,
2304    ReadOnly = ffi::WGPUStorageTextureAccess_WGPUStorageTextureAccess_ReadOnly as u32,
2305    ReadWrite = ffi::WGPUStorageTextureAccess_WGPUStorageTextureAccess_ReadWrite as u32,
2306}
2307impl From<ffi::WGPUStorageTextureAccess> for StorageTextureAccess {
2308    fn from(value: ffi::WGPUStorageTextureAccess) -> Self {
2309        match value as u32 {
2310            ffi::WGPUStorageTextureAccess_WGPUStorageTextureAccess_BindingNotUsed => {
2311                StorageTextureAccess::BindingNotUsed
2312            }
2313            ffi::WGPUStorageTextureAccess_WGPUStorageTextureAccess_Undefined => {
2314                StorageTextureAccess::Undefined
2315            }
2316            ffi::WGPUStorageTextureAccess_WGPUStorageTextureAccess_WriteOnly => {
2317                StorageTextureAccess::WriteOnly
2318            }
2319            ffi::WGPUStorageTextureAccess_WGPUStorageTextureAccess_ReadOnly => {
2320                StorageTextureAccess::ReadOnly
2321            }
2322            ffi::WGPUStorageTextureAccess_WGPUStorageTextureAccess_ReadWrite => {
2323                StorageTextureAccess::ReadWrite
2324            }
2325            _ => StorageTextureAccess::BindingNotUsed,
2326        }
2327    }
2328}
2329impl From<StorageTextureAccess> for ffi::WGPUStorageTextureAccess {
2330    fn from(value: StorageTextureAccess) -> Self {
2331        value as ffi::WGPUStorageTextureAccess
2332    }
2333}
2334#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
2335#[repr(u32)]
2336pub enum StoreOp {
2337    Undefined = ffi::WGPUStoreOp_WGPUStoreOp_Undefined as u32,
2338    Store = ffi::WGPUStoreOp_WGPUStoreOp_Store as u32,
2339    Discard = ffi::WGPUStoreOp_WGPUStoreOp_Discard as u32,
2340}
2341impl From<ffi::WGPUStoreOp> for StoreOp {
2342    fn from(value: ffi::WGPUStoreOp) -> Self {
2343        match value as u32 {
2344            ffi::WGPUStoreOp_WGPUStoreOp_Undefined => StoreOp::Undefined,
2345            ffi::WGPUStoreOp_WGPUStoreOp_Store => StoreOp::Store,
2346            ffi::WGPUStoreOp_WGPUStoreOp_Discard => StoreOp::Discard,
2347            _ => StoreOp::Undefined,
2348        }
2349    }
2350}
2351impl From<StoreOp> for ffi::WGPUStoreOp {
2352    fn from(value: StoreOp) -> Self {
2353        value as ffi::WGPUStoreOp
2354    }
2355}
2356#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
2357#[repr(u32)]
2358pub enum SubgroupMatrixComponentType {
2359    F32 = ffi::WGPUSubgroupMatrixComponentType_WGPUSubgroupMatrixComponentType_F32
2360        as u32,
2361    F16 = ffi::WGPUSubgroupMatrixComponentType_WGPUSubgroupMatrixComponentType_F16
2362        as u32,
2363    U32 = ffi::WGPUSubgroupMatrixComponentType_WGPUSubgroupMatrixComponentType_U32
2364        as u32,
2365    I32 = ffi::WGPUSubgroupMatrixComponentType_WGPUSubgroupMatrixComponentType_I32
2366        as u32,
2367    U8 = ffi::WGPUSubgroupMatrixComponentType_WGPUSubgroupMatrixComponentType_U8 as u32,
2368    I8 = ffi::WGPUSubgroupMatrixComponentType_WGPUSubgroupMatrixComponentType_I8 as u32,
2369}
2370impl From<ffi::WGPUSubgroupMatrixComponentType> for SubgroupMatrixComponentType {
2371    fn from(value: ffi::WGPUSubgroupMatrixComponentType) -> Self {
2372        match value as u32 {
2373            ffi::WGPUSubgroupMatrixComponentType_WGPUSubgroupMatrixComponentType_F32 => {
2374                SubgroupMatrixComponentType::F32
2375            }
2376            ffi::WGPUSubgroupMatrixComponentType_WGPUSubgroupMatrixComponentType_F16 => {
2377                SubgroupMatrixComponentType::F16
2378            }
2379            ffi::WGPUSubgroupMatrixComponentType_WGPUSubgroupMatrixComponentType_U32 => {
2380                SubgroupMatrixComponentType::U32
2381            }
2382            ffi::WGPUSubgroupMatrixComponentType_WGPUSubgroupMatrixComponentType_I32 => {
2383                SubgroupMatrixComponentType::I32
2384            }
2385            ffi::WGPUSubgroupMatrixComponentType_WGPUSubgroupMatrixComponentType_U8 => {
2386                SubgroupMatrixComponentType::U8
2387            }
2388            ffi::WGPUSubgroupMatrixComponentType_WGPUSubgroupMatrixComponentType_I8 => {
2389                SubgroupMatrixComponentType::I8
2390            }
2391            _ => SubgroupMatrixComponentType::F32,
2392        }
2393    }
2394}
2395impl From<SubgroupMatrixComponentType> for ffi::WGPUSubgroupMatrixComponentType {
2396    fn from(value: SubgroupMatrixComponentType) -> Self {
2397        value as ffi::WGPUSubgroupMatrixComponentType
2398    }
2399}
2400#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
2401#[repr(u32)]
2402pub enum SurfaceGetCurrentTextureStatus {
2403    SuccessOptimal = ffi::WGPUSurfaceGetCurrentTextureStatus_WGPUSurfaceGetCurrentTextureStatus_SuccessOptimal
2404        as u32,
2405    SuccessSuboptimal = ffi::WGPUSurfaceGetCurrentTextureStatus_WGPUSurfaceGetCurrentTextureStatus_SuccessSuboptimal
2406        as u32,
2407    Timeout = ffi::WGPUSurfaceGetCurrentTextureStatus_WGPUSurfaceGetCurrentTextureStatus_Timeout
2408        as u32,
2409    Outdated = ffi::WGPUSurfaceGetCurrentTextureStatus_WGPUSurfaceGetCurrentTextureStatus_Outdated
2410        as u32,
2411    Lost = ffi::WGPUSurfaceGetCurrentTextureStatus_WGPUSurfaceGetCurrentTextureStatus_Lost
2412        as u32,
2413    Error = ffi::WGPUSurfaceGetCurrentTextureStatus_WGPUSurfaceGetCurrentTextureStatus_Error
2414        as u32,
2415}
2416impl From<ffi::WGPUSurfaceGetCurrentTextureStatus> for SurfaceGetCurrentTextureStatus {
2417    fn from(value: ffi::WGPUSurfaceGetCurrentTextureStatus) -> Self {
2418        match value as u32 {
2419            ffi::WGPUSurfaceGetCurrentTextureStatus_WGPUSurfaceGetCurrentTextureStatus_SuccessOptimal => {
2420                SurfaceGetCurrentTextureStatus::SuccessOptimal
2421            }
2422            ffi::WGPUSurfaceGetCurrentTextureStatus_WGPUSurfaceGetCurrentTextureStatus_SuccessSuboptimal => {
2423                SurfaceGetCurrentTextureStatus::SuccessSuboptimal
2424            }
2425            ffi::WGPUSurfaceGetCurrentTextureStatus_WGPUSurfaceGetCurrentTextureStatus_Timeout => {
2426                SurfaceGetCurrentTextureStatus::Timeout
2427            }
2428            ffi::WGPUSurfaceGetCurrentTextureStatus_WGPUSurfaceGetCurrentTextureStatus_Outdated => {
2429                SurfaceGetCurrentTextureStatus::Outdated
2430            }
2431            ffi::WGPUSurfaceGetCurrentTextureStatus_WGPUSurfaceGetCurrentTextureStatus_Lost => {
2432                SurfaceGetCurrentTextureStatus::Lost
2433            }
2434            ffi::WGPUSurfaceGetCurrentTextureStatus_WGPUSurfaceGetCurrentTextureStatus_Error => {
2435                SurfaceGetCurrentTextureStatus::Error
2436            }
2437            _ => SurfaceGetCurrentTextureStatus::SuccessOptimal,
2438        }
2439    }
2440}
2441impl From<SurfaceGetCurrentTextureStatus> for ffi::WGPUSurfaceGetCurrentTextureStatus {
2442    fn from(value: SurfaceGetCurrentTextureStatus) -> Self {
2443        value as ffi::WGPUSurfaceGetCurrentTextureStatus
2444    }
2445}
2446#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
2447#[repr(u32)]
2448pub enum TexelBufferAccess {
2449    Undefined = ffi::WGPUTexelBufferAccess_WGPUTexelBufferAccess_Undefined as u32,
2450    ReadOnly = ffi::WGPUTexelBufferAccess_WGPUTexelBufferAccess_ReadOnly as u32,
2451    ReadWrite = ffi::WGPUTexelBufferAccess_WGPUTexelBufferAccess_ReadWrite as u32,
2452}
2453impl From<ffi::WGPUTexelBufferAccess> for TexelBufferAccess {
2454    fn from(value: ffi::WGPUTexelBufferAccess) -> Self {
2455        match value as u32 {
2456            ffi::WGPUTexelBufferAccess_WGPUTexelBufferAccess_Undefined => {
2457                TexelBufferAccess::Undefined
2458            }
2459            ffi::WGPUTexelBufferAccess_WGPUTexelBufferAccess_ReadOnly => {
2460                TexelBufferAccess::ReadOnly
2461            }
2462            ffi::WGPUTexelBufferAccess_WGPUTexelBufferAccess_ReadWrite => {
2463                TexelBufferAccess::ReadWrite
2464            }
2465            _ => TexelBufferAccess::Undefined,
2466        }
2467    }
2468}
2469impl From<TexelBufferAccess> for ffi::WGPUTexelBufferAccess {
2470    fn from(value: TexelBufferAccess) -> Self {
2471        value as ffi::WGPUTexelBufferAccess
2472    }
2473}
2474#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
2475#[repr(u32)]
2476pub enum TextureAspect {
2477    Undefined = ffi::WGPUTextureAspect_WGPUTextureAspect_Undefined as u32,
2478    All = ffi::WGPUTextureAspect_WGPUTextureAspect_All as u32,
2479    StencilOnly = ffi::WGPUTextureAspect_WGPUTextureAspect_StencilOnly as u32,
2480    DepthOnly = ffi::WGPUTextureAspect_WGPUTextureAspect_DepthOnly as u32,
2481    Plane0Only = ffi::WGPUTextureAspect_WGPUTextureAspect_Plane0Only as u32,
2482    Plane1Only = ffi::WGPUTextureAspect_WGPUTextureAspect_Plane1Only as u32,
2483    Plane2Only = ffi::WGPUTextureAspect_WGPUTextureAspect_Plane2Only as u32,
2484}
2485impl From<ffi::WGPUTextureAspect> for TextureAspect {
2486    fn from(value: ffi::WGPUTextureAspect) -> Self {
2487        match value as u32 {
2488            ffi::WGPUTextureAspect_WGPUTextureAspect_Undefined => {
2489                TextureAspect::Undefined
2490            }
2491            ffi::WGPUTextureAspect_WGPUTextureAspect_All => TextureAspect::All,
2492            ffi::WGPUTextureAspect_WGPUTextureAspect_StencilOnly => {
2493                TextureAspect::StencilOnly
2494            }
2495            ffi::WGPUTextureAspect_WGPUTextureAspect_DepthOnly => {
2496                TextureAspect::DepthOnly
2497            }
2498            ffi::WGPUTextureAspect_WGPUTextureAspect_Plane0Only => {
2499                TextureAspect::Plane0Only
2500            }
2501            ffi::WGPUTextureAspect_WGPUTextureAspect_Plane1Only => {
2502                TextureAspect::Plane1Only
2503            }
2504            ffi::WGPUTextureAspect_WGPUTextureAspect_Plane2Only => {
2505                TextureAspect::Plane2Only
2506            }
2507            _ => TextureAspect::Undefined,
2508        }
2509    }
2510}
2511impl From<TextureAspect> for ffi::WGPUTextureAspect {
2512    fn from(value: TextureAspect) -> Self {
2513        value as ffi::WGPUTextureAspect
2514    }
2515}
2516#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
2517#[repr(u32)]
2518pub enum TextureDimension {
2519    Undefined = ffi::WGPUTextureDimension_WGPUTextureDimension_Undefined as u32,
2520    D1 = ffi::WGPUTextureDimension_WGPUTextureDimension_1D as u32,
2521    D2 = ffi::WGPUTextureDimension_WGPUTextureDimension_2D as u32,
2522    D3 = ffi::WGPUTextureDimension_WGPUTextureDimension_3D as u32,
2523}
2524impl From<ffi::WGPUTextureDimension> for TextureDimension {
2525    fn from(value: ffi::WGPUTextureDimension) -> Self {
2526        match value as u32 {
2527            ffi::WGPUTextureDimension_WGPUTextureDimension_Undefined => {
2528                TextureDimension::Undefined
2529            }
2530            ffi::WGPUTextureDimension_WGPUTextureDimension_1D => TextureDimension::D1,
2531            ffi::WGPUTextureDimension_WGPUTextureDimension_2D => TextureDimension::D2,
2532            ffi::WGPUTextureDimension_WGPUTextureDimension_3D => TextureDimension::D3,
2533            _ => TextureDimension::Undefined,
2534        }
2535    }
2536}
2537impl From<TextureDimension> for ffi::WGPUTextureDimension {
2538    fn from(value: TextureDimension) -> Self {
2539        value as ffi::WGPUTextureDimension
2540    }
2541}
2542#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
2543#[repr(u32)]
2544pub enum TextureFormat {
2545    Undefined = ffi::WGPUTextureFormat_WGPUTextureFormat_Undefined as u32,
2546    R8Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_R8Unorm as u32,
2547    R8Snorm = ffi::WGPUTextureFormat_WGPUTextureFormat_R8Snorm as u32,
2548    R8Uint = ffi::WGPUTextureFormat_WGPUTextureFormat_R8Uint as u32,
2549    R8Sint = ffi::WGPUTextureFormat_WGPUTextureFormat_R8Sint as u32,
2550    R16Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_R16Unorm as u32,
2551    R16Snorm = ffi::WGPUTextureFormat_WGPUTextureFormat_R16Snorm as u32,
2552    R16Uint = ffi::WGPUTextureFormat_WGPUTextureFormat_R16Uint as u32,
2553    R16Sint = ffi::WGPUTextureFormat_WGPUTextureFormat_R16Sint as u32,
2554    R16Float = ffi::WGPUTextureFormat_WGPUTextureFormat_R16Float as u32,
2555    Rg8Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_RG8Unorm as u32,
2556    Rg8Snorm = ffi::WGPUTextureFormat_WGPUTextureFormat_RG8Snorm as u32,
2557    Rg8Uint = ffi::WGPUTextureFormat_WGPUTextureFormat_RG8Uint as u32,
2558    Rg8Sint = ffi::WGPUTextureFormat_WGPUTextureFormat_RG8Sint as u32,
2559    R32Float = ffi::WGPUTextureFormat_WGPUTextureFormat_R32Float as u32,
2560    R32Uint = ffi::WGPUTextureFormat_WGPUTextureFormat_R32Uint as u32,
2561    R32Sint = ffi::WGPUTextureFormat_WGPUTextureFormat_R32Sint as u32,
2562    Rg16Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_RG16Unorm as u32,
2563    Rg16Snorm = ffi::WGPUTextureFormat_WGPUTextureFormat_RG16Snorm as u32,
2564    Rg16Uint = ffi::WGPUTextureFormat_WGPUTextureFormat_RG16Uint as u32,
2565    Rg16Sint = ffi::WGPUTextureFormat_WGPUTextureFormat_RG16Sint as u32,
2566    Rg16Float = ffi::WGPUTextureFormat_WGPUTextureFormat_RG16Float as u32,
2567    Rgba8Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA8Unorm as u32,
2568    Rgba8UnormSrgb = ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA8UnormSrgb as u32,
2569    Rgba8Snorm = ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA8Snorm as u32,
2570    Rgba8Uint = ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA8Uint as u32,
2571    Rgba8Sint = ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA8Sint as u32,
2572    Bgra8Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_BGRA8Unorm as u32,
2573    Bgra8UnormSrgb = ffi::WGPUTextureFormat_WGPUTextureFormat_BGRA8UnormSrgb as u32,
2574    Rgb10A2Uint = ffi::WGPUTextureFormat_WGPUTextureFormat_RGB10A2Uint as u32,
2575    Rgb10A2Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_RGB10A2Unorm as u32,
2576    Rg11B10Ufloat = ffi::WGPUTextureFormat_WGPUTextureFormat_RG11B10Ufloat as u32,
2577    Rgb9E5Ufloat = ffi::WGPUTextureFormat_WGPUTextureFormat_RGB9E5Ufloat as u32,
2578    Rg32Float = ffi::WGPUTextureFormat_WGPUTextureFormat_RG32Float as u32,
2579    Rg32Uint = ffi::WGPUTextureFormat_WGPUTextureFormat_RG32Uint as u32,
2580    Rg32Sint = ffi::WGPUTextureFormat_WGPUTextureFormat_RG32Sint as u32,
2581    Rgba16Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA16Unorm as u32,
2582    Rgba16Snorm = ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA16Snorm as u32,
2583    Rgba16Uint = ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA16Uint as u32,
2584    Rgba16Sint = ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA16Sint as u32,
2585    Rgba16Float = ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA16Float as u32,
2586    Rgba32Float = ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA32Float as u32,
2587    Rgba32Uint = ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA32Uint as u32,
2588    Rgba32Sint = ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA32Sint as u32,
2589    Stencil8 = ffi::WGPUTextureFormat_WGPUTextureFormat_Stencil8 as u32,
2590    Depth16Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_Depth16Unorm as u32,
2591    Depth24Plus = ffi::WGPUTextureFormat_WGPUTextureFormat_Depth24Plus as u32,
2592    Depth24PlusStencil8 = ffi::WGPUTextureFormat_WGPUTextureFormat_Depth24PlusStencil8
2593        as u32,
2594    Depth32Float = ffi::WGPUTextureFormat_WGPUTextureFormat_Depth32Float as u32,
2595    Depth32FloatStencil8 = ffi::WGPUTextureFormat_WGPUTextureFormat_Depth32FloatStencil8
2596        as u32,
2597    Bc1RgbaUnorm = ffi::WGPUTextureFormat_WGPUTextureFormat_BC1RGBAUnorm as u32,
2598    Bc1RgbaUnormSrgb = ffi::WGPUTextureFormat_WGPUTextureFormat_BC1RGBAUnormSrgb as u32,
2599    Bc2RgbaUnorm = ffi::WGPUTextureFormat_WGPUTextureFormat_BC2RGBAUnorm as u32,
2600    Bc2RgbaUnormSrgb = ffi::WGPUTextureFormat_WGPUTextureFormat_BC2RGBAUnormSrgb as u32,
2601    Bc3RgbaUnorm = ffi::WGPUTextureFormat_WGPUTextureFormat_BC3RGBAUnorm as u32,
2602    Bc3RgbaUnormSrgb = ffi::WGPUTextureFormat_WGPUTextureFormat_BC3RGBAUnormSrgb as u32,
2603    Bc4RUnorm = ffi::WGPUTextureFormat_WGPUTextureFormat_BC4RUnorm as u32,
2604    Bc4RSnorm = ffi::WGPUTextureFormat_WGPUTextureFormat_BC4RSnorm as u32,
2605    Bc5RgUnorm = ffi::WGPUTextureFormat_WGPUTextureFormat_BC5RGUnorm as u32,
2606    Bc5RgSnorm = ffi::WGPUTextureFormat_WGPUTextureFormat_BC5RGSnorm as u32,
2607    Bc6HRgbUfloat = ffi::WGPUTextureFormat_WGPUTextureFormat_BC6HRGBUfloat as u32,
2608    Bc6HRgbFloat = ffi::WGPUTextureFormat_WGPUTextureFormat_BC6HRGBFloat as u32,
2609    Bc7RgbaUnorm = ffi::WGPUTextureFormat_WGPUTextureFormat_BC7RGBAUnorm as u32,
2610    Bc7RgbaUnormSrgb = ffi::WGPUTextureFormat_WGPUTextureFormat_BC7RGBAUnormSrgb as u32,
2611    Etc2Rgb8Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_ETC2RGB8Unorm as u32,
2612    Etc2Rgb8UnormSrgb = ffi::WGPUTextureFormat_WGPUTextureFormat_ETC2RGB8UnormSrgb
2613        as u32,
2614    Etc2Rgb8A1Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_ETC2RGB8A1Unorm as u32,
2615    Etc2Rgb8A1UnormSrgb = ffi::WGPUTextureFormat_WGPUTextureFormat_ETC2RGB8A1UnormSrgb
2616        as u32,
2617    Etc2Rgba8Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_ETC2RGBA8Unorm as u32,
2618    Etc2Rgba8UnormSrgb = ffi::WGPUTextureFormat_WGPUTextureFormat_ETC2RGBA8UnormSrgb
2619        as u32,
2620    EacR11Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_EACR11Unorm as u32,
2621    EacR11Snorm = ffi::WGPUTextureFormat_WGPUTextureFormat_EACR11Snorm as u32,
2622    EacRg11Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_EACRG11Unorm as u32,
2623    EacRg11Snorm = ffi::WGPUTextureFormat_WGPUTextureFormat_EACRG11Snorm as u32,
2624    Astc4X4Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC4x4Unorm as u32,
2625    Astc4X4UnormSrgb = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC4x4UnormSrgb as u32,
2626    Astc5X4Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC5x4Unorm as u32,
2627    Astc5X4UnormSrgb = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC5x4UnormSrgb as u32,
2628    Astc5X5Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC5x5Unorm as u32,
2629    Astc5X5UnormSrgb = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC5x5UnormSrgb as u32,
2630    Astc6X5Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC6x5Unorm as u32,
2631    Astc6X5UnormSrgb = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC6x5UnormSrgb as u32,
2632    Astc6X6Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC6x6Unorm as u32,
2633    Astc6X6UnormSrgb = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC6x6UnormSrgb as u32,
2634    Astc8X5Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC8x5Unorm as u32,
2635    Astc8X5UnormSrgb = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC8x5UnormSrgb as u32,
2636    Astc8X6Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC8x6Unorm as u32,
2637    Astc8X6UnormSrgb = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC8x6UnormSrgb as u32,
2638    Astc8X8Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC8x8Unorm as u32,
2639    Astc8X8UnormSrgb = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC8x8UnormSrgb as u32,
2640    Astc10X5Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC10x5Unorm as u32,
2641    Astc10X5UnormSrgb = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC10x5UnormSrgb
2642        as u32,
2643    Astc10X6Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC10x6Unorm as u32,
2644    Astc10X6UnormSrgb = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC10x6UnormSrgb
2645        as u32,
2646    Astc10X8Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC10x8Unorm as u32,
2647    Astc10X8UnormSrgb = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC10x8UnormSrgb
2648        as u32,
2649    Astc10X10Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC10x10Unorm as u32,
2650    Astc10X10UnormSrgb = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC10x10UnormSrgb
2651        as u32,
2652    Astc12X10Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC12x10Unorm as u32,
2653    Astc12X10UnormSrgb = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC12x10UnormSrgb
2654        as u32,
2655    Astc12X12Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC12x12Unorm as u32,
2656    Astc12X12UnormSrgb = ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC12x12UnormSrgb
2657        as u32,
2658    R8Bg8Biplanar420Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_R8BG8Biplanar420Unorm
2659        as u32,
2660    R10X6Bg10X6Biplanar420Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_R10X6BG10X6Biplanar420Unorm
2661        as u32,
2662    R8Bg8A8Triplanar420Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_R8BG8A8Triplanar420Unorm
2663        as u32,
2664    R8Bg8Biplanar422Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_R8BG8Biplanar422Unorm
2665        as u32,
2666    R8Bg8Biplanar444Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_R8BG8Biplanar444Unorm
2667        as u32,
2668    R10X6Bg10X6Biplanar422Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_R10X6BG10X6Biplanar422Unorm
2669        as u32,
2670    R10X6Bg10X6Biplanar444Unorm = ffi::WGPUTextureFormat_WGPUTextureFormat_R10X6BG10X6Biplanar444Unorm
2671        as u32,
2672    External = ffi::WGPUTextureFormat_WGPUTextureFormat_External as u32,
2673}
2674impl From<ffi::WGPUTextureFormat> for TextureFormat {
2675    fn from(value: ffi::WGPUTextureFormat) -> Self {
2676        match value as u32 {
2677            ffi::WGPUTextureFormat_WGPUTextureFormat_Undefined => {
2678                TextureFormat::Undefined
2679            }
2680            ffi::WGPUTextureFormat_WGPUTextureFormat_R8Unorm => TextureFormat::R8Unorm,
2681            ffi::WGPUTextureFormat_WGPUTextureFormat_R8Snorm => TextureFormat::R8Snorm,
2682            ffi::WGPUTextureFormat_WGPUTextureFormat_R8Uint => TextureFormat::R8Uint,
2683            ffi::WGPUTextureFormat_WGPUTextureFormat_R8Sint => TextureFormat::R8Sint,
2684            ffi::WGPUTextureFormat_WGPUTextureFormat_R16Unorm => TextureFormat::R16Unorm,
2685            ffi::WGPUTextureFormat_WGPUTextureFormat_R16Snorm => TextureFormat::R16Snorm,
2686            ffi::WGPUTextureFormat_WGPUTextureFormat_R16Uint => TextureFormat::R16Uint,
2687            ffi::WGPUTextureFormat_WGPUTextureFormat_R16Sint => TextureFormat::R16Sint,
2688            ffi::WGPUTextureFormat_WGPUTextureFormat_R16Float => TextureFormat::R16Float,
2689            ffi::WGPUTextureFormat_WGPUTextureFormat_RG8Unorm => TextureFormat::Rg8Unorm,
2690            ffi::WGPUTextureFormat_WGPUTextureFormat_RG8Snorm => TextureFormat::Rg8Snorm,
2691            ffi::WGPUTextureFormat_WGPUTextureFormat_RG8Uint => TextureFormat::Rg8Uint,
2692            ffi::WGPUTextureFormat_WGPUTextureFormat_RG8Sint => TextureFormat::Rg8Sint,
2693            ffi::WGPUTextureFormat_WGPUTextureFormat_R32Float => TextureFormat::R32Float,
2694            ffi::WGPUTextureFormat_WGPUTextureFormat_R32Uint => TextureFormat::R32Uint,
2695            ffi::WGPUTextureFormat_WGPUTextureFormat_R32Sint => TextureFormat::R32Sint,
2696            ffi::WGPUTextureFormat_WGPUTextureFormat_RG16Unorm => {
2697                TextureFormat::Rg16Unorm
2698            }
2699            ffi::WGPUTextureFormat_WGPUTextureFormat_RG16Snorm => {
2700                TextureFormat::Rg16Snorm
2701            }
2702            ffi::WGPUTextureFormat_WGPUTextureFormat_RG16Uint => TextureFormat::Rg16Uint,
2703            ffi::WGPUTextureFormat_WGPUTextureFormat_RG16Sint => TextureFormat::Rg16Sint,
2704            ffi::WGPUTextureFormat_WGPUTextureFormat_RG16Float => {
2705                TextureFormat::Rg16Float
2706            }
2707            ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA8Unorm => {
2708                TextureFormat::Rgba8Unorm
2709            }
2710            ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA8UnormSrgb => {
2711                TextureFormat::Rgba8UnormSrgb
2712            }
2713            ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA8Snorm => {
2714                TextureFormat::Rgba8Snorm
2715            }
2716            ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA8Uint => {
2717                TextureFormat::Rgba8Uint
2718            }
2719            ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA8Sint => {
2720                TextureFormat::Rgba8Sint
2721            }
2722            ffi::WGPUTextureFormat_WGPUTextureFormat_BGRA8Unorm => {
2723                TextureFormat::Bgra8Unorm
2724            }
2725            ffi::WGPUTextureFormat_WGPUTextureFormat_BGRA8UnormSrgb => {
2726                TextureFormat::Bgra8UnormSrgb
2727            }
2728            ffi::WGPUTextureFormat_WGPUTextureFormat_RGB10A2Uint => {
2729                TextureFormat::Rgb10A2Uint
2730            }
2731            ffi::WGPUTextureFormat_WGPUTextureFormat_RGB10A2Unorm => {
2732                TextureFormat::Rgb10A2Unorm
2733            }
2734            ffi::WGPUTextureFormat_WGPUTextureFormat_RG11B10Ufloat => {
2735                TextureFormat::Rg11B10Ufloat
2736            }
2737            ffi::WGPUTextureFormat_WGPUTextureFormat_RGB9E5Ufloat => {
2738                TextureFormat::Rgb9E5Ufloat
2739            }
2740            ffi::WGPUTextureFormat_WGPUTextureFormat_RG32Float => {
2741                TextureFormat::Rg32Float
2742            }
2743            ffi::WGPUTextureFormat_WGPUTextureFormat_RG32Uint => TextureFormat::Rg32Uint,
2744            ffi::WGPUTextureFormat_WGPUTextureFormat_RG32Sint => TextureFormat::Rg32Sint,
2745            ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA16Unorm => {
2746                TextureFormat::Rgba16Unorm
2747            }
2748            ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA16Snorm => {
2749                TextureFormat::Rgba16Snorm
2750            }
2751            ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA16Uint => {
2752                TextureFormat::Rgba16Uint
2753            }
2754            ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA16Sint => {
2755                TextureFormat::Rgba16Sint
2756            }
2757            ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA16Float => {
2758                TextureFormat::Rgba16Float
2759            }
2760            ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA32Float => {
2761                TextureFormat::Rgba32Float
2762            }
2763            ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA32Uint => {
2764                TextureFormat::Rgba32Uint
2765            }
2766            ffi::WGPUTextureFormat_WGPUTextureFormat_RGBA32Sint => {
2767                TextureFormat::Rgba32Sint
2768            }
2769            ffi::WGPUTextureFormat_WGPUTextureFormat_Stencil8 => TextureFormat::Stencil8,
2770            ffi::WGPUTextureFormat_WGPUTextureFormat_Depth16Unorm => {
2771                TextureFormat::Depth16Unorm
2772            }
2773            ffi::WGPUTextureFormat_WGPUTextureFormat_Depth24Plus => {
2774                TextureFormat::Depth24Plus
2775            }
2776            ffi::WGPUTextureFormat_WGPUTextureFormat_Depth24PlusStencil8 => {
2777                TextureFormat::Depth24PlusStencil8
2778            }
2779            ffi::WGPUTextureFormat_WGPUTextureFormat_Depth32Float => {
2780                TextureFormat::Depth32Float
2781            }
2782            ffi::WGPUTextureFormat_WGPUTextureFormat_Depth32FloatStencil8 => {
2783                TextureFormat::Depth32FloatStencil8
2784            }
2785            ffi::WGPUTextureFormat_WGPUTextureFormat_BC1RGBAUnorm => {
2786                TextureFormat::Bc1RgbaUnorm
2787            }
2788            ffi::WGPUTextureFormat_WGPUTextureFormat_BC1RGBAUnormSrgb => {
2789                TextureFormat::Bc1RgbaUnormSrgb
2790            }
2791            ffi::WGPUTextureFormat_WGPUTextureFormat_BC2RGBAUnorm => {
2792                TextureFormat::Bc2RgbaUnorm
2793            }
2794            ffi::WGPUTextureFormat_WGPUTextureFormat_BC2RGBAUnormSrgb => {
2795                TextureFormat::Bc2RgbaUnormSrgb
2796            }
2797            ffi::WGPUTextureFormat_WGPUTextureFormat_BC3RGBAUnorm => {
2798                TextureFormat::Bc3RgbaUnorm
2799            }
2800            ffi::WGPUTextureFormat_WGPUTextureFormat_BC3RGBAUnormSrgb => {
2801                TextureFormat::Bc3RgbaUnormSrgb
2802            }
2803            ffi::WGPUTextureFormat_WGPUTextureFormat_BC4RUnorm => {
2804                TextureFormat::Bc4RUnorm
2805            }
2806            ffi::WGPUTextureFormat_WGPUTextureFormat_BC4RSnorm => {
2807                TextureFormat::Bc4RSnorm
2808            }
2809            ffi::WGPUTextureFormat_WGPUTextureFormat_BC5RGUnorm => {
2810                TextureFormat::Bc5RgUnorm
2811            }
2812            ffi::WGPUTextureFormat_WGPUTextureFormat_BC5RGSnorm => {
2813                TextureFormat::Bc5RgSnorm
2814            }
2815            ffi::WGPUTextureFormat_WGPUTextureFormat_BC6HRGBUfloat => {
2816                TextureFormat::Bc6HRgbUfloat
2817            }
2818            ffi::WGPUTextureFormat_WGPUTextureFormat_BC6HRGBFloat => {
2819                TextureFormat::Bc6HRgbFloat
2820            }
2821            ffi::WGPUTextureFormat_WGPUTextureFormat_BC7RGBAUnorm => {
2822                TextureFormat::Bc7RgbaUnorm
2823            }
2824            ffi::WGPUTextureFormat_WGPUTextureFormat_BC7RGBAUnormSrgb => {
2825                TextureFormat::Bc7RgbaUnormSrgb
2826            }
2827            ffi::WGPUTextureFormat_WGPUTextureFormat_ETC2RGB8Unorm => {
2828                TextureFormat::Etc2Rgb8Unorm
2829            }
2830            ffi::WGPUTextureFormat_WGPUTextureFormat_ETC2RGB8UnormSrgb => {
2831                TextureFormat::Etc2Rgb8UnormSrgb
2832            }
2833            ffi::WGPUTextureFormat_WGPUTextureFormat_ETC2RGB8A1Unorm => {
2834                TextureFormat::Etc2Rgb8A1Unorm
2835            }
2836            ffi::WGPUTextureFormat_WGPUTextureFormat_ETC2RGB8A1UnormSrgb => {
2837                TextureFormat::Etc2Rgb8A1UnormSrgb
2838            }
2839            ffi::WGPUTextureFormat_WGPUTextureFormat_ETC2RGBA8Unorm => {
2840                TextureFormat::Etc2Rgba8Unorm
2841            }
2842            ffi::WGPUTextureFormat_WGPUTextureFormat_ETC2RGBA8UnormSrgb => {
2843                TextureFormat::Etc2Rgba8UnormSrgb
2844            }
2845            ffi::WGPUTextureFormat_WGPUTextureFormat_EACR11Unorm => {
2846                TextureFormat::EacR11Unorm
2847            }
2848            ffi::WGPUTextureFormat_WGPUTextureFormat_EACR11Snorm => {
2849                TextureFormat::EacR11Snorm
2850            }
2851            ffi::WGPUTextureFormat_WGPUTextureFormat_EACRG11Unorm => {
2852                TextureFormat::EacRg11Unorm
2853            }
2854            ffi::WGPUTextureFormat_WGPUTextureFormat_EACRG11Snorm => {
2855                TextureFormat::EacRg11Snorm
2856            }
2857            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC4x4Unorm => {
2858                TextureFormat::Astc4X4Unorm
2859            }
2860            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC4x4UnormSrgb => {
2861                TextureFormat::Astc4X4UnormSrgb
2862            }
2863            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC5x4Unorm => {
2864                TextureFormat::Astc5X4Unorm
2865            }
2866            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC5x4UnormSrgb => {
2867                TextureFormat::Astc5X4UnormSrgb
2868            }
2869            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC5x5Unorm => {
2870                TextureFormat::Astc5X5Unorm
2871            }
2872            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC5x5UnormSrgb => {
2873                TextureFormat::Astc5X5UnormSrgb
2874            }
2875            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC6x5Unorm => {
2876                TextureFormat::Astc6X5Unorm
2877            }
2878            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC6x5UnormSrgb => {
2879                TextureFormat::Astc6X5UnormSrgb
2880            }
2881            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC6x6Unorm => {
2882                TextureFormat::Astc6X6Unorm
2883            }
2884            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC6x6UnormSrgb => {
2885                TextureFormat::Astc6X6UnormSrgb
2886            }
2887            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC8x5Unorm => {
2888                TextureFormat::Astc8X5Unorm
2889            }
2890            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC8x5UnormSrgb => {
2891                TextureFormat::Astc8X5UnormSrgb
2892            }
2893            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC8x6Unorm => {
2894                TextureFormat::Astc8X6Unorm
2895            }
2896            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC8x6UnormSrgb => {
2897                TextureFormat::Astc8X6UnormSrgb
2898            }
2899            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC8x8Unorm => {
2900                TextureFormat::Astc8X8Unorm
2901            }
2902            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC8x8UnormSrgb => {
2903                TextureFormat::Astc8X8UnormSrgb
2904            }
2905            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC10x5Unorm => {
2906                TextureFormat::Astc10X5Unorm
2907            }
2908            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC10x5UnormSrgb => {
2909                TextureFormat::Astc10X5UnormSrgb
2910            }
2911            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC10x6Unorm => {
2912                TextureFormat::Astc10X6Unorm
2913            }
2914            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC10x6UnormSrgb => {
2915                TextureFormat::Astc10X6UnormSrgb
2916            }
2917            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC10x8Unorm => {
2918                TextureFormat::Astc10X8Unorm
2919            }
2920            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC10x8UnormSrgb => {
2921                TextureFormat::Astc10X8UnormSrgb
2922            }
2923            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC10x10Unorm => {
2924                TextureFormat::Astc10X10Unorm
2925            }
2926            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC10x10UnormSrgb => {
2927                TextureFormat::Astc10X10UnormSrgb
2928            }
2929            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC12x10Unorm => {
2930                TextureFormat::Astc12X10Unorm
2931            }
2932            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC12x10UnormSrgb => {
2933                TextureFormat::Astc12X10UnormSrgb
2934            }
2935            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC12x12Unorm => {
2936                TextureFormat::Astc12X12Unorm
2937            }
2938            ffi::WGPUTextureFormat_WGPUTextureFormat_ASTC12x12UnormSrgb => {
2939                TextureFormat::Astc12X12UnormSrgb
2940            }
2941            ffi::WGPUTextureFormat_WGPUTextureFormat_R8BG8Biplanar420Unorm => {
2942                TextureFormat::R8Bg8Biplanar420Unorm
2943            }
2944            ffi::WGPUTextureFormat_WGPUTextureFormat_R10X6BG10X6Biplanar420Unorm => {
2945                TextureFormat::R10X6Bg10X6Biplanar420Unorm
2946            }
2947            ffi::WGPUTextureFormat_WGPUTextureFormat_R8BG8A8Triplanar420Unorm => {
2948                TextureFormat::R8Bg8A8Triplanar420Unorm
2949            }
2950            ffi::WGPUTextureFormat_WGPUTextureFormat_R8BG8Biplanar422Unorm => {
2951                TextureFormat::R8Bg8Biplanar422Unorm
2952            }
2953            ffi::WGPUTextureFormat_WGPUTextureFormat_R8BG8Biplanar444Unorm => {
2954                TextureFormat::R8Bg8Biplanar444Unorm
2955            }
2956            ffi::WGPUTextureFormat_WGPUTextureFormat_R10X6BG10X6Biplanar422Unorm => {
2957                TextureFormat::R10X6Bg10X6Biplanar422Unorm
2958            }
2959            ffi::WGPUTextureFormat_WGPUTextureFormat_R10X6BG10X6Biplanar444Unorm => {
2960                TextureFormat::R10X6Bg10X6Biplanar444Unorm
2961            }
2962            ffi::WGPUTextureFormat_WGPUTextureFormat_External => TextureFormat::External,
2963            _ => TextureFormat::Undefined,
2964        }
2965    }
2966}
2967impl From<TextureFormat> for ffi::WGPUTextureFormat {
2968    fn from(value: TextureFormat) -> Self {
2969        value as ffi::WGPUTextureFormat
2970    }
2971}
2972#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
2973#[repr(u32)]
2974pub enum TextureSampleType {
2975    BindingNotUsed = ffi::WGPUTextureSampleType_WGPUTextureSampleType_BindingNotUsed
2976        as u32,
2977    Undefined = ffi::WGPUTextureSampleType_WGPUTextureSampleType_Undefined as u32,
2978    Float = ffi::WGPUTextureSampleType_WGPUTextureSampleType_Float as u32,
2979    UnfilterableFloat = ffi::WGPUTextureSampleType_WGPUTextureSampleType_UnfilterableFloat
2980        as u32,
2981    Depth = ffi::WGPUTextureSampleType_WGPUTextureSampleType_Depth as u32,
2982    Sint = ffi::WGPUTextureSampleType_WGPUTextureSampleType_Sint as u32,
2983    Uint = ffi::WGPUTextureSampleType_WGPUTextureSampleType_Uint as u32,
2984}
2985impl From<ffi::WGPUTextureSampleType> for TextureSampleType {
2986    fn from(value: ffi::WGPUTextureSampleType) -> Self {
2987        match value as u32 {
2988            ffi::WGPUTextureSampleType_WGPUTextureSampleType_BindingNotUsed => {
2989                TextureSampleType::BindingNotUsed
2990            }
2991            ffi::WGPUTextureSampleType_WGPUTextureSampleType_Undefined => {
2992                TextureSampleType::Undefined
2993            }
2994            ffi::WGPUTextureSampleType_WGPUTextureSampleType_Float => {
2995                TextureSampleType::Float
2996            }
2997            ffi::WGPUTextureSampleType_WGPUTextureSampleType_UnfilterableFloat => {
2998                TextureSampleType::UnfilterableFloat
2999            }
3000            ffi::WGPUTextureSampleType_WGPUTextureSampleType_Depth => {
3001                TextureSampleType::Depth
3002            }
3003            ffi::WGPUTextureSampleType_WGPUTextureSampleType_Sint => {
3004                TextureSampleType::Sint
3005            }
3006            ffi::WGPUTextureSampleType_WGPUTextureSampleType_Uint => {
3007                TextureSampleType::Uint
3008            }
3009            _ => TextureSampleType::BindingNotUsed,
3010        }
3011    }
3012}
3013impl From<TextureSampleType> for ffi::WGPUTextureSampleType {
3014    fn from(value: TextureSampleType) -> Self {
3015        value as ffi::WGPUTextureSampleType
3016    }
3017}
3018#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
3019#[repr(u32)]
3020pub enum TextureViewDimension {
3021    Undefined = ffi::WGPUTextureViewDimension_WGPUTextureViewDimension_Undefined as u32,
3022    D1 = ffi::WGPUTextureViewDimension_WGPUTextureViewDimension_1D as u32,
3023    D2 = ffi::WGPUTextureViewDimension_WGPUTextureViewDimension_2D as u32,
3024    D2Array = ffi::WGPUTextureViewDimension_WGPUTextureViewDimension_2DArray as u32,
3025    Cube = ffi::WGPUTextureViewDimension_WGPUTextureViewDimension_Cube as u32,
3026    CubeArray = ffi::WGPUTextureViewDimension_WGPUTextureViewDimension_CubeArray as u32,
3027    D3 = ffi::WGPUTextureViewDimension_WGPUTextureViewDimension_3D as u32,
3028}
3029impl From<ffi::WGPUTextureViewDimension> for TextureViewDimension {
3030    fn from(value: ffi::WGPUTextureViewDimension) -> Self {
3031        match value as u32 {
3032            ffi::WGPUTextureViewDimension_WGPUTextureViewDimension_Undefined => {
3033                TextureViewDimension::Undefined
3034            }
3035            ffi::WGPUTextureViewDimension_WGPUTextureViewDimension_1D => {
3036                TextureViewDimension::D1
3037            }
3038            ffi::WGPUTextureViewDimension_WGPUTextureViewDimension_2D => {
3039                TextureViewDimension::D2
3040            }
3041            ffi::WGPUTextureViewDimension_WGPUTextureViewDimension_2DArray => {
3042                TextureViewDimension::D2Array
3043            }
3044            ffi::WGPUTextureViewDimension_WGPUTextureViewDimension_Cube => {
3045                TextureViewDimension::Cube
3046            }
3047            ffi::WGPUTextureViewDimension_WGPUTextureViewDimension_CubeArray => {
3048                TextureViewDimension::CubeArray
3049            }
3050            ffi::WGPUTextureViewDimension_WGPUTextureViewDimension_3D => {
3051                TextureViewDimension::D3
3052            }
3053            _ => TextureViewDimension::Undefined,
3054        }
3055    }
3056}
3057impl From<TextureViewDimension> for ffi::WGPUTextureViewDimension {
3058    fn from(value: TextureViewDimension) -> Self {
3059        value as ffi::WGPUTextureViewDimension
3060    }
3061}
3062#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
3063#[repr(u32)]
3064pub enum ToneMappingMode {
3065    Standard = ffi::WGPUToneMappingMode_WGPUToneMappingMode_Standard as u32,
3066    Extended = ffi::WGPUToneMappingMode_WGPUToneMappingMode_Extended as u32,
3067}
3068impl From<ffi::WGPUToneMappingMode> for ToneMappingMode {
3069    fn from(value: ffi::WGPUToneMappingMode) -> Self {
3070        match value as u32 {
3071            ffi::WGPUToneMappingMode_WGPUToneMappingMode_Standard => {
3072                ToneMappingMode::Standard
3073            }
3074            ffi::WGPUToneMappingMode_WGPUToneMappingMode_Extended => {
3075                ToneMappingMode::Extended
3076            }
3077            _ => ToneMappingMode::Standard,
3078        }
3079    }
3080}
3081impl From<ToneMappingMode> for ffi::WGPUToneMappingMode {
3082    fn from(value: ToneMappingMode) -> Self {
3083        value as ffi::WGPUToneMappingMode
3084    }
3085}
3086#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
3087#[repr(u32)]
3088pub enum VertexFormat {
3089    Uint8 = ffi::WGPUVertexFormat_WGPUVertexFormat_Uint8 as u32,
3090    Uint8X2 = ffi::WGPUVertexFormat_WGPUVertexFormat_Uint8x2 as u32,
3091    Uint8X4 = ffi::WGPUVertexFormat_WGPUVertexFormat_Uint8x4 as u32,
3092    Sint8 = ffi::WGPUVertexFormat_WGPUVertexFormat_Sint8 as u32,
3093    Sint8X2 = ffi::WGPUVertexFormat_WGPUVertexFormat_Sint8x2 as u32,
3094    Sint8X4 = ffi::WGPUVertexFormat_WGPUVertexFormat_Sint8x4 as u32,
3095    Unorm8 = ffi::WGPUVertexFormat_WGPUVertexFormat_Unorm8 as u32,
3096    Unorm8X2 = ffi::WGPUVertexFormat_WGPUVertexFormat_Unorm8x2 as u32,
3097    Unorm8X4 = ffi::WGPUVertexFormat_WGPUVertexFormat_Unorm8x4 as u32,
3098    Snorm8 = ffi::WGPUVertexFormat_WGPUVertexFormat_Snorm8 as u32,
3099    Snorm8X2 = ffi::WGPUVertexFormat_WGPUVertexFormat_Snorm8x2 as u32,
3100    Snorm8X4 = ffi::WGPUVertexFormat_WGPUVertexFormat_Snorm8x4 as u32,
3101    Uint16 = ffi::WGPUVertexFormat_WGPUVertexFormat_Uint16 as u32,
3102    Uint16X2 = ffi::WGPUVertexFormat_WGPUVertexFormat_Uint16x2 as u32,
3103    Uint16X4 = ffi::WGPUVertexFormat_WGPUVertexFormat_Uint16x4 as u32,
3104    Sint16 = ffi::WGPUVertexFormat_WGPUVertexFormat_Sint16 as u32,
3105    Sint16X2 = ffi::WGPUVertexFormat_WGPUVertexFormat_Sint16x2 as u32,
3106    Sint16X4 = ffi::WGPUVertexFormat_WGPUVertexFormat_Sint16x4 as u32,
3107    Unorm16 = ffi::WGPUVertexFormat_WGPUVertexFormat_Unorm16 as u32,
3108    Unorm16X2 = ffi::WGPUVertexFormat_WGPUVertexFormat_Unorm16x2 as u32,
3109    Unorm16X4 = ffi::WGPUVertexFormat_WGPUVertexFormat_Unorm16x4 as u32,
3110    Snorm16 = ffi::WGPUVertexFormat_WGPUVertexFormat_Snorm16 as u32,
3111    Snorm16X2 = ffi::WGPUVertexFormat_WGPUVertexFormat_Snorm16x2 as u32,
3112    Snorm16X4 = ffi::WGPUVertexFormat_WGPUVertexFormat_Snorm16x4 as u32,
3113    Float16 = ffi::WGPUVertexFormat_WGPUVertexFormat_Float16 as u32,
3114    Float16X2 = ffi::WGPUVertexFormat_WGPUVertexFormat_Float16x2 as u32,
3115    Float16X4 = ffi::WGPUVertexFormat_WGPUVertexFormat_Float16x4 as u32,
3116    Float32 = ffi::WGPUVertexFormat_WGPUVertexFormat_Float32 as u32,
3117    Float32X2 = ffi::WGPUVertexFormat_WGPUVertexFormat_Float32x2 as u32,
3118    Float32X3 = ffi::WGPUVertexFormat_WGPUVertexFormat_Float32x3 as u32,
3119    Float32X4 = ffi::WGPUVertexFormat_WGPUVertexFormat_Float32x4 as u32,
3120    Uint32 = ffi::WGPUVertexFormat_WGPUVertexFormat_Uint32 as u32,
3121    Uint32X2 = ffi::WGPUVertexFormat_WGPUVertexFormat_Uint32x2 as u32,
3122    Uint32X3 = ffi::WGPUVertexFormat_WGPUVertexFormat_Uint32x3 as u32,
3123    Uint32X4 = ffi::WGPUVertexFormat_WGPUVertexFormat_Uint32x4 as u32,
3124    Sint32 = ffi::WGPUVertexFormat_WGPUVertexFormat_Sint32 as u32,
3125    Sint32X2 = ffi::WGPUVertexFormat_WGPUVertexFormat_Sint32x2 as u32,
3126    Sint32X3 = ffi::WGPUVertexFormat_WGPUVertexFormat_Sint32x3 as u32,
3127    Sint32X4 = ffi::WGPUVertexFormat_WGPUVertexFormat_Sint32x4 as u32,
3128    Unorm1010102 = ffi::WGPUVertexFormat_WGPUVertexFormat_Unorm10_10_10_2 as u32,
3129    Unorm8X4Bgra = ffi::WGPUVertexFormat_WGPUVertexFormat_Unorm8x4BGRA as u32,
3130}
3131impl From<ffi::WGPUVertexFormat> for VertexFormat {
3132    fn from(value: ffi::WGPUVertexFormat) -> Self {
3133        match value as u32 {
3134            ffi::WGPUVertexFormat_WGPUVertexFormat_Uint8 => VertexFormat::Uint8,
3135            ffi::WGPUVertexFormat_WGPUVertexFormat_Uint8x2 => VertexFormat::Uint8X2,
3136            ffi::WGPUVertexFormat_WGPUVertexFormat_Uint8x4 => VertexFormat::Uint8X4,
3137            ffi::WGPUVertexFormat_WGPUVertexFormat_Sint8 => VertexFormat::Sint8,
3138            ffi::WGPUVertexFormat_WGPUVertexFormat_Sint8x2 => VertexFormat::Sint8X2,
3139            ffi::WGPUVertexFormat_WGPUVertexFormat_Sint8x4 => VertexFormat::Sint8X4,
3140            ffi::WGPUVertexFormat_WGPUVertexFormat_Unorm8 => VertexFormat::Unorm8,
3141            ffi::WGPUVertexFormat_WGPUVertexFormat_Unorm8x2 => VertexFormat::Unorm8X2,
3142            ffi::WGPUVertexFormat_WGPUVertexFormat_Unorm8x4 => VertexFormat::Unorm8X4,
3143            ffi::WGPUVertexFormat_WGPUVertexFormat_Snorm8 => VertexFormat::Snorm8,
3144            ffi::WGPUVertexFormat_WGPUVertexFormat_Snorm8x2 => VertexFormat::Snorm8X2,
3145            ffi::WGPUVertexFormat_WGPUVertexFormat_Snorm8x4 => VertexFormat::Snorm8X4,
3146            ffi::WGPUVertexFormat_WGPUVertexFormat_Uint16 => VertexFormat::Uint16,
3147            ffi::WGPUVertexFormat_WGPUVertexFormat_Uint16x2 => VertexFormat::Uint16X2,
3148            ffi::WGPUVertexFormat_WGPUVertexFormat_Uint16x4 => VertexFormat::Uint16X4,
3149            ffi::WGPUVertexFormat_WGPUVertexFormat_Sint16 => VertexFormat::Sint16,
3150            ffi::WGPUVertexFormat_WGPUVertexFormat_Sint16x2 => VertexFormat::Sint16X2,
3151            ffi::WGPUVertexFormat_WGPUVertexFormat_Sint16x4 => VertexFormat::Sint16X4,
3152            ffi::WGPUVertexFormat_WGPUVertexFormat_Unorm16 => VertexFormat::Unorm16,
3153            ffi::WGPUVertexFormat_WGPUVertexFormat_Unorm16x2 => VertexFormat::Unorm16X2,
3154            ffi::WGPUVertexFormat_WGPUVertexFormat_Unorm16x4 => VertexFormat::Unorm16X4,
3155            ffi::WGPUVertexFormat_WGPUVertexFormat_Snorm16 => VertexFormat::Snorm16,
3156            ffi::WGPUVertexFormat_WGPUVertexFormat_Snorm16x2 => VertexFormat::Snorm16X2,
3157            ffi::WGPUVertexFormat_WGPUVertexFormat_Snorm16x4 => VertexFormat::Snorm16X4,
3158            ffi::WGPUVertexFormat_WGPUVertexFormat_Float16 => VertexFormat::Float16,
3159            ffi::WGPUVertexFormat_WGPUVertexFormat_Float16x2 => VertexFormat::Float16X2,
3160            ffi::WGPUVertexFormat_WGPUVertexFormat_Float16x4 => VertexFormat::Float16X4,
3161            ffi::WGPUVertexFormat_WGPUVertexFormat_Float32 => VertexFormat::Float32,
3162            ffi::WGPUVertexFormat_WGPUVertexFormat_Float32x2 => VertexFormat::Float32X2,
3163            ffi::WGPUVertexFormat_WGPUVertexFormat_Float32x3 => VertexFormat::Float32X3,
3164            ffi::WGPUVertexFormat_WGPUVertexFormat_Float32x4 => VertexFormat::Float32X4,
3165            ffi::WGPUVertexFormat_WGPUVertexFormat_Uint32 => VertexFormat::Uint32,
3166            ffi::WGPUVertexFormat_WGPUVertexFormat_Uint32x2 => VertexFormat::Uint32X2,
3167            ffi::WGPUVertexFormat_WGPUVertexFormat_Uint32x3 => VertexFormat::Uint32X3,
3168            ffi::WGPUVertexFormat_WGPUVertexFormat_Uint32x4 => VertexFormat::Uint32X4,
3169            ffi::WGPUVertexFormat_WGPUVertexFormat_Sint32 => VertexFormat::Sint32,
3170            ffi::WGPUVertexFormat_WGPUVertexFormat_Sint32x2 => VertexFormat::Sint32X2,
3171            ffi::WGPUVertexFormat_WGPUVertexFormat_Sint32x3 => VertexFormat::Sint32X3,
3172            ffi::WGPUVertexFormat_WGPUVertexFormat_Sint32x4 => VertexFormat::Sint32X4,
3173            ffi::WGPUVertexFormat_WGPUVertexFormat_Unorm10_10_10_2 => {
3174                VertexFormat::Unorm1010102
3175            }
3176            ffi::WGPUVertexFormat_WGPUVertexFormat_Unorm8x4BGRA => {
3177                VertexFormat::Unorm8X4Bgra
3178            }
3179            _ => VertexFormat::Uint8,
3180        }
3181    }
3182}
3183impl From<VertexFormat> for ffi::WGPUVertexFormat {
3184    fn from(value: VertexFormat) -> Self {
3185        value as ffi::WGPUVertexFormat
3186    }
3187}
3188#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
3189#[repr(u32)]
3190pub enum VertexStepMode {
3191    Undefined = ffi::WGPUVertexStepMode_WGPUVertexStepMode_Undefined as u32,
3192    Vertex = ffi::WGPUVertexStepMode_WGPUVertexStepMode_Vertex as u32,
3193    Instance = ffi::WGPUVertexStepMode_WGPUVertexStepMode_Instance as u32,
3194}
3195impl From<ffi::WGPUVertexStepMode> for VertexStepMode {
3196    fn from(value: ffi::WGPUVertexStepMode) -> Self {
3197        match value as u32 {
3198            ffi::WGPUVertexStepMode_WGPUVertexStepMode_Undefined => {
3199                VertexStepMode::Undefined
3200            }
3201            ffi::WGPUVertexStepMode_WGPUVertexStepMode_Vertex => VertexStepMode::Vertex,
3202            ffi::WGPUVertexStepMode_WGPUVertexStepMode_Instance => {
3203                VertexStepMode::Instance
3204            }
3205            _ => VertexStepMode::Undefined,
3206        }
3207    }
3208}
3209impl From<VertexStepMode> for ffi::WGPUVertexStepMode {
3210    fn from(value: VertexStepMode) -> Self {
3211        value as ffi::WGPUVertexStepMode
3212    }
3213}
3214#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
3215#[repr(u32)]
3216pub enum WaitStatus {
3217    Success = ffi::WGPUWaitStatus_WGPUWaitStatus_Success as u32,
3218    TimedOut = ffi::WGPUWaitStatus_WGPUWaitStatus_TimedOut as u32,
3219    Error = ffi::WGPUWaitStatus_WGPUWaitStatus_Error as u32,
3220}
3221impl From<ffi::WGPUWaitStatus> for WaitStatus {
3222    fn from(value: ffi::WGPUWaitStatus) -> Self {
3223        match value as u32 {
3224            ffi::WGPUWaitStatus_WGPUWaitStatus_Success => WaitStatus::Success,
3225            ffi::WGPUWaitStatus_WGPUWaitStatus_TimedOut => WaitStatus::TimedOut,
3226            ffi::WGPUWaitStatus_WGPUWaitStatus_Error => WaitStatus::Error,
3227            _ => WaitStatus::Success,
3228        }
3229    }
3230}
3231impl From<WaitStatus> for ffi::WGPUWaitStatus {
3232    fn from(value: WaitStatus) -> Self {
3233        value as ffi::WGPUWaitStatus
3234    }
3235}
3236bitflags! {
3237    #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub struct BufferUsage : u64 {
3238    const NONE = ffi::WGPUBufferUsage_None as u64; const MAP_READ =
3239    ffi::WGPUBufferUsage_MapRead as u64; const MAP_WRITE = ffi::WGPUBufferUsage_MapWrite
3240    as u64; const COPY_SRC = ffi::WGPUBufferUsage_CopySrc as u64; const COPY_DST =
3241    ffi::WGPUBufferUsage_CopyDst as u64; const INDEX = ffi::WGPUBufferUsage_Index as u64;
3242    const VERTEX = ffi::WGPUBufferUsage_Vertex as u64; const UNIFORM =
3243    ffi::WGPUBufferUsage_Uniform as u64; const STORAGE = ffi::WGPUBufferUsage_Storage as
3244    u64; const INDIRECT = ffi::WGPUBufferUsage_Indirect as u64; const QUERY_RESOLVE =
3245    ffi::WGPUBufferUsage_QueryResolve as u64; const TEXEL_BUFFER =
3246    ffi::WGPUBufferUsage_TexelBuffer as u64; }
3247}
3248impl From<ffi::WGPUBufferUsage> for BufferUsage {
3249    fn from(value: ffi::WGPUBufferUsage) -> Self {
3250        BufferUsage::from_bits_truncate(value as u64)
3251    }
3252}
3253impl From<BufferUsage> for ffi::WGPUBufferUsage {
3254    fn from(value: BufferUsage) -> Self {
3255        value.bits() as ffi::WGPUBufferUsage
3256    }
3257}
3258bitflags! {
3259    #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub struct ColorWriteMask : u64 {
3260    const NONE = ffi::WGPUColorWriteMask_None as u64; const RED =
3261    ffi::WGPUColorWriteMask_Red as u64; const GREEN = ffi::WGPUColorWriteMask_Green as
3262    u64; const BLUE = ffi::WGPUColorWriteMask_Blue as u64; const ALPHA =
3263    ffi::WGPUColorWriteMask_Alpha as u64; const ALL = ffi::WGPUColorWriteMask_All as u64;
3264    }
3265}
3266impl From<ffi::WGPUColorWriteMask> for ColorWriteMask {
3267    fn from(value: ffi::WGPUColorWriteMask) -> Self {
3268        ColorWriteMask::from_bits_truncate(value as u64)
3269    }
3270}
3271impl From<ColorWriteMask> for ffi::WGPUColorWriteMask {
3272    fn from(value: ColorWriteMask) -> Self {
3273        value.bits() as ffi::WGPUColorWriteMask
3274    }
3275}
3276bitflags! {
3277    #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub struct HeapProperty : u64 {
3278    const NONE = ffi::WGPUHeapProperty_None as u64; const DEVICE_LOCAL =
3279    ffi::WGPUHeapProperty_DeviceLocal as u64; const HOST_VISIBLE =
3280    ffi::WGPUHeapProperty_HostVisible as u64; const HOST_COHERENT =
3281    ffi::WGPUHeapProperty_HostCoherent as u64; const HOST_UNCACHED =
3282    ffi::WGPUHeapProperty_HostUncached as u64; const HOST_CACHED =
3283    ffi::WGPUHeapProperty_HostCached as u64; }
3284}
3285impl From<ffi::WGPUHeapProperty> for HeapProperty {
3286    fn from(value: ffi::WGPUHeapProperty) -> Self {
3287        HeapProperty::from_bits_truncate(value as u64)
3288    }
3289}
3290impl From<HeapProperty> for ffi::WGPUHeapProperty {
3291    fn from(value: HeapProperty) -> Self {
3292        value.bits() as ffi::WGPUHeapProperty
3293    }
3294}
3295bitflags! {
3296    #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub struct MapMode : u64 { const
3297    NONE = ffi::WGPUMapMode_None as u64; const READ = ffi::WGPUMapMode_Read as u64; const
3298    WRITE = ffi::WGPUMapMode_Write as u64; }
3299}
3300impl From<ffi::WGPUMapMode> for MapMode {
3301    fn from(value: ffi::WGPUMapMode) -> Self {
3302        MapMode::from_bits_truncate(value as u64)
3303    }
3304}
3305impl From<MapMode> for ffi::WGPUMapMode {
3306    fn from(value: MapMode) -> Self {
3307        value.bits() as ffi::WGPUMapMode
3308    }
3309}
3310bitflags! {
3311    #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub struct ShaderStage : u64 {
3312    const NONE = ffi::WGPUShaderStage_None as u64; const VERTEX =
3313    ffi::WGPUShaderStage_Vertex as u64; const FRAGMENT = ffi::WGPUShaderStage_Fragment as
3314    u64; const COMPUTE = ffi::WGPUShaderStage_Compute as u64; }
3315}
3316impl From<ffi::WGPUShaderStage> for ShaderStage {
3317    fn from(value: ffi::WGPUShaderStage) -> Self {
3318        ShaderStage::from_bits_truncate(value as u64)
3319    }
3320}
3321impl From<ShaderStage> for ffi::WGPUShaderStage {
3322    fn from(value: ShaderStage) -> Self {
3323        value.bits() as ffi::WGPUShaderStage
3324    }
3325}
3326bitflags! {
3327    #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub struct TextureUsage : u64 {
3328    const NONE = ffi::WGPUTextureUsage_None as u64; const COPY_SRC =
3329    ffi::WGPUTextureUsage_CopySrc as u64; const COPY_DST = ffi::WGPUTextureUsage_CopyDst
3330    as u64; const TEXTURE_BINDING = ffi::WGPUTextureUsage_TextureBinding as u64; const
3331    STORAGE_BINDING = ffi::WGPUTextureUsage_StorageBinding as u64; const
3332    RENDER_ATTACHMENT = ffi::WGPUTextureUsage_RenderAttachment as u64; const
3333    TRANSIENT_ATTACHMENT = ffi::WGPUTextureUsage_TransientAttachment as u64; const
3334    STORAGE_ATTACHMENT = ffi::WGPUTextureUsage_StorageAttachment as u64; }
3335}
3336impl From<ffi::WGPUTextureUsage> for TextureUsage {
3337    fn from(value: ffi::WGPUTextureUsage) -> Self {
3338        TextureUsage::from_bits_truncate(value as u64)
3339    }
3340}
3341impl From<TextureUsage> for ffi::WGPUTextureUsage {
3342    fn from(value: TextureUsage) -> Self {
3343        value.bits() as ffi::WGPUTextureUsage
3344    }
3345}