1 /*
2 Copyright (c) 2019-2023 Timur Gafarov.
3 
4 Boost Software License - Version 1.0 - August 17th, 2003
5 
6 Permission is hereby granted, free of charge, to any person or organization
7 obtaining a copy of the software and accompanying documentation covered by
8 this license (the "Software") to use, reproduce, display, distribute,
9 execute, and transmit the Software, and to prepare derivative works of the
10 Software, and to permit third-parties to whom the Software is furnished to
11 do so, all subject to the following:
12 
13 The copyright notices in the Software and this entire statement, including
14 the above license grant, this restriction and the following disclaimer,
15 must be included in all copies of the Software, in whole or in part, and
16 all derivative works of the Software, unless such copies or derivative
17 works are solely in the form of machine-executable object code generated by
18 a source language processor.
19 
20 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
23 SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
24 FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
25 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26 DEALINGS IN THE SOFTWARE.
27 */
28 module bindbc.wgpu.types;
29 
30 import core.stdc.stdint;
31 
32 /*
33  * Type definitions from webgpu.h
34  */
35 
36 enum ulong WGPU_ARRAY_LAYER_COUNT_UNDEFINED = 0xffffffffUL;
37 enum ulong WGPU_COPY_STRIDE_UNDEFINED = 0xffffffffUL;
38 enum ulong WGPU_LIMIT_U32_UNDEFINED = 0xffffffffUL;
39 enum ulong WGPU_LIMIT_U64_UNDEFINED = 0xffffffffffffffffUL;
40 enum ulong WGPU_MIP_LEVEL_COUNT_UNDEFINED = 0xffffffffUL;
41 enum ulong WGPU_QUERY_SET_INDEX_UNDEFINED = 0xffffffffUL;
42 enum ulong WGPU_WHOLE_MAP_SIZE = SIZE_MAX;
43 enum ulong WGPU_WHOLE_SIZE = 0xffffffffffffffffUL;
44 
45 alias WGPUFlags = uint;
46 alias WGPUBool = uint;
47 
48 alias WGPUAdapter = void*;
49 alias WGPUBindGroup = void*;
50 alias WGPUBindGroupLayout = void*;
51 alias WGPUBuffer = void*;
52 alias WGPUCommandBuffer = void*;
53 alias WGPUCommandEncoder = void*;
54 alias WGPUComputePassEncoder = void*;
55 alias WGPUComputePipeline = void*;
56 alias WGPUDevice = void*;
57 alias WGPUInstance = void*;
58 alias WGPUPipelineLayout = void*;
59 alias WGPUQuerySet = void*;
60 alias WGPUQueue = void*;
61 alias WGPURenderBundle = void*;
62 alias WGPURenderBundleEncoder = void*;
63 alias WGPURenderPassEncoder = void*;
64 alias WGPURenderPipeline = void*;
65 alias WGPUSampler = void*;
66 alias WGPUShaderModule = void*;
67 alias WGPUSurface = void*;
68 alias WGPUTexture = void*;
69 alias WGPUTextureView = void*;
70 
71 enum WGPUAdapterType
72 {
73     DiscreteGPU = 0x00000000,
74     IntegratedGPU = 0x00000001,
75     CPU = 0x00000002,
76     Unknown = 0x00000003,
77     Force32 = 0x7FFFFFFF
78 }
79 
80 enum WGPUAddressMode
81 {
82     Repeat = 0x00000000,
83     MirrorRepeat = 0x00000001,
84     ClampToEdge = 0x00000002,
85     Force32 = 0x7FFFFFFF
86 }
87 
88 enum WGPUBackendType
89 {
90     Undefined = 0x00000000,
91     Null = 0x00000001,
92     WebGPU = 0x00000002,
93     D3D11 = 0x00000003,
94     D3D12 = 0x00000004,
95     Metal = 0x00000005,
96     Vulkan = 0x00000006,
97     OpenGL = 0x00000007,
98     OpenGLES = 0x00000008,
99     Force32 = 0x7FFFFFFF
100 }
101 
102 enum WGPUBlendFactor
103 {
104     Zero = 0x00000000,
105     One = 0x00000001,
106     Src = 0x00000002,
107     OneMinusSrc = 0x00000003,
108     SrcAlpha = 0x00000004,
109     OneMinusSrcAlpha = 0x00000005,
110     Dst = 0x00000006,
111     OneMinusDst = 0x00000007,
112     DstAlpha = 0x00000008,
113     OneMinusDstAlpha = 0x00000009,
114     SrcAlphaSaturated = 0x0000000A,
115     Constant = 0x0000000B,
116     OneMinusConstant = 0x0000000C,
117     Force32 = 0x7FFFFFFF
118 }
119 
120 enum WGPUBlendOperation
121 {
122     Add = 0x00000000,
123     Subtract = 0x00000001,
124     ReverseSubtract = 0x00000002,
125     Min = 0x00000003,
126     Max = 0x00000004,
127     Force32 = 0x7FFFFFFF
128 }
129 
130 enum WGPUBufferBindingType
131 {
132     Undefined = 0x00000000,
133     Uniform = 0x00000001,
134     Storage = 0x00000002,
135     ReadOnlyStorage = 0x00000003,
136     Force32 = 0x7FFFFFFF
137 }
138 
139 enum WGPUBufferMapAsyncStatus
140 {
141     Success = 0x00000000,
142     ValidationError = 0x00000001,
143     Unknown = 0x00000002,
144     DeviceLost = 0x00000003,
145     DestroyedBeforeCallback = 0x00000004,
146     UnmappedBeforeCallback = 0x00000005,
147     MappingAlreadyPending = 0x00000006,
148     OffsetOutOfRange = 0x00000007,
149     SizeOutOfRange = 0x00000008,
150     Force32 = 0x7FFFFFFF
151 }
152 
153 enum WGPUBufferMapState {
154     Unmapped = 0x00000000,
155     Pending = 0x00000001,
156     Mapped = 0x00000002,
157     Force32 = 0x7FFFFFFF
158 }
159 
160 enum WGPUCompareFunction
161 {
162     Undefined = 0x00000000,
163     Never = 0x00000001,
164     Less = 0x00000002,
165     LessEqual = 0x00000003,
166     Greater = 0x00000004,
167     GreaterEqual = 0x00000005,
168     Equal = 0x00000006,
169     NotEqual = 0x00000007,
170     Always = 0x00000008,
171     Force32 = 0x7FFFFFFF
172 }
173 
174 enum WGPUCompilationInfoRequestStatus
175 {
176     Success = 0x00000000,
177     Error = 0x00000001,
178     DeviceLost = 0x00000002,
179     Unknown = 0x00000003,
180     Force32 = 0x7FFFFFFF
181 }
182 
183 enum WGPUCompilationMessageType
184 {
185     Error = 0x00000000,
186     Warning = 0x00000001,
187     Info = 0x00000002,
188     Force32 = 0x7FFFFFFF
189 }
190 
191 enum WGPUCompositeAlphaMode {
192     Auto = 0x00000000,
193     Opaque = 0x00000001,
194     Premultiplied = 0x00000002,
195     Unpremultiplied = 0x00000003,
196     Inherit = 0x00000004,
197     Force32 = 0x7FFFFFFF
198 }
199 
200 enum WGPUCreatePipelineAsyncStatus
201 {
202     Success = 0x00000000,
203     ValidationError = 0x00000001,
204     InternalError = 0x00000002,
205     DeviceLost = 0x00000003,
206     DeviceDestroyed = 0x00000004,
207     Unknown = 0x00000005,
208     Force32 = 0x7FFFFFFF
209 }
210 
211 enum WGPUCullMode
212 {
213     None = 0x00000000,
214     Front = 0x00000001,
215     Back = 0x00000002,
216     Force32 = 0x7FFFFFFF
217 }
218 
219 enum WGPUDeviceLostReason
220 {
221     Undefined = 0x00000000,
222     Destroyed = 0x00000001,
223     Force32 = 0x7FFFFFFF
224 }
225 
226 enum WGPUErrorFilter
227 {
228     Validation = 0x00000000,
229     OutOfMemory = 0x00000001,
230     Internal = 0x00000002,
231     Force32 = 0x7FFFFFFF
232 }
233 
234 enum WGPUErrorType
235 {
236     NoError = 0x00000000,
237     Validation = 0x00000001,
238     OutOfMemory = 0x00000002,
239     Internal = 0x00000003,
240     Unknown = 0x00000004,
241     DeviceLost = 0x00000005,
242     Force32 = 0x7FFFFFFF
243 }
244 
245 enum WGPUFeatureName
246 {
247     Undefined = 0x00000000,
248     DepthClipControl = 0x00000001,
249     Depth32FloatStencil8 = 0x00000002,
250     TimestampQuery = 0x00000003,
251     TextureCompressionBC = 0x00000004,
252     TextureCompressionETC2 = 0x00000005,
253     TextureCompressionASTC = 0x00000006,
254     IndirectFirstInstance = 0x00000007,
255     ShaderF16 = 0x00000008,
256     RG11B10UfloatRenderable = 0x00000009,
257     BGRA8UnormStorage = 0x0000000A,
258     Float32Filterable = 0x0000000B,
259     Force32 = 0x7FFFFFFF
260 }
261 
262 enum WGPUFilterMode
263 {
264     Nearest = 0x00000000,
265     Linear = 0x00000001,
266     Force32 = 0x7FFFFFFF
267 }
268 
269 enum WGPUFrontFace
270 {
271     CCW = 0x00000000,
272     CW = 0x00000001,
273     Force32 = 0x7FFFFFFF
274 }
275 
276 enum WGPUIndexFormat
277 {
278     Undefined = 0x00000000,
279     Uint16 = 0x00000001,
280     Uint32 = 0x00000002,
281     Force32 = 0x7FFFFFFF
282 }
283 
284 enum WGPULoadOp
285 {
286     Undefined = 0x00000000,
287     Clear = 0x00000001,
288     Load = 0x00000002,
289     Force32 = 0x7FFFFFFF
290 }
291 
292 enum WGPUMipmapFilterMode
293 {
294     Nearest = 0x00000000,
295     Linear = 0x00000001,
296     Force32 = 0x7FFFFFFF
297 }
298 
299 /*
300 enum WGPUPipelineStatisticName
301 {
302     VertexShaderInvocations = 0x00000000,
303     ClipperInvocations = 0x00000001,
304     ClipperPrimitivesOut = 0x00000002,
305     FragmentShaderInvocations = 0x00000003,
306     ComputeShaderInvocations = 0x00000004,
307     Force32 = 0x7FFFFFFF
308 }
309 */
310 
311 enum WGPUPowerPreference
312 {
313     Undefined = 0x00000000,
314     LowPower = 0x00000001,
315     HighPerformance = 0x00000002,
316     Force32 = 0x7FFFFFFF
317 }
318 
319 enum WGPUPresentMode
320 {
321     Fifo = 0x00000000,
322     FifoRelaxed = 0x00000001,
323     Immediate = 0x00000002,
324     Mailbox = 0x00000003,
325     Force32 = 0x7FFFFFFF
326 }
327 
328 enum WGPUPrimitiveTopology
329 {
330     PointList = 0x00000000,
331     LineList = 0x00000001,
332     LineStrip = 0x00000002,
333     TriangleList = 0x00000003,
334     TriangleStrip = 0x00000004,
335     Force32 = 0x7FFFFFFF
336 }
337 
338 enum WGPUQueryType
339 {
340     Occlusion = 0x00000000,
341     Timestamp = 0x00000001,
342     Force32 = 0x7FFFFFFF
343 }
344 
345 enum WGPUQueueWorkDoneStatus
346 {
347     Success = 0x00000000,
348     Error = 0x00000001,
349     Unknown = 0x00000002,
350     DeviceLost = 0x00000003,
351     Force32 = 0x7FFFFFFF
352 }
353 
354 enum WGPURequestAdapterStatus
355 {
356     Success = 0x00000000,
357     Unavailable = 0x00000001,
358     Error = 0x00000002,
359     Unknown = 0x00000003,
360     Force32 = 0x7FFFFFFF
361 }
362 
363 enum WGPURequestDeviceStatus
364 {
365     Success = 0x00000000,
366     Error = 0x00000001,
367     Unknown = 0x00000002,
368     Force32 = 0x7FFFFFFF
369 }
370 
371 enum WGPUSType
372 {
373     Invalid = 0x00000000,
374     SurfaceDescriptorFromMetalLayer = 0x00000001,
375     SurfaceDescriptorFromWindowsHWND = 0x00000002,
376     SurfaceDescriptorFromXlibWindow = 0x00000003,
377     SurfaceDescriptorFromCanvasHTMLSelector = 0x00000004,
378     ShaderModuleSPIRVDescriptor = 0x00000005,
379     ShaderModuleWGSLDescriptor = 0x00000006,
380     PrimitiveDepthClipControl = 0x00000007,
381     SurfaceDescriptorFromWaylandSurface = 0x00000008,
382     SurfaceDescriptorFromAndroidNativeWindow = 0x00000009,
383     SurfaceDescriptorFromXcbWindow = 0x0000000A,
384     RenderPassDescriptorMaxDrawCount = 0x0000000F,
385     Force32 = 0x7FFFFFFF
386 }
387 
388 enum WGPUSamplerBindingType
389 {
390     Undefined = 0x00000000,
391     Filtering = 0x00000001,
392     NonFiltering = 0x00000002,
393     Comparison = 0x00000003,
394     Force32 = 0x7FFFFFFF
395 }
396 
397 enum WGPUStencilOperation
398 {
399     Keep = 0x00000000,
400     Zero = 0x00000001,
401     Replace = 0x00000002,
402     Invert = 0x00000003,
403     IncrementClamp = 0x00000004,
404     DecrementClamp = 0x00000005,
405     IncrementWrap = 0x00000006,
406     DecrementWrap = 0x00000007,
407     Force32 = 0x7FFFFFFF
408 }
409 
410 enum WGPUStorageTextureAccess
411 {
412     Undefined = 0x00000000,
413     WriteOnly = 0x00000001,
414     ReadOnly = 0x00000002,
415     ReadWrite = 0x00000003,
416     Force32 = 0x7FFFFFFF
417 }
418 
419 enum WGPUStoreOp
420 {
421     Undefined = 0x00000000,
422     Store = 0x00000001,
423     Discard = 0x00000002,
424     Force32 = 0x7FFFFFFF
425 }
426 
427 enum WGPUSurfaceGetCurrentTextureStatus {
428     Success = 0x00000000,
429     Timeout = 0x00000001,
430     Outdated = 0x00000002,
431     Lost = 0x00000003,
432     OutOfMemory = 0x00000004,
433     DeviceLost = 0x00000005,
434     Force32 = 0x7FFFFFFF
435 }
436 
437 enum WGPUTextureAspect
438 {
439     All = 0x00000000,
440     StencilOnly = 0x00000001,
441     DepthOnly = 0x00000002,
442     Force32 = 0x7FFFFFFF
443 }
444 
445 enum WGPUTextureDimension
446 {
447     D1 = 0x00000000,
448     D2 = 0x00000001,
449     D3 = 0x00000002,
450     Force32 = 0x7FFFFFFF
451 }
452 
453 enum WGPUTextureFormat
454 {
455     Undefined = 0x00000000,
456     R8Unorm = 0x00000001,
457     R8Snorm = 0x00000002,
458     R8Uint = 0x00000003,
459     R8Sint = 0x00000004,
460     R16Uint = 0x00000005,
461     R16Sint = 0x00000006,
462     R16Float = 0x00000007,
463     RG8Unorm = 0x00000008,
464     RG8Snorm = 0x00000009,
465     RG8Uint = 0x0000000A,
466     RG8Sint = 0x0000000B,
467     R32Float = 0x0000000C,
468     R32Uint = 0x0000000D,
469     R32Sint = 0x0000000E,
470     RG16Uint = 0x0000000F,
471     RG16Sint = 0x00000010,
472     RG16Float = 0x00000011,
473     RGBA8Unorm = 0x00000012,
474     RGBA8UnormSrgb = 0x00000013,
475     RGBA8Snorm = 0x00000014,
476     RGBA8Uint = 0x00000015,
477     RGBA8Sint = 0x00000016,
478     BGRA8Unorm = 0x00000017,
479     BGRA8UnormSrgb = 0x00000018,
480     RGB10A2Uint = 0x00000019,
481     RGB10A2Unorm = 0x0000001A,
482     RG11B10Ufloat = 0x0000001B,
483     RGB9E5Ufloat = 0x0000001C,
484     RG32Float = 0x0000001D,
485     RG32Uint = 0x0000001E,
486     RG32Sint = 0x0000001F,
487     RGBA16Uint = 0x00000020,
488     RGBA16Sint = 0x00000021,
489     RGBA16Float = 0x00000022,
490     RGBA32Float = 0x00000023,
491     RGBA32Uint = 0x00000024,
492     RGBA32Sint = 0x00000025,
493     Stencil8 = 0x00000026,
494     Depth16Unorm = 0x00000027,
495     Depth24Plus = 0x00000028,
496     Depth24PlusStencil8 = 0x00000029,
497     Depth32Float = 0x0000002A,
498     Depth32FloatStencil8 = 0x0000002B,
499     BC1RGBAUnorm = 0x0000002C,
500     BC1RGBAUnormSrgb = 0x0000002D,
501     BC2RGBAUnorm = 0x0000002E,
502     BC2RGBAUnormSrgb = 0x0000002F,
503     BC3RGBAUnorm = 0x00000030,
504     BC3RGBAUnormSrgb = 0x00000031,
505     BC4RUnorm = 0x00000032,
506     BC4RSnorm = 0x00000033,
507     BC5RGUnorm = 0x00000034,
508     BC5RGSnorm = 0x00000035,
509     BC6HRGBUfloat = 0x00000036,
510     BC6HRGBFloat = 0x00000037,
511     BC7RGBAUnorm = 0x00000038,
512     BC7RGBAUnormSrgb = 0x00000039,
513     ETC2RGB8Unorm = 0x0000003A,
514     ETC2RGB8UnormSrgb = 0x0000003B,
515     ETC2RGB8A1Unorm = 0x0000003C,
516     ETC2RGB8A1UnormSrgb = 0x0000003D,
517     ETC2RGBA8Unorm = 0x0000003E,
518     ETC2RGBA8UnormSrgb = 0x0000003F,
519     EACR11Unorm = 0x00000040,
520     EACR11Snorm = 0x00000041,
521     EACRG11Unorm = 0x00000042,
522     EACRG11Snorm = 0x00000043,
523     ASTC4x4Unorm = 0x00000044,
524     ASTC4x4UnormSrgb = 0x00000045,
525     ASTC5x4Unorm = 0x00000046,
526     ASTC5x4UnormSrgb = 0x00000047,
527     ASTC5x5Unorm = 0x00000048,
528     ASTC5x5UnormSrgb = 0x00000049,
529     ASTC6x5Unorm = 0x0000004A,
530     ASTC6x5UnormSrgb = 0x0000004B,
531     ASTC6x6Unorm = 0x0000004C,
532     ASTC6x6UnormSrgb = 0x0000004D,
533     ASTC8x5Unorm = 0x0000004E,
534     ASTC8x5UnormSrgb = 0x0000004F,
535     ASTC8x6Unorm = 0x00000050,
536     ASTC8x6UnormSrgb = 0x00000051,
537     ASTC8x8Unorm = 0x00000052,
538     ASTC8x8UnormSrgb = 0x00000053,
539     ASTC10x5Unorm = 0x00000054,
540     ASTC10x5UnormSrgb = 0x00000055,
541     ASTC10x6Unorm = 0x00000056,
542     ASTC10x6UnormSrgb = 0x00000057,
543     ASTC10x8Unorm = 0x00000058,
544     ASTC10x8UnormSrgb = 0x00000059,
545     ASTC10x10Unorm = 0x0000005A,
546     ASTC10x10UnormSrgb = 0x0000005B,
547     ASTC12x10Unorm = 0x0000005C,
548     ASTC12x10UnormSrgb = 0x0000005D,
549     ASTC12x12Unorm = 0x0000005E,
550     ASTC12x12UnormSrgb = 0x0000005F,
551     Force32 = 0x7FFFFFFF
552 }
553 
554 enum WGPUTextureSampleType
555 {
556     Undefined = 0x00000000,
557     Float = 0x00000001,
558     UnfilterableFloat = 0x00000002,
559     Depth = 0x00000003,
560     Sint = 0x00000004,
561     Uint = 0x00000005,
562     Force32 = 0x7FFFFFFF
563 }
564 
565 enum WGPUTextureViewDimension
566 {
567     Undefined = 0x00000000,
568     D1 = 0x00000001,
569     D2 = 0x00000002,
570     D2Array = 0x00000003,
571     Cube = 0x00000004,
572     CubeArray = 0x00000005,
573     D3 = 0x00000006,
574     Force32 = 0x7FFFFFFF
575 }
576 
577 enum WGPUVertexFormat
578 {
579     Undefined = 0x00000000,
580     Uint8x2 = 0x00000001,
581     Uint8x4 = 0x00000002,
582     Sint8x2 = 0x00000003,
583     Sint8x4 = 0x00000004,
584     Unorm8x2 = 0x00000005,
585     Unorm8x4 = 0x00000006,
586     Snorm8x2 = 0x00000007,
587     Snorm8x4 = 0x00000008,
588     Uint16x2 = 0x00000009,
589     Uint16x4 = 0x0000000A,
590     Sint16x2 = 0x0000000B,
591     Sint16x4 = 0x0000000C,
592     Unorm16x2 = 0x0000000D,
593     Unorm16x4 = 0x0000000E,
594     Snorm16x2 = 0x0000000F,
595     Snorm16x4 = 0x00000010,
596     Float16x2 = 0x00000011,
597     Float16x4 = 0x00000012,
598     Float32 = 0x00000013,
599     Float32x2 = 0x00000014,
600     Float32x3 = 0x00000015,
601     Float32x4 = 0x00000016,
602     Uint32 = 0x00000017,
603     Uint32x2 = 0x00000018,
604     Uint32x3 = 0x00000019,
605     Uint32x4 = 0x0000001A,
606     Sint32 = 0x0000001B,
607     Sint32x2 = 0x0000001C,
608     Sint32x3 = 0x0000001D,
609     Sint32x4 = 0x0000001E,
610     Force32 = 0x7FFFFFFF
611 }
612 
613 enum WGPUVertexStepMode
614 {
615     Vertex = 0x00000000,
616     Instance = 0x00000001,
617     VertexBufferNotUsed = 0x00000002,
618     Force32 = 0x7FFFFFFF
619 }
620 
621 enum WGPUBufferUsage
622 {
623     None = 0x00000000,
624     MapRead = 0x00000001,
625     MapWrite = 0x00000002,
626     CopySrc = 0x00000004,
627     CopyDst = 0x00000008,
628     Index = 0x00000010,
629     Vertex = 0x00000020,
630     Uniform = 0x00000040,
631     Storage = 0x00000080,
632     Indirect = 0x00000100,
633     QueryResolve = 0x00000200,
634     Force32 = 0x7FFFFFFF
635 }
636 
637 alias WGPUBufferUsageFlags = WGPUFlags;
638 
639 enum WGPUColorWriteMask
640 {
641     None = 0x00000000,
642     Red = 0x00000001,
643     Green = 0x00000002,
644     Blue = 0x00000004,
645     Alpha = 0x00000008,
646     All = 0x0000000F,
647     Force32 = 0x7FFFFFFF
648 }
649 
650 alias WGPUColorWriteMaskFlags = WGPUFlags;
651 
652 enum WGPUMapMode
653 {
654     None = 0x00000000,
655     Read = 0x00000001,
656     Write = 0x00000002,
657     Force32 = 0x7FFFFFFF
658 }
659 
660 alias WGPUMapModeFlags = WGPUFlags;
661 
662 enum WGPUShaderStage
663 {
664     None = 0x00000000,
665     Vertex = 0x00000001,
666     Fragment = 0x00000002,
667     Compute = 0x00000004,
668     Force32 = 0x7FFFFFFF
669 }
670 
671 alias WGPUShaderStageFlags = WGPUFlags;
672 
673 enum WGPUTextureUsage
674 {
675     None = 0x00000000,
676     CopySrc = 0x00000001,
677     CopyDst = 0x00000002,
678     TextureBinding = 0x00000004,
679     StorageBinding = 0x00000008,
680     RenderAttachment = 0x00000010,
681     Force32 = 0x7FFFFFFF
682 }
683 
684 alias WGPUTextureUsageFlags = WGPUFlags;
685 
686 struct WGPUChainedStruct
687 {
688     const(WGPUChainedStruct)* next;
689     WGPUSType sType;
690 }
691 
692 struct WGPUChainedStructOut
693 {
694     WGPUChainedStructOut* next;
695     WGPUSType sType;
696 }
697 
698 struct WGPUAdapterProperties
699 {
700     WGPUChainedStructOut* nextInChain;
701     uint vendorID;
702     const(char)* vendorName;
703     const(char)* architecture;
704     uint deviceID;
705     const(char)* name;
706     const(char)* driverDescription;
707     WGPUAdapterType adapterType;
708     WGPUBackendType backendType;
709 }
710 
711 struct WGPUBindGroupEntry
712 {
713     const(WGPUChainedStruct)* nextInChain;
714     uint binding;
715     WGPUBuffer buffer; // nullable
716     ulong offset;
717     ulong size;
718     WGPUSampler sampler; // nullable
719     WGPUTextureView textureView; // nullable
720 }
721 
722 struct WGPUBlendComponent
723 {
724     WGPUBlendOperation operation;
725     WGPUBlendFactor srcFactor;
726     WGPUBlendFactor dstFactor;
727 }
728 
729 struct WGPUBufferBindingLayout
730 {
731     const(WGPUChainedStruct)* nextInChain;
732     WGPUBufferBindingType type;
733     WGPUBool hasDynamicOffset;
734     ulong minBindingSize;
735 }
736 
737 struct WGPUBufferDescriptor
738 {
739     const(WGPUChainedStruct)* nextInChain;
740     const(char)* label; // nullable
741     WGPUBufferUsageFlags usage;
742     ulong size;
743     WGPUBool mappedAtCreation;
744 }
745 
746 struct WGPUColor
747 {
748     double r;
749     double g;
750     double b;
751     double a;
752 }
753 
754 struct WGPUCommandBufferDescriptor
755 {
756     const(WGPUChainedStruct)* nextInChain;
757     const(char)* label; // nullable
758 }
759 
760 struct WGPUCommandEncoderDescriptor
761 {
762     const(WGPUChainedStruct)* nextInChain;
763     const(char)* label; // nullable
764 }
765 
766 struct WGPUCompilationMessage
767 {
768     const(WGPUChainedStruct)* nextInChain;
769     const(char)* message; // nullable
770     WGPUCompilationMessageType type;
771     ulong lineNum;
772     ulong linePos;
773     ulong offset;
774     ulong length;
775     ulong utf16LinePos;
776     ulong utf16Offset;
777     ulong utf16Length;
778 }
779 
780 struct WGPUComputePassTimestampWrites
781 {
782     WGPUQuerySet querySet;
783     uint beginningOfPassWriteIndex;
784     uint endOfPassWriteIndex;
785 }
786 
787 struct WGPUConstantEntry
788 {
789     const(WGPUChainedStruct)* nextInChain;
790     const(char)* key;
791     double value;
792 }
793 
794 struct WGPUExtent3D
795 {
796     uint width;
797     uint height;
798     uint depthOrArrayLayers;
799 }
800 
801 struct WGPUInstanceDescriptor
802 {
803     const(WGPUChainedStruct)* nextInChain;
804 }
805 
806 /**
807  * Default values as per https://www.w3.org/TR/webgpu/#limits
808  */
809 struct WGPULimits
810 {
811     uint maxTextureDimension1D = 8192;
812     uint maxTextureDimension2D = 8192;
813     uint maxTextureDimension3D = 2048;
814     uint maxTextureArrayLayers = 256;
815     uint maxBindGroups = 4;
816     uint maxBindGroupsPlusVertexBuffers = 24;
817     uint maxBindingsPerBindGroup = 640;
818     uint maxDynamicUniformBuffersPerPipelineLayout = 8;
819     uint maxDynamicStorageBuffersPerPipelineLayout = 4;
820     uint maxSampledTexturesPerShaderStage = 16;
821     uint maxSamplersPerShaderStage = 16;
822     uint maxStorageBuffersPerShaderStage = 8;
823     uint maxStorageTexturesPerShaderStage = 4;
824     uint maxUniformBuffersPerShaderStage = 12;
825     ulong maxUniformBufferBindingSize = 65536;
826     ulong maxStorageBufferBindingSize = 134217728;
827     uint minUniformBufferOffsetAlignment = 256;
828     uint minStorageBufferOffsetAlignment = 256;
829     uint maxVertexBuffers = 8;
830     ulong maxBufferSize = 268435456;
831     uint maxVertexAttributes = 16;
832     uint maxVertexBufferArrayStride = 2048;
833     uint maxInterStageShaderComponents = 60;
834     uint maxInterStageShaderVariables = 16;
835     uint maxColorAttachments = 8;
836     uint maxColorAttachmentBytesPerSample = 32;
837     uint maxComputeWorkgroupStorageSize = 16384;
838     uint maxComputeInvocationsPerWorkgroup = 256;
839     uint maxComputeWorkgroupSizeX = 256;
840     uint maxComputeWorkgroupSizeY = 256;
841     uint maxComputeWorkgroupSizeZ = 64;
842     uint maxComputeWorkgroupsPerDimension = 65535;
843 }
844 
845 struct WGPUMultisampleState
846 {
847     const(WGPUChainedStruct)* nextInChain;
848     uint count;
849     uint mask;
850     WGPUBool alphaToCoverageEnabled;
851 }
852 
853 struct WGPUOrigin3D
854 {
855     uint x;
856     uint y;
857     uint z;
858 }
859 
860 struct WGPUPipelineLayoutDescriptor
861 {
862     const(WGPUChainedStruct)* nextInChain;
863     const(char)* label; // nullable
864     size_t bindGroupLayoutCount;
865     const(WGPUBindGroupLayout)* bindGroupLayouts;
866 }
867 
868 // Can be chained in WGPUPrimitiveState
869 struct WGPUPrimitiveDepthClipControl
870 {
871     WGPUChainedStruct chain;
872     WGPUBool unclippedDepth;
873 }
874 
875 struct WGPUPrimitiveState
876 {
877     const(WGPUChainedStruct)* nextInChain;
878     WGPUPrimitiveTopology topology;
879     WGPUIndexFormat stripIndexFormat;
880     WGPUFrontFace frontFace;
881     WGPUCullMode cullMode;
882 }
883 
884 struct WGPUQuerySetDescriptor
885 {
886     const(WGPUChainedStruct)* nextInChain;
887     const(char)* label; // nullable
888     WGPUQueryType type;
889     uint count;
890 }
891 
892 struct WGPUQueueDescriptor
893 {
894     const(WGPUChainedStruct)* nextInChain;
895     const(char)* label; // nullable
896 }
897 
898 struct WGPURenderBundleDescriptor
899 {
900     const(WGPUChainedStruct)* nextInChain;
901     const(char)* label; // nullable
902 }
903 
904 struct WGPURenderBundleEncoderDescriptor
905 {
906     const(WGPUChainedStruct)* nextInChain;
907     const(char)* label; // nullable
908     size_t colorFormatCount;
909     const(WGPUTextureFormat)* colorFormats;
910     WGPUTextureFormat depthStencilFormat;
911     uint sampleCount;
912     WGPUBool depthReadOnly;
913     WGPUBool stencilReadOnly;
914 }
915 
916 struct WGPURenderPassDepthStencilAttachment
917 {
918     WGPUTextureView view;
919     WGPULoadOp depthLoadOp;
920     WGPUStoreOp depthStoreOp;
921     float depthClearValue;
922     WGPUBool depthReadOnly;
923     WGPULoadOp stencilLoadOp;
924     WGPUStoreOp stencilStoreOp;
925     uint stencilClearValue;
926     WGPUBool stencilReadOnly;
927 }
928 
929 // Can be chained in WGPURenderPassDescriptor
930 struct WGPURenderPassDescriptorMaxDrawCount
931 {
932     WGPUChainedStruct chain;
933     ulong maxDrawCount;
934 }
935 
936 struct WGPURenderPassTimestampWrites
937 {
938     WGPUQuerySet querySet;
939     uint beginningOfPassWriteIndex;
940     uint endOfPassWriteIndex;
941 }
942 
943 struct WGPURequestAdapterOptions
944 {
945     const(WGPUChainedStruct)* nextInChain;
946     WGPUSurface compatibleSurface; // nullable
947     WGPUPowerPreference powerPreference;
948     WGPUBackendType backendType;
949     WGPUBool forceFallbackAdapter;
950 }
951 
952 struct WGPUSamplerBindingLayout
953 {
954     const(WGPUChainedStruct)* nextInChain;
955     WGPUSamplerBindingType type;
956 }
957 
958 /**
959  * Default values as per https://www.w3.org/TR/webgpu/#GPUSamplerDescriptor
960  */
961 struct WGPUSamplerDescriptor
962 {
963     const(WGPUChainedStruct)* nextInChain;
964     const(char)* label; // nullable
965     WGPUAddressMode addressModeU = WGPUAddressMode.ClampToEdge;
966     WGPUAddressMode addressModeV = WGPUAddressMode.ClampToEdge;
967     WGPUAddressMode addressModeW = WGPUAddressMode.ClampToEdge;
968     WGPUFilterMode magFilter = WGPUFilterMode.Nearest;
969     WGPUFilterMode minFilter = WGPUFilterMode.Nearest;
970     WGPUMipmapFilterMode mipmapFilter = WGPUMipmapFilterMode.Nearest;
971     float lodMinClamp = 0.0f;
972     float lodMaxClamp = 32.0f;
973     WGPUCompareFunction compare;
974     ushort maxAnisotropy = 1;
975 }
976 
977 struct WGPUShaderModuleCompilationHint
978 {
979     const(WGPUChainedStruct)* nextInChain;
980     const(char)* entryPoint;
981     WGPUPipelineLayout layout;
982 }
983 
984 // Can be chained in WGPUShaderModuleDescriptor
985 struct WGPUShaderModuleSPIRVDescriptor
986 {
987     WGPUChainedStruct chain;
988     uint codeSize;
989     const(uint)* code;
990 }
991 
992 // Can be chained in WGPUShaderModuleDescriptor
993 struct WGPUShaderModuleWGSLDescriptor
994 {
995     WGPUChainedStruct chain;
996     const(char)* code;
997 }
998 
999 struct WGPUStencilFaceState
1000 {
1001     WGPUCompareFunction compare;
1002     WGPUStencilOperation failOp;
1003     WGPUStencilOperation depthFailOp;
1004     WGPUStencilOperation passOp;
1005 }
1006 
1007 struct WGPUStorageTextureBindingLayout
1008 {
1009     const(WGPUChainedStruct)* nextInChain;
1010     WGPUStorageTextureAccess access;
1011     WGPUTextureFormat format;
1012     WGPUTextureViewDimension viewDimension;
1013 }
1014 
1015 struct WGPUSurfaceCapabilities
1016 {
1017     WGPUChainedStructOut * nextInChain;
1018     size_t formatCount;
1019     WGPUTextureFormat* formats;
1020     size_t presentModeCount;
1021     WGPUPresentMode* presentModes;
1022     size_t alphaModeCount;
1023     WGPUCompositeAlphaMode* alphaModes;
1024 }
1025 
1026 struct WGPUSurfaceConfiguration
1027 {
1028     const(WGPUChainedStruct)* nextInChain;
1029     WGPUDevice device;
1030     WGPUTextureFormat format;
1031     WGPUTextureUsageFlags usage;
1032     size_t viewFormatCount;
1033     const(WGPUTextureFormat)* viewFormats;
1034     WGPUCompositeAlphaMode alphaMode;
1035     uint width;
1036     uint height;
1037     WGPUPresentMode presentMode;
1038 }
1039 
1040 struct WGPUSurfaceDescriptor
1041 {
1042     const(WGPUChainedStruct)* nextInChain;
1043     const(char)* label; // nullable
1044 }
1045 
1046 // Can be chained in WGPUSurfaceDescriptor
1047 struct WGPUSurfaceDescriptorFromAndroidNativeWindow
1048 {
1049     WGPUChainedStruct chain;
1050     void* window;
1051 }
1052 
1053 // Can be chained in WGPUSurfaceDescriptor
1054 struct WGPUSurfaceDescriptorFromCanvasHTMLSelector
1055 {
1056     WGPUChainedStruct chain;
1057     const(char)* selector;
1058 }
1059 
1060 // Can be chained in WGPUSurfaceDescriptor
1061 struct WGPUSurfaceDescriptorFromMetalLayer
1062 {
1063     WGPUChainedStruct chain;
1064     void* layer;
1065 }
1066 
1067 // Can be chained in WGPUSurfaceDescriptor
1068 struct WGPUSurfaceDescriptorFromWaylandSurface
1069 {
1070     WGPUChainedStruct chain;
1071     void* display;
1072     void* surface;
1073 }
1074 
1075 // Can be chained in WGPUSurfaceDescriptor
1076 struct WGPUSurfaceDescriptorFromWindowsHWND
1077 {
1078     WGPUChainedStruct chain;
1079     void* hinstance;
1080     void* hwnd;
1081 }
1082 
1083 // Can be chained in WGPUSurfaceDescriptor
1084 struct WGPUSurfaceDescriptorFromXcbWindow
1085 {
1086     WGPUChainedStruct chain;
1087     void* connection;
1088     uint window;
1089 }
1090 
1091 // Can be chained in WGPUSurfaceDescriptor
1092 struct WGPUSurfaceDescriptorFromXlibWindow
1093 {
1094     WGPUChainedStruct chain;
1095     void* display;
1096     ulong window;
1097 }
1098 
1099 struct WGPUSurfaceTexture
1100 {
1101     WGPUTexture texture;
1102     WGPUBool suboptimal;
1103     WGPUSurfaceGetCurrentTextureStatus status;
1104 }
1105 
1106 struct WGPUTextureBindingLayout
1107 {
1108     const(WGPUChainedStruct)* nextInChain;
1109     WGPUTextureSampleType sampleType;
1110     WGPUTextureViewDimension viewDimension;
1111     WGPUBool multisampled;
1112 }
1113 
1114 struct WGPUTextureDataLayout
1115 {
1116     const(WGPUChainedStruct)* nextInChain;
1117     ulong offset;
1118     uint bytesPerRow;
1119     uint rowsPerImage;
1120 }
1121 
1122 struct WGPUTextureViewDescriptor
1123 {
1124     const(WGPUChainedStruct)* nextInChain;
1125     const(char)* label; // nullable
1126     WGPUTextureFormat format;
1127     WGPUTextureViewDimension dimension;
1128     uint baseMipLevel;
1129     uint mipLevelCount;
1130     uint baseArrayLayer;
1131     uint arrayLayerCount;
1132     WGPUTextureAspect aspect;
1133 }
1134 
1135 struct WGPUVertexAttribute
1136 {
1137     WGPUVertexFormat format;
1138     ulong offset;
1139     uint shaderLocation;
1140 }
1141 
1142 struct WGPUBindGroupDescriptor
1143 {
1144     const(WGPUChainedStruct)* nextInChain;
1145     const(char)* label; // nullable
1146     WGPUBindGroupLayout layout;
1147     size_t entryCount;
1148     const(WGPUBindGroupEntry)* entries;
1149 }
1150 
1151 struct WGPUBindGroupLayoutEntry
1152 {
1153     const(WGPUChainedStruct)* nextInChain;
1154     uint binding;
1155     WGPUShaderStageFlags visibility;
1156     WGPUBufferBindingLayout buffer;
1157     WGPUSamplerBindingLayout sampler;
1158     WGPUTextureBindingLayout texture;
1159     WGPUStorageTextureBindingLayout storageTexture;
1160 }
1161 
1162 struct WGPUBlendState
1163 {
1164     WGPUBlendComponent color;
1165     WGPUBlendComponent alpha;
1166 }
1167 
1168 struct WGPUCompilationInfo
1169 {
1170     const(WGPUChainedStruct)* nextInChain;
1171     size_t messageCount;
1172     const(WGPUCompilationMessage)* messages;
1173 }
1174 
1175 struct WGPUComputePassDescriptor
1176 {
1177     const(WGPUChainedStruct)* nextInChain;
1178     const(char)* label; // nullable
1179     const(WGPUComputePassTimestampWrites)* timestampWrites;
1180 }
1181 
1182 struct WGPUDepthStencilState
1183 {
1184     const(WGPUChainedStruct)* nextInChain;
1185     WGPUTextureFormat format;
1186     WGPUBool depthWriteEnabled;
1187     WGPUCompareFunction depthCompare;
1188     WGPUStencilFaceState stencilFront;
1189     WGPUStencilFaceState stencilBack;
1190     uint stencilReadMask;
1191     uint stencilWriteMask;
1192     int depthBias;
1193     float depthBiasSlopeScale;
1194     float depthBiasClamp;
1195 }
1196 
1197 struct WGPUImageCopyBuffer
1198 {
1199     const(WGPUChainedStruct)* nextInChain;
1200     WGPUTextureDataLayout layout;
1201     WGPUBuffer buffer;
1202 }
1203 
1204 struct WGPUImageCopyTexture
1205 {
1206     const(WGPUChainedStruct)* nextInChain;
1207     WGPUTexture texture;
1208     uint mipLevel;
1209     WGPUOrigin3D origin;
1210     WGPUTextureAspect aspect;
1211 }
1212 
1213 struct WGPUProgrammableStageDescriptor
1214 {
1215     const(WGPUChainedStruct)* nextInChain;
1216     WGPUShaderModule module_;
1217     const(char)* entryPoint; // nullable
1218     size_t constantCount;
1219     const(WGPUConstantEntry)* constants;
1220 }
1221 
1222 struct WGPURenderPassColorAttachment
1223 {
1224     const(WGPUChainedStruct)* nextInChain;
1225     WGPUTextureView view; // nullable
1226     WGPUTextureView resolveTarget; // nullable
1227     WGPULoadOp loadOp;
1228     WGPUStoreOp storeOp;
1229     WGPUColor clearValue;
1230 }
1231 
1232 struct WGPURequiredLimits
1233 {
1234     const(WGPUChainedStruct)* nextInChain;
1235     WGPULimits limits;
1236 }
1237 
1238 struct WGPUShaderModuleDescriptor
1239 {
1240     const(WGPUChainedStruct)* nextInChain;
1241     const(char)* label; // nullable
1242     size_t hintCount;
1243     const(WGPUShaderModuleCompilationHint)* hints;
1244 }
1245 
1246 struct WGPUSupportedLimits
1247 {
1248     WGPUChainedStructOut* nextInChain;
1249     WGPULimits limits;
1250 }
1251 
1252 struct WGPUTextureDescriptor
1253 {
1254     const(WGPUChainedStruct)* nextInChain;
1255     const(char)* label; // nullable
1256     WGPUTextureUsageFlags usage;
1257     WGPUTextureDimension dimension;
1258     WGPUExtent3D size;
1259     WGPUTextureFormat format;
1260     uint mipLevelCount;
1261     uint sampleCount;
1262     size_t viewFormatCount;
1263     const(WGPUTextureFormat)* viewFormats;
1264 }
1265 
1266 struct WGPUVertexBufferLayout
1267 {
1268     ulong arrayStride;
1269     WGPUVertexStepMode stepMode;
1270     size_t attributeCount;
1271     const(WGPUVertexAttribute)* attributes;
1272 }
1273 
1274 struct WGPUBindGroupLayoutDescriptor
1275 {
1276     const(WGPUChainedStruct)* nextInChain;
1277     const(char)* label; // nullable
1278     size_t entryCount;
1279     const(WGPUBindGroupLayoutEntry)* entries;
1280 }
1281 
1282 struct WGPUColorTargetState
1283 {
1284     const(WGPUChainedStruct)* nextInChain;
1285     WGPUTextureFormat format;
1286     const(WGPUBlendState)* blend; // nullable
1287     WGPUColorWriteMaskFlags writeMask;
1288 }
1289 
1290 struct WGPUComputePipelineDescriptor
1291 {
1292     const(WGPUChainedStruct)* nextInChain;
1293     const(char)* label; // nullable
1294     WGPUPipelineLayout layout; // nullable
1295     WGPUProgrammableStageDescriptor compute;
1296 }
1297 
1298 struct WGPUDeviceDescriptor
1299 {
1300     const(WGPUChainedStruct)* nextInChain;
1301     const(char)* label; // nullable
1302     size_t requiredFeatureCount;
1303     const(WGPUFeatureName)* requiredFeatures;
1304     const(WGPURequiredLimits)* requiredLimits; // nullable
1305     WGPUQueueDescriptor defaultQueue;
1306     WGPUDeviceLostCallback deviceLostCallback;
1307     void* deviceLostUserdata;
1308 }
1309 
1310 struct WGPURenderPassDescriptor
1311 {
1312     const(WGPUChainedStruct)* nextInChain;
1313     const(char)* label; // nullable
1314     size_t colorAttachmentCount;
1315     const(WGPURenderPassColorAttachment)* colorAttachments;
1316     const(WGPURenderPassDepthStencilAttachment)* depthStencilAttachment; // nullable
1317     WGPUQuerySet occlusionQuerySet; // nullable
1318     const(WGPURenderPassTimestampWrites)* timestampWrites; // nullable
1319 }
1320 
1321 struct WGPUVertexState
1322 {
1323     const(WGPUChainedStruct)* nextInChain;
1324     WGPUShaderModule module_;
1325     const(char)* entryPoint; // nullable
1326     size_t constantCount;
1327     const(WGPUConstantEntry)* constants;
1328     size_t bufferCount;
1329     const(WGPUVertexBufferLayout)* buffers;
1330 }
1331 
1332 struct WGPUFragmentState
1333 {
1334     const(WGPUChainedStruct)* nextInChain;
1335     WGPUShaderModule module_;
1336     const(char)* entryPoint; // nullable
1337     size_t constantCount;
1338     const(WGPUConstantEntry)* constants;
1339     size_t targetCount;
1340     const(WGPUColorTargetState)* targets;
1341 }
1342 
1343 struct WGPURenderPipelineDescriptor
1344 {
1345     const(WGPUChainedStruct)* nextInChain;
1346     const(char)* label; // nullable
1347     WGPUPipelineLayout layout; // nullable
1348     WGPUVertexState vertex;
1349     WGPUPrimitiveState primitive;
1350     const(WGPUDepthStencilState)* depthStencil; // nullable
1351     WGPUMultisampleState multisample;
1352     const(WGPUFragmentState)* fragment; // nullable
1353 }
1354 
1355 extern(C):
1356 
1357 alias WGPUBufferMapCallback = void function(WGPUBufferMapAsyncStatus status, void* userdata);
1358 alias WGPUCompilationInfoCallback = void function(WGPUCompilationInfoRequestStatus status, const(WGPUCompilationInfo)* compilationInfo, void* userdata);
1359 alias WGPUCreateComputePipelineAsyncCallback = void function(WGPUCreatePipelineAsyncStatus status, WGPUComputePipeline pipeline, const(char)* message, void* userdata);
1360 alias WGPUCreateRenderPipelineAsyncCallback = void function (WGPUCreatePipelineAsyncStatus status, WGPURenderPipeline pipeline, const(char)* message, void* userdata);
1361 alias WGPUDeviceLostCallback = void function(WGPUDeviceLostReason reason, const(char)* message, void* userdata);
1362 alias WGPUErrorCallback = void function(WGPUErrorType type, const(char)* message, void* userdata);
1363 alias WGPUProc = void function();
1364 alias WGPUQueueWorkDoneCallback = void function(WGPUQueueWorkDoneStatus status, void* userdata);
1365 alias WGPURequestAdapterCallback = void function(WGPURequestAdapterStatus status, WGPUAdapter adapter, const(char)* message, void* userdata);
1366 alias WGPURequestDeviceCallback = void function(WGPURequestDeviceStatus status, WGPUDevice device, const(char)* message, void* userdata);
1367 
1368 extern(C) @nogc nothrow:
1369 
1370 alias WGPUProcCreateInstance = WGPUInstance* function (const(WGPUInstanceDescriptor)* descriptor);
1371 alias WGPUProcGetProcAddress = void function (WGPUDevice device, const(char)* procName) function (WGPUDevice device, const(char)* procName);
1372 
1373 // Procs of Adapter
1374 alias WGPUProcAdapterEnumerateFeatures = size_t function (WGPUAdapter adapter, WGPUFeatureName* features);
1375 alias WGPUProcAdapterGetLimits = WGPUBool function (WGPUAdapter adapter, WGPUSupportedLimits* limits);
1376 alias WGPUProcAdapterGetProperties = void function (WGPUAdapter adapter, WGPUAdapterProperties* properties);
1377 alias WGPUProcAdapterHasFeature = WGPUBool function (WGPUAdapter adapter, WGPUFeatureName feature);
1378 alias WGPUProcAdapterRequestDevice = void function (WGPUAdapter adapter, const(WGPUDeviceDescriptor)* descriptor /* nullable */, WGPURequestDeviceCallback callback, void* userdata);
1379 alias WGPUProcAdapterReference = void function(WGPUAdapter adapter);
1380 alias WGPUProcAdapterRelease = void function(WGPUAdapter adapter);
1381 
1382 // Procs of BindGroup
1383 alias WGPUProcBindGroupSetLabel = void function (WGPUBindGroup bindGroup, const(char)* label);
1384 alias WGPUProcBindGroupReference = void function(WGPUBindGroup bindGroup);
1385 alias WGPUProcBindGroupRelease = void function(WGPUBindGroup bindGroup);
1386 
1387 // Procs of BindGroupLayout
1388 alias WGPUProcBindGroupLayoutSetLabel = void function (WGPUBindGroupLayout bindGroupLayout, const(char)* label);
1389 alias WGPUProcBindGroupLayoutReference = void function(WGPUBindGroupLayout bindGroupLayout);
1390 alias WGPUProcBindGroupLayoutRelease = void function(WGPUBindGroupLayout bindGroupLayout);
1391 
1392 // Procs of Buffer
1393 alias WGPUProcBufferDestroy = void function (WGPUBuffer buffer);
1394 alias WGPUProcBufferGetConstMappedRange = const(void)* function (WGPUBuffer buffer, size_t offset, size_t size);
1395 alias WGPUProcBufferGetMapState = WGPUBufferMapState function (WGPUBuffer buffer);
1396 alias WGPUProcBufferGetMappedRange = void* function (WGPUBuffer buffer, size_t offset, size_t size);
1397 alias WGPUProcBufferGetSize = size_t function (WGPUBuffer buffer);
1398 alias WGPUProcBufferGetUsage = WGPUBufferUsageFlags function (WGPUBuffer buffer);
1399 alias WGPUProcBufferMapAsync = void function (WGPUBuffer buffer, WGPUMapModeFlags mode, size_t offset, size_t size, WGPUBufferMapCallback callback, void* userdata);
1400 alias WGPUProcBufferSetLabel = void function (WGPUBuffer buffer, const(char)* label);
1401 alias WGPUProcBufferUnmap = void function (WGPUBuffer buffer);
1402 alias WGPUProcBufferReference = void function (WGPUBuffer buffer);
1403 alias WGPUProcBufferRelease = void function (WGPUBuffer buffer);
1404 
1405 // Procs of CommandBuffer
1406 alias WGPUProcCommandBufferSetLabel = void function (WGPUCommandBuffer commandBuffer, const(char)* label);
1407 alias WGPUProcCommandBufferReference = void function (WGPUCommandBuffer commandBuffer);
1408 alias WGPUProcCommandBufferRelease = void function (WGPUCommandBuffer commandBuffer);
1409 
1410 // Procs of CommandEncoder
1411 alias WGPUProcCommandEncoderBeginComputePass = WGPUComputePassEncoder* function (WGPUCommandEncoder commandEncoder, const(WGPUComputePassDescriptor)* descriptor /* nullable */);
1412 alias WGPUProcCommandEncoderBeginRenderPass = WGPURenderPassEncoder* function (WGPUCommandEncoder commandEncoder, const(WGPURenderPassDescriptor)* descriptor);
1413 alias WGPUProcCommandEncoderClearBuffer = void function (WGPUCommandEncoder commandEncoder, WGPUBuffer buffer, ulong offset, ulong size);
1414 alias WGPUProcCommandEncoderCopyBufferToBuffer = void function (WGPUCommandEncoder commandEncoder, WGPUBuffer source, ulong sourceOffset, WGPUBuffer destination, ulong destinationOffset, ulong size);
1415 alias WGPUProcCommandEncoderCopyBufferToTexture = void function (WGPUCommandEncoder commandEncoder, const(WGPUImageCopyBuffer)* source, const(WGPUImageCopyTexture)* destination, const(WGPUExtent3D)* copySize);
1416 alias WGPUProcCommandEncoderCopyTextureToBuffer = void function (WGPUCommandEncoder commandEncoder, const(WGPUImageCopyTexture)* source, const(WGPUImageCopyBuffer)* destination, const(WGPUExtent3D)* copySize);
1417 alias WGPUProcCommandEncoderCopyTextureToTexture = void function (WGPUCommandEncoder commandEncoder, const(WGPUImageCopyTexture)* source, const(WGPUImageCopyTexture)* destination, const(WGPUExtent3D)* copySize);
1418 alias WGPUProcCommandEncoderFinish = WGPUCommandBuffer* function (WGPUCommandEncoder commandEncoder, const(WGPUCommandBufferDescriptor)* descriptor /* nullable */);
1419 alias WGPUProcCommandEncoderInsertDebugMarker = void function (WGPUCommandEncoder commandEncoder, const(char)* markerLabel);
1420 alias WGPUProcCommandEncoderPopDebugGroup = void function (WGPUCommandEncoder commandEncoder);
1421 alias WGPUProcCommandEncoderPushDebugGroup = void function (WGPUCommandEncoder commandEncoder, const(char)* groupLabel);
1422 alias WGPUProcCommandEncoderResolveQuerySet = void function (WGPUCommandEncoder commandEncoder, WGPUQuerySet querySet, uint firstQuery, uint queryCount, WGPUBuffer destination, ulong destinationOffset);
1423 alias WGPUProcCommandEncoderSetLabel = void function (WGPUCommandEncoder commandEncoder, const(char)* label);
1424 alias WGPUProcCommandEncoderWriteTimestamp = void function (WGPUCommandEncoder commandEncoder, WGPUQuerySet querySet, uint queryIndex);
1425 alias WGPUProcCommandEncoderReference = void function (WGPUCommandEncoder commandEncoder);
1426 alias WGPUProcCommandEncoderRelease = void function (WGPUCommandEncoder commandEncoder);
1427 
1428 // Procs of ComputePassEncoder
1429 alias WGPUProcComputePassEncoderDispatchWorkgroups = void function (WGPUComputePassEncoder computePassEncoder, uint workgroupCountX, uint workgroupCountY, uint workgroupCountZ);
1430 alias WGPUProcComputePassEncoderDispatchWorkgroupsIndirect = void function (WGPUComputePassEncoder computePassEncoder, WGPUBuffer indirectBuffer, ulong indirectOffset);
1431 alias WGPUProcComputePassEncoderEnd = void function (WGPUComputePassEncoder computePassEncoder);
1432 alias WGPUProcComputePassEncoderInsertDebugMarker = void function (WGPUComputePassEncoder computePassEncoder, const(char)* markerLabel);
1433 alias WGPUProcComputePassEncoderPopDebugGroup = void function (WGPUComputePassEncoder computePassEncoder);
1434 alias WGPUProcComputePassEncoderPushDebugGroup = void function (WGPUComputePassEncoder computePassEncoder, const(char)* groupLabel);
1435 alias WGPUProcComputePassEncoderSetBindGroup = void function (WGPUComputePassEncoder computePassEncoder, uint groupIndex, WGPUBindGroup group, size_t dynamicOffsetCount, const(uint)* dynamicOffsets);
1436 alias WGPUProcComputePassEncoderSetLabel = void function (WGPUComputePassEncoder computePassEncoder, const(char)* label);
1437 alias WGPUProcComputePassEncoderSetPipeline = void function (WGPUComputePassEncoder computePassEncoder, WGPUComputePipeline pipeline);
1438 alias WGPUProcComputePassEncoderReference = void function (WGPUComputePassEncoder computePassEncoder);
1439 alias WGPUProcComputePassEncoderRelease = void function (WGPUComputePassEncoder computePassEncoder);
1440 
1441 // Procs of ComputePipeline
1442 alias WGPUProcComputePipelineGetBindGroupLayout = WGPUBindGroupLayout* function (WGPUComputePipeline computePipeline, uint groupIndex);
1443 alias WGPUProcComputePipelineSetLabel = void function (WGPUComputePipeline computePipeline, const(char)* label);
1444 alias WGPUProcComputePipelineReference = void function (WGPUComputePipeline computePipeline);
1445 alias WGPUProcComputePipelineRelease = void function (WGPUComputePipeline computePipeline);
1446 
1447 // Procs of Device
1448 alias WGPUProcDeviceCreateBindGroup = WGPUBindGroup* function (WGPUDevice device, const(WGPUBindGroupDescriptor)* descriptor);
1449 alias WGPUProcDeviceCreateBindGroupLayout = WGPUBindGroupLayout* function (WGPUDevice device, const(WGPUBindGroupLayoutDescriptor)* descriptor);
1450 alias WGPUProcDeviceCreateBuffer = WGPUBuffer* function (WGPUDevice device, const(WGPUBufferDescriptor)* descriptor);
1451 alias WGPUProcDeviceCreateCommandEncoder = WGPUCommandEncoder* function (WGPUDevice device, const(WGPUCommandEncoderDescriptor)* descriptor /* nullable */);
1452 alias WGPUProcDeviceCreateComputePipeline = WGPUComputePipeline* function (WGPUDevice device, const(WGPUComputePipelineDescriptor)* descriptor);
1453 alias WGPUProcDeviceCreateComputePipelineAsync = void function (WGPUDevice device, const(WGPUComputePipelineDescriptor)* descriptor, WGPUCreateComputePipelineAsyncCallback callback, void* userdata);
1454 alias WGPUProcDeviceCreatePipelineLayout = WGPUPipelineLayout* function (WGPUDevice device, const(WGPUPipelineLayoutDescriptor)* descriptor);
1455 alias WGPUProcDeviceCreateQuerySet = WGPUQuerySet* function (WGPUDevice device, const(WGPUQuerySetDescriptor)* descriptor);
1456 alias WGPUProcDeviceCreateRenderBundleEncoder = WGPURenderBundleEncoder* function (WGPUDevice device, const(WGPURenderBundleEncoderDescriptor)* descriptor);
1457 alias WGPUProcDeviceCreateRenderPipeline = WGPURenderPipeline* function (WGPUDevice device, const(WGPURenderPipelineDescriptor)* descriptor);
1458 alias WGPUProcDeviceCreateRenderPipelineAsync = void function (WGPUDevice device, const(WGPURenderPipelineDescriptor)* descriptor, WGPUCreateRenderPipelineAsyncCallback callback, void* userdata);
1459 alias WGPUProcDeviceCreateSampler = WGPUSampler* function (WGPUDevice device, const(WGPUSamplerDescriptor)* descriptor /* nullable */);
1460 alias WGPUProcDeviceCreateShaderModule = WGPUShaderModule* function (WGPUDevice device, const(WGPUShaderModuleDescriptor)* descriptor);
1461 alias WGPUProcDeviceCreateTexture = WGPUTexture* function (WGPUDevice device, const(WGPUTextureDescriptor)* descriptor);
1462 alias WGPUProcDeviceDestroy = void function (WGPUDevice device);
1463 alias WGPUProcDeviceEnumerateFeatures = size_t function (WGPUDevice device, WGPUFeatureName* features);
1464 alias WGPUProcDeviceGetLimits = WGPUBool function (WGPUDevice device, WGPUSupportedLimits* limits);
1465 alias WGPUProcDeviceGetQueue = WGPUQueue* function (WGPUDevice device);
1466 alias WGPUProcDeviceHasFeature = WGPUBool function (WGPUDevice device, WGPUFeatureName feature);
1467 alias WGPUProcDevicePopErrorScope = void function (WGPUDevice device, WGPUErrorCallback callback, void* userdata);
1468 alias WGPUProcDevicePushErrorScope = void function (WGPUDevice device, WGPUErrorFilter filter);
1469 alias WGPUProcDeviceSetLabel = void function (WGPUDevice device, const(char)* label);
1470 alias WGPUProcDeviceSetUncapturedErrorCallback = void function (WGPUDevice device, WGPUErrorCallback callback, void* userdata);
1471 alias WGPUProcDeviceReference = void function (WGPUDevice device);
1472 alias WGPUProcDeviceRelease = void function (WGPUDevice device);
1473 
1474 // Procs of Instance
1475 alias WGPUProcInstanceCreateSurface = WGPUSurface* function (WGPUInstance instance, const(WGPUSurfaceDescriptor)* descriptor);
1476 alias WGPUProcInstanceProcessEvents = void function (WGPUInstance instance);
1477 alias WGPUProcInstanceRequestAdapter = void function (WGPUInstance instance, const(WGPURequestAdapterOptions)* options /* nullable */, WGPURequestAdapterCallback callback, void* userdata);
1478 alias WGPUProcInstanceReference = void function (WGPUInstance instance);
1479 alias WGPUProcInstanceRelease = void function (WGPUInstance instance);
1480 
1481 // Procs of PipelineLayout
1482 alias WGPUProcPipelineLayoutSetLabel = void function (WGPUPipelineLayout pipelineLayout, const(char)* label);
1483 alias WGPUProcPipelineLayoutReference = void function (WGPUPipelineLayout pipelineLayout);
1484 alias WGPUProcPipelineLayoutRelease = void function (WGPUPipelineLayout pipelineLayout);
1485 
1486 // Procs of QuerySet
1487 alias WGPUProcQuerySetDestroy = void function (WGPUQuerySet querySet);
1488 alias WGPUProcQuerySetGetCount = uint function (WGPUQuerySet querySet);
1489 alias WGPUProcQuerySetGetType = WGPUQueryType function (WGPUQuerySet querySet);
1490 alias WGPUProcQuerySetSetLabel = void function (WGPUQuerySet querySet, const(char)* label);
1491 alias WGPUProcQuerySetReference = void function (WGPUQuerySet querySet);
1492 alias WGPUProcQuerySetRelease = void function (WGPUQuerySet querySet);
1493 
1494 // Procs of Queue
1495 alias WGPUProcQueueOnSubmittedWorkDone = void function (WGPUQueue queue, WGPUQueueWorkDoneCallback callback, void* userdata);
1496 alias WGPUProcQueueSetLabel = void function (WGPUQueue queue, const(char)* label);
1497 alias WGPUProcQueueSubmit = void function (WGPUQueue queue, size_t commandCount, const(WGPUCommandBuffer)* commands);
1498 alias WGPUProcQueueWriteBuffer = void function (WGPUQueue queue, WGPUBuffer buffer, ulong bufferOffset, const(void)* data, size_t size);
1499 alias WGPUProcQueueWriteTexture = void function (WGPUQueue queue, const(WGPUImageCopyTexture)* destination, const(void)* data, size_t dataSize, const(WGPUTextureDataLayout)* dataLayout, const(WGPUExtent3D)* writeSize);
1500 alias WGPUProcQueueReference = void function (WGPUQueue queue);
1501 alias WGPUProcQueueRelease = void function (WGPUQueue queue);
1502 
1503 // Procs of RenderBundle
1504 alias WGPUProcRenderBundleSetLabel = void function (WGPURenderBundle renderBundle, const(char)* label);
1505 alias WGPUProcRenderBundleReference = void function (WGPURenderBundle renderBundle);
1506 alias WGPUProcRenderBundleRelease = void function (WGPURenderBundle renderBundle);
1507 
1508 // Procs of RenderBundleEncoder
1509 alias WGPUProcRenderBundleEncoderDraw = void function (WGPURenderBundleEncoder renderBundleEncoder, uint vertexCount, uint instanceCount, uint firstVertex, uint firstInstance);
1510 alias WGPUProcRenderBundleEncoderDrawIndexed = void function (WGPURenderBundleEncoder renderBundleEncoder, uint indexCount, uint instanceCount, uint firstIndex, int baseVertex, uint firstInstance);
1511 alias WGPUProcRenderBundleEncoderDrawIndexedIndirect = void function (WGPURenderBundleEncoder renderBundleEncoder, WGPUBuffer indirectBuffer, ulong indirectOffset);
1512 alias WGPUProcRenderBundleEncoderDrawIndirect = void function (WGPURenderBundleEncoder renderBundleEncoder, WGPUBuffer indirectBuffer, ulong indirectOffset);
1513 alias WGPUProcRenderBundleEncoderFinish = WGPURenderBundle* function (WGPURenderBundleEncoder renderBundleEncoder, const(WGPURenderBundleDescriptor)* descriptor /* nullable */);
1514 alias WGPUProcRenderBundleEncoderInsertDebugMarker = void function (WGPURenderBundleEncoder renderBundleEncoder, const(char)* markerLabel);
1515 alias WGPUProcRenderBundleEncoderPopDebugGroup = void function (WGPURenderBundleEncoder renderBundleEncoder);
1516 alias WGPUProcRenderBundleEncoderPushDebugGroup = void function (WGPURenderBundleEncoder renderBundleEncoder, const(char)* groupLabel);
1517 alias WGPUProcRenderBundleEncoderSetBindGroup = void function (WGPURenderBundleEncoder renderBundleEncoder, uint groupIndex, WGPUBindGroup group, size_t dynamicOffsetCount, const(uint)* dynamicOffsets);
1518 alias WGPUProcRenderBundleEncoderSetIndexBuffer = void function (WGPURenderBundleEncoder renderBundleEncoder, WGPUBuffer buffer, WGPUIndexFormat format, ulong offset, ulong size);
1519 alias WGPUProcRenderBundleEncoderSetLabel = void function (WGPURenderBundleEncoder renderBundleEncoder, const(char)* label);
1520 alias WGPUProcRenderBundleEncoderSetPipeline = void function (WGPURenderBundleEncoder renderBundleEncoder, WGPURenderPipeline pipeline);
1521 alias WGPUProcRenderBundleEncoderSetVertexBuffer = void function (WGPURenderBundleEncoder renderBundleEncoder, uint slot, WGPUBuffer buffer, ulong offset, ulong size);
1522 alias WGPUProcRenderBundleEncoderReference = void function (WGPURenderBundleEncoder renderBundleEncoder);
1523 alias WGPUProcRenderBundleEncoderRelease = void function (WGPURenderBundleEncoder renderBundleEncoder);
1524 
1525 // Procs of RenderPassEncoder
1526 alias WGPUProcRenderPassEncoderBeginOcclusionQuery = void function (WGPURenderPassEncoder renderPassEncoder, uint queryIndex);
1527 alias WGPUProcRenderPassEncoderDraw = void function (WGPURenderPassEncoder renderPassEncoder, uint vertexCount, uint instanceCount, uint firstVertex, uint firstInstance);
1528 alias WGPUProcRenderPassEncoderDrawIndexed = void function (WGPURenderPassEncoder renderPassEncoder, uint indexCount, uint instanceCount, uint firstIndex, int baseVertex, uint firstInstance);
1529 alias WGPUProcRenderPassEncoderDrawIndexedIndirect = void function (WGPURenderPassEncoder renderPassEncoder, WGPUBuffer indirectBuffer, ulong indirectOffset);
1530 alias WGPUProcRenderPassEncoderDrawIndirect = void function (WGPURenderPassEncoder renderPassEncoder, WGPUBuffer indirectBuffer, ulong indirectOffset);
1531 alias WGPUProcRenderPassEncoderEnd = void function (WGPURenderPassEncoder renderPassEncoder);
1532 alias WGPUProcRenderPassEncoderEndOcclusionQuery = void function (WGPURenderPassEncoder renderPassEncoder);
1533 alias WGPUProcRenderPassEncoderExecuteBundles = void function (WGPURenderPassEncoder renderPassEncoder, size_t bundleCount, const(WGPURenderBundle)* bundles);
1534 alias WGPUProcRenderPassEncoderInsertDebugMarker = void function (WGPURenderPassEncoder renderPassEncoder, const(char)* markerLabel);
1535 alias WGPUProcRenderPassEncoderPopDebugGroup = void function (WGPURenderPassEncoder renderPassEncoder);
1536 alias WGPUProcRenderPassEncoderPushDebugGroup = void function (WGPURenderPassEncoder renderPassEncoder, const(char)* groupLabel);
1537 alias WGPUProcRenderPassEncoderSetBindGroup = void function (WGPURenderPassEncoder renderPassEncoder, uint groupIndex, WGPUBindGroup group, size_t dynamicOffsetCount, const(uint)* dynamicOffsets);
1538 alias WGPUProcRenderPassEncoderSetBlendConstant = void function (WGPURenderPassEncoder renderPassEncoder, const(WGPUColor)* color);
1539 alias WGPUProcRenderPassEncoderSetIndexBuffer = void function (WGPURenderPassEncoder renderPassEncoder, WGPUBuffer buffer, WGPUIndexFormat format, ulong offset, ulong size);
1540 alias WGPUProcRenderPassEncoderSetLabel = void function (WGPURenderPassEncoder renderPassEncoder, const(char)* label);
1541 alias WGPUProcRenderPassEncoderSetPipeline = void function (WGPURenderPassEncoder renderPassEncoder, WGPURenderPipeline pipeline);
1542 alias WGPUProcRenderPassEncoderSetScissorRect = void function (WGPURenderPassEncoder renderPassEncoder, uint x, uint y, uint width, uint height);
1543 alias WGPUProcRenderPassEncoderSetStencilReference = void function (WGPURenderPassEncoder renderPassEncoder, uint reference);
1544 alias WGPUProcRenderPassEncoderSetVertexBuffer = void function (WGPURenderPassEncoder renderPassEncoder, uint slot, WGPUBuffer buffer, ulong offset, ulong size);
1545 alias WGPUProcRenderPassEncoderSetViewport = void function (WGPURenderPassEncoder renderPassEncoder, float x, float y, float width, float height, float minDepth, float maxDepth);
1546 alias WGPUProcRenderPassEncoderReference = void function (WGPURenderPassEncoder renderPassEncoder);
1547 alias WGPUProcRenderPassEncoderRelease = void function (WGPURenderPassEncoder renderPassEncoder);
1548 
1549 // Procs of RenderPipeline
1550 alias WGPUProcRenderPipelineGetBindGroupLayout = WGPUBindGroupLayout* function (WGPURenderPipeline renderPipeline, uint groupIndex);
1551 alias WGPUProcRenderPipelineSetLabel = void function (WGPURenderPipeline renderPipeline, const(char)* label);
1552 alias WGPUProcRenderPipelineReference = void function (WGPURenderPipeline renderPipeline);
1553 alias WGPUProcRenderPipelineRelease = void function (WGPURenderPipeline renderPipeline);
1554 
1555 // Procs of Sampler
1556 alias WGPUProcSamplerSetLabel = void function (WGPUSampler sampler, const(char)* label);
1557 alias WGPUProcSamplerReference = void function (WGPUSampler sampler);
1558 alias WGPUProcSamplerRelease = void function (WGPUSampler sampler);
1559 
1560 // Procs of ShaderModule
1561 alias WGPUProcShaderModuleGetCompilationInfo = void function (WGPUShaderModule shaderModule, WGPUCompilationInfoCallback callback, void* userdata);
1562 alias WGPUProcShaderModuleSetLabel = void function (WGPUShaderModule shaderModule, const(char)* label);
1563 alias WGPUProcShaderModuleReference = void function (WGPUShaderModule shaderModule);
1564 alias WGPUProcShaderModuleRelease = void function (WGPUShaderModule shaderModule);
1565 
1566 // Procs of Surface
1567 alias WGPUProcSurfaceConfigure = void function (WGPUSurface surface, const(WGPUSurfaceConfiguration)* config);
1568 alias WGPUProcSurfaceGetCapabilities = void function (WGPUSurface surface, WGPUAdapter adapter, WGPUSurfaceCapabilities* capabilities);
1569 alias WGPUProcSurfaceGetCurrentTexture = void function (WGPUSurface surface, WGPUSurfaceTexture * surfaceTexture);
1570 alias WGPUProcSurfaceGetPreferredFormat = WGPUTextureFormat function (WGPUSurface surface, WGPUAdapter adapter);
1571 alias WGPUProcSurfacePresent = void function (WGPUSurface surface);
1572 alias WGPUProcSurfaceUnconfigure = void function (WGPUSurface surface);
1573 alias WGPUProcSurfaceReference = void function (WGPUSurface surface);
1574 alias WGPUProcSurfaceRelease = void function (WGPUSurface surface);
1575 
1576 // Procs of SurfaceCapabilities
1577 alias WGPUProcSurfaceCapabilitiesFreeMembers = void function (WGPUSurfaceCapabilities capabilities);
1578 
1579 // Procs of Texture
1580 alias WGPUProcTextureCreateView = WGPUTextureView* function (WGPUTexture texture, const(WGPUTextureViewDescriptor)* descriptor /* nullable */);
1581 alias WGPUProcTextureDestroy = void function (WGPUTexture texture);
1582 alias WGPUProcTextureGetDepthOrArrayLayers = uint function (WGPUTexture texture);
1583 alias WGPUProcTextureGetDimension = WGPUTextureDimension function (WGPUTexture texture);
1584 alias WGPUProcTextureGetFormat = WGPUTextureFormat function (WGPUTexture texture);
1585 alias WGPUProcTextureGetHeight = uint function (WGPUTexture texture);
1586 alias WGPUProcTextureGetMipLevelCount = uint function (WGPUTexture texture);
1587 alias WGPUProcTextureGetSampleCount = uint function (WGPUTexture texture);
1588 alias WGPUProcTextureGetUsage = WGPUTextureUsageFlags function (WGPUTexture texture);
1589 alias WGPUProcTextureGetWidth = uint function (WGPUTexture texture);
1590 alias WGPUProcTextureSetLabel = void function (WGPUTexture texture, const(char)* label);
1591 alias WGPUProcTextureReference = void function (WGPUTexture texture);
1592 alias WGPUProcTextureRelease = void function (WGPUTexture texture);
1593 
1594 // Procs of TextureView
1595 alias WGPUProcTextureViewSetLabel = void function (WGPUTextureView textureView, const(char)* label);
1596 alias WGPUProcTextureViewReference = void function (WGPUTextureView textureView);
1597 alias WGPUProcTextureViewRelease = void function (WGPUTextureView textureView);