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