react-native-wgpu 0.1.11 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/cpp/webgpu/webgpu.h +4182 -5
  2. package/cpp/webgpu/webgpu_cpp.h +9009 -5
  3. package/lib/commonjs/hooks.js +61 -1
  4. package/lib/commonjs/hooks.js.map +1 -1
  5. package/lib/commonjs/index.js +0 -8
  6. package/lib/commonjs/index.js.map +1 -1
  7. package/lib/module/hooks.js +57 -1
  8. package/lib/module/hooks.js.map +1 -1
  9. package/lib/module/index.js +0 -5
  10. package/lib/module/index.js.map +1 -1
  11. package/lib/typescript/lib/commonjs/hooks.d.ts +11 -0
  12. package/lib/typescript/lib/commonjs/hooks.d.ts.map +1 -1
  13. package/lib/typescript/lib/commonjs/index.d.ts +0 -1
  14. package/lib/typescript/lib/commonjs/index.d.ts.map +1 -1
  15. package/lib/typescript/lib/module/hooks.d.ts +11 -0
  16. package/lib/typescript/lib/module/hooks.d.ts.map +1 -1
  17. package/lib/typescript/lib/module/index.d.ts +0 -1
  18. package/lib/typescript/lib/module/index.d.ts.map +1 -1
  19. package/lib/typescript/src/hooks.d.ts +18 -0
  20. package/lib/typescript/src/hooks.d.ts.map +1 -1
  21. package/lib/typescript/src/index.d.ts +0 -1
  22. package/lib/typescript/src/index.d.ts.map +1 -1
  23. package/libs/apple/arm64_iphoneos/libwebgpu_dawn.a +0 -0
  24. package/libs/apple/arm64_iphonesimulator/libwebgpu_dawn.a +0 -0
  25. package/libs/apple/arm64_xros/libwebgpu_dawn.a +0 -0
  26. package/libs/apple/arm64_xrsimulator/libwebgpu_dawn.a +0 -0
  27. package/libs/apple/iphonesimulator/libwebgpu_dawn.a +0 -0
  28. package/libs/apple/libwebgpu_dawn.xcframework/Info.plist +8 -8
  29. package/libs/apple/libwebgpu_dawn.xcframework/ios-arm64/libwebgpu_dawn.a +0 -0
  30. package/libs/apple/libwebgpu_dawn.xcframework/ios-arm64_x86_64-simulator/libwebgpu_dawn.a +0 -0
  31. package/libs/apple/libwebgpu_dawn.xcframework/macos-arm64_x86_64/libwebgpu_dawn.a +0 -0
  32. package/libs/apple/libwebgpu_dawn.xcframework/xros-arm64/libwebgpu_dawn.a +0 -0
  33. package/libs/apple/libwebgpu_dawn.xcframework/xros-arm64-simulator/libwebgpu_dawn.a +0 -0
  34. package/libs/apple/universal_macosx/libwebgpu_dawn.a +0 -0
  35. package/libs/apple/x86_64_iphonesimulator/libwebgpu_dawn.a +0 -0
  36. package/package.json +2 -2
  37. package/react-native-wgpu.podspec +1 -1
  38. package/src/hooks.tsx +125 -0
  39. package/src/index.tsx +0 -8
  40. package/cpp/dawn/dawn_proc_table.h +0 -308
  41. package/cpp/dawn/webgpu.h +0 -4210
  42. package/cpp/dawn/webgpu_cpp.h +0 -9037
  43. package/cpp/dawn/webgpu_cpp_print.h +0 -2466
  44. package/cpp/dawn/wire/client/webgpu.h +0 -339
  45. package/cpp/dawn/wire/client/webgpu_cpp.h +0 -9177
  46. package/ios/IOSPlatformContext.h +0 -19
  47. package/ios/IOSPlatformContext.mm +0 -68
  48. package/ios/MetalView.h +0 -10
  49. package/ios/MetalView.mm +0 -40
  50. package/ios/SurfaceUtils.h +0 -15
  51. package/ios/SurfaceUtils.mm +0 -34
  52. package/ios/WebGPUModule.h +0 -19
  53. package/ios/WebGPUModule.mm +0 -93
  54. package/ios/WebGPUView.h +0 -18
  55. package/ios/WebGPUView.mm +0 -86
  56. package/ios/WebGPUViewComponentDescriptor.h +0 -61
  57. package/ios/WebGPUViewManager.mm +0 -23
  58. package/src/hooks.ts +0 -53
@@ -1,4 +1,7 @@
1
- // Copyright 2022 The Dawn & Tint Authors
1
+ // BSD 3-Clause License
2
+ //
3
+ // Copyright (c) 2019, "WebGPU native" developers
4
+ // All rights reserved.
2
5
  //
3
6
  // Redistribution and use in source and binary forms, with or without
4
7
  // modification, are permitted provided that the following conditions are met:
@@ -24,10 +27,4184 @@
24
27
  // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25
28
  // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
29
  // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
+ #ifdef __EMSCRIPTEN__
31
+ #error "Do not include this header. Emscripten already provides headers needed for WebGPU."
32
+ #endif
33
+ #ifndef WEBGPU_H_
34
+ #define WEBGPU_H_
35
+
36
+ #if defined(WGPU_SHARED_LIBRARY)
37
+ # if defined(_WIN32)
38
+ # if defined(WGPU_IMPLEMENTATION)
39
+ # define WGPU_EXPORT __declspec(dllexport)
40
+ # else
41
+ # define WGPU_EXPORT __declspec(dllimport)
42
+ # endif
43
+ # else // defined(_WIN32)
44
+ # if defined(WGPU_IMPLEMENTATION)
45
+ # define WGPU_EXPORT __attribute__((visibility("default")))
46
+ # else
47
+ # define WGPU_EXPORT
48
+ # endif
49
+ # endif // defined(_WIN32)
50
+ #else // defined(WGPU_SHARED_LIBRARY)
51
+ # define WGPU_EXPORT
52
+ #endif // defined(WGPU_SHARED_LIBRARY)
53
+
54
+ #if !defined(WGPU_OBJECT_ATTRIBUTE)
55
+ #define WGPU_OBJECT_ATTRIBUTE
56
+ #endif
57
+ #if !defined(WGPU_ENUM_ATTRIBUTE)
58
+ #define WGPU_ENUM_ATTRIBUTE
59
+ #endif
60
+ #if !defined(WGPU_STRUCTURE_ATTRIBUTE)
61
+ #define WGPU_STRUCTURE_ATTRIBUTE
62
+ #endif
63
+ #if !defined(WGPU_FUNCTION_ATTRIBUTE)
64
+ #define WGPU_FUNCTION_ATTRIBUTE
65
+ #endif
66
+ #if !defined(WGPU_NULLABLE)
67
+ #define WGPU_NULLABLE
68
+ #endif
69
+
70
+ #include <stdint.h>
71
+ #include <stddef.h>
72
+
73
+ #if defined(__cplusplus)
74
+ # if __cplusplus >= 201103L
75
+ # define WGPU_MAKE_INIT_STRUCT(type, value) (type value)
76
+ # else
77
+ # define WGPU_MAKE_INIT_STRUCT(type, value) value
78
+ # endif
79
+ #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
80
+ # define WGPU_MAKE_INIT_STRUCT(type, value) ((type) value)
81
+ #else
82
+ # define WGPU_MAKE_INIT_STRUCT(type, value) value
83
+ #endif
84
+
85
+ #define WGPU_ARRAY_LAYER_COUNT_UNDEFINED UINT32_MAX
86
+ #define WGPU_COPY_STRIDE_UNDEFINED UINT32_MAX
87
+ #define WGPU_DEPTH_SLICE_UNDEFINED UINT32_MAX
88
+ #define WGPU_LIMIT_U32_UNDEFINED UINT32_MAX
89
+ #define WGPU_LIMIT_U64_UNDEFINED UINT64_MAX
90
+ #define WGPU_MIP_LEVEL_COUNT_UNDEFINED UINT32_MAX
91
+ #define WGPU_QUERY_SET_INDEX_UNDEFINED UINT32_MAX
92
+ #define WGPU_WHOLE_MAP_SIZE SIZE_MAX
93
+ #define WGPU_WHOLE_SIZE UINT64_MAX
94
+
95
+ typedef uint64_t WGPUFlags;
96
+ typedef uint32_t WGPUBool;
97
+
98
+ typedef struct WGPUAdapterImpl* WGPUAdapter WGPU_OBJECT_ATTRIBUTE;
99
+ typedef struct WGPUBindGroupImpl* WGPUBindGroup WGPU_OBJECT_ATTRIBUTE;
100
+ typedef struct WGPUBindGroupLayoutImpl* WGPUBindGroupLayout WGPU_OBJECT_ATTRIBUTE;
101
+ typedef struct WGPUBufferImpl* WGPUBuffer WGPU_OBJECT_ATTRIBUTE;
102
+ typedef struct WGPUCommandBufferImpl* WGPUCommandBuffer WGPU_OBJECT_ATTRIBUTE;
103
+ typedef struct WGPUCommandEncoderImpl* WGPUCommandEncoder WGPU_OBJECT_ATTRIBUTE;
104
+ typedef struct WGPUComputePassEncoderImpl* WGPUComputePassEncoder WGPU_OBJECT_ATTRIBUTE;
105
+ typedef struct WGPUComputePipelineImpl* WGPUComputePipeline WGPU_OBJECT_ATTRIBUTE;
106
+ typedef struct WGPUDeviceImpl* WGPUDevice WGPU_OBJECT_ATTRIBUTE;
107
+ typedef struct WGPUExternalTextureImpl* WGPUExternalTexture WGPU_OBJECT_ATTRIBUTE;
108
+ typedef struct WGPUInstanceImpl* WGPUInstance WGPU_OBJECT_ATTRIBUTE;
109
+ typedef struct WGPUPipelineLayoutImpl* WGPUPipelineLayout WGPU_OBJECT_ATTRIBUTE;
110
+ typedef struct WGPUQuerySetImpl* WGPUQuerySet WGPU_OBJECT_ATTRIBUTE;
111
+ typedef struct WGPUQueueImpl* WGPUQueue WGPU_OBJECT_ATTRIBUTE;
112
+ typedef struct WGPURenderBundleImpl* WGPURenderBundle WGPU_OBJECT_ATTRIBUTE;
113
+ typedef struct WGPURenderBundleEncoderImpl* WGPURenderBundleEncoder WGPU_OBJECT_ATTRIBUTE;
114
+ typedef struct WGPURenderPassEncoderImpl* WGPURenderPassEncoder WGPU_OBJECT_ATTRIBUTE;
115
+ typedef struct WGPURenderPipelineImpl* WGPURenderPipeline WGPU_OBJECT_ATTRIBUTE;
116
+ typedef struct WGPUSamplerImpl* WGPUSampler WGPU_OBJECT_ATTRIBUTE;
117
+ typedef struct WGPUShaderModuleImpl* WGPUShaderModule WGPU_OBJECT_ATTRIBUTE;
118
+ typedef struct WGPUSharedBufferMemoryImpl* WGPUSharedBufferMemory WGPU_OBJECT_ATTRIBUTE;
119
+ typedef struct WGPUSharedFenceImpl* WGPUSharedFence WGPU_OBJECT_ATTRIBUTE;
120
+ typedef struct WGPUSharedTextureMemoryImpl* WGPUSharedTextureMemory WGPU_OBJECT_ATTRIBUTE;
121
+ typedef struct WGPUSurfaceImpl* WGPUSurface WGPU_OBJECT_ATTRIBUTE;
122
+ typedef struct WGPUSwapChainImpl* WGPUSwapChain WGPU_OBJECT_ATTRIBUTE;
123
+ typedef struct WGPUTextureImpl* WGPUTexture WGPU_OBJECT_ATTRIBUTE;
124
+ typedef struct WGPUTextureViewImpl* WGPUTextureView WGPU_OBJECT_ATTRIBUTE;
125
+
126
+ // Structure forward declarations
127
+ struct WGPUINTERNAL__HAVE_EMDAWNWEBGPU_HEADER;
128
+ struct WGPUAdapterInfo;
129
+ struct WGPUAdapterProperties;
130
+ struct WGPUAdapterPropertiesD3D;
131
+ struct WGPUAdapterPropertiesVk;
132
+ struct WGPUBindGroupEntry;
133
+ struct WGPUBlendComponent;
134
+ struct WGPUBufferBindingLayout;
135
+ struct WGPUBufferDescriptor;
136
+ struct WGPUBufferHostMappedPointer;
137
+ struct WGPUBufferMapCallbackInfo;
138
+ struct WGPUColor;
139
+ struct WGPUColorTargetStateExpandResolveTextureDawn;
140
+ struct WGPUCommandBufferDescriptor;
141
+ struct WGPUCommandEncoderDescriptor;
142
+ struct WGPUCompilationInfoCallbackInfo;
143
+ struct WGPUCompilationMessage;
144
+ struct WGPUComputePassTimestampWrites;
145
+ struct WGPUConstantEntry;
146
+ struct WGPUCopyTextureForBrowserOptions;
147
+ struct WGPUCreateComputePipelineAsyncCallbackInfo;
148
+ struct WGPUCreateRenderPipelineAsyncCallbackInfo;
149
+ struct WGPUDawnWGSLBlocklist;
150
+ struct WGPUDawnAdapterPropertiesPowerPreference;
151
+ struct WGPUDawnBufferDescriptorErrorInfoFromWireClient;
152
+ struct WGPUDawnCacheDeviceDescriptor;
153
+ struct WGPUDawnComputePipelineFullSubgroups;
154
+ struct WGPUDawnEncoderInternalUsageDescriptor;
155
+ struct WGPUDawnExperimentalSubgroupLimits;
156
+ struct WGPUDawnRenderPassColorAttachmentRenderToSingleSampled;
157
+ struct WGPUDawnShaderModuleSPIRVOptionsDescriptor;
158
+ struct WGPUDawnTextureInternalUsageDescriptor;
159
+ struct WGPUDawnTogglesDescriptor;
160
+ struct WGPUDawnWireWGSLControl;
161
+ struct WGPUDepthStencilStateDepthWriteDefinedDawn;
162
+ struct WGPUDeviceLostCallbackInfo;
163
+ struct WGPUDrmFormatProperties;
164
+ struct WGPUExtent2D;
165
+ struct WGPUExtent3D;
166
+ struct WGPUExternalTextureBindingEntry;
167
+ struct WGPUExternalTextureBindingLayout;
168
+ struct WGPUFormatCapabilities;
169
+ struct WGPUFuture;
170
+ struct WGPUInstanceFeatures;
171
+ struct WGPULimits;
172
+ struct WGPUMemoryHeapInfo;
173
+ struct WGPUMultisampleState;
174
+ struct WGPUOrigin2D;
175
+ struct WGPUOrigin3D;
176
+ struct WGPUPipelineLayoutDescriptor;
177
+ struct WGPUPipelineLayoutStorageAttachment;
178
+ struct WGPUPopErrorScopeCallbackInfo;
179
+ struct WGPUPrimitiveDepthClipControl;
180
+ struct WGPUPrimitiveState;
181
+ struct WGPUQuerySetDescriptor;
182
+ struct WGPUQueueDescriptor;
183
+ struct WGPUQueueWorkDoneCallbackInfo;
184
+ struct WGPURenderBundleDescriptor;
185
+ struct WGPURenderBundleEncoderDescriptor;
186
+ struct WGPURenderPassDepthStencilAttachment;
187
+ struct WGPURenderPassDescriptorMaxDrawCount;
188
+ struct WGPURenderPassTimestampWrites;
189
+ struct WGPURequestAdapterCallbackInfo;
190
+ struct WGPURequestAdapterOptions;
191
+ struct WGPURequestDeviceCallbackInfo;
192
+ struct WGPUSamplerBindingLayout;
193
+ struct WGPUSamplerDescriptor;
194
+ struct WGPUShaderModuleSPIRVDescriptor;
195
+ struct WGPUShaderModuleWGSLDescriptor;
196
+ struct WGPUShaderModuleCompilationOptions;
197
+ struct WGPUShaderModuleDescriptor;
198
+ struct WGPUSharedBufferMemoryBeginAccessDescriptor;
199
+ struct WGPUSharedBufferMemoryDescriptor;
200
+ struct WGPUSharedBufferMemoryEndAccessState;
201
+ struct WGPUSharedBufferMemoryProperties;
202
+ struct WGPUSharedFenceDXGISharedHandleDescriptor;
203
+ struct WGPUSharedFenceDXGISharedHandleExportInfo;
204
+ struct WGPUSharedFenceMTLSharedEventDescriptor;
205
+ struct WGPUSharedFenceMTLSharedEventExportInfo;
206
+ struct WGPUSharedFenceDescriptor;
207
+ struct WGPUSharedFenceExportInfo;
208
+ struct WGPUSharedFenceVkSemaphoreOpaqueFDDescriptor;
209
+ struct WGPUSharedFenceVkSemaphoreOpaqueFDExportInfo;
210
+ struct WGPUSharedFenceVkSemaphoreSyncFDDescriptor;
211
+ struct WGPUSharedFenceVkSemaphoreSyncFDExportInfo;
212
+ struct WGPUSharedFenceVkSemaphoreZirconHandleDescriptor;
213
+ struct WGPUSharedFenceVkSemaphoreZirconHandleExportInfo;
214
+ struct WGPUSharedTextureMemoryD3DSwapchainBeginState;
215
+ struct WGPUSharedTextureMemoryDXGISharedHandleDescriptor;
216
+ struct WGPUSharedTextureMemoryEGLImageDescriptor;
217
+ struct WGPUSharedTextureMemoryIOSurfaceDescriptor;
218
+ struct WGPUSharedTextureMemoryAHardwareBufferDescriptor;
219
+ struct WGPUSharedTextureMemoryBeginAccessDescriptor;
220
+ struct WGPUSharedTextureMemoryDescriptor;
221
+ struct WGPUSharedTextureMemoryDmaBufPlane;
222
+ struct WGPUSharedTextureMemoryEndAccessState;
223
+ struct WGPUSharedTextureMemoryOpaqueFDDescriptor;
224
+ struct WGPUSharedTextureMemoryVkDedicatedAllocationDescriptor;
225
+ struct WGPUSharedTextureMemoryVkImageLayoutBeginState;
226
+ struct WGPUSharedTextureMemoryVkImageLayoutEndState;
227
+ struct WGPUSharedTextureMemoryZirconHandleDescriptor;
228
+ struct WGPUStaticSamplerBindingLayout;
229
+ struct WGPUStencilFaceState;
230
+ struct WGPUStorageTextureBindingLayout;
231
+ struct WGPUSurfaceCapabilities;
232
+ struct WGPUSurfaceConfiguration;
233
+ struct WGPUSurfaceDescriptor;
234
+ struct WGPUSurfaceDescriptorFromAndroidNativeWindow;
235
+ struct WGPUSurfaceDescriptorFromCanvasHTMLSelector;
236
+ struct WGPUSurfaceDescriptorFromMetalLayer;
237
+ struct WGPUSurfaceDescriptorFromWaylandSurface;
238
+ struct WGPUSurfaceDescriptorFromWindowsHWND;
239
+ struct WGPUSurfaceDescriptorFromWindowsCoreWindow;
240
+ struct WGPUSurfaceDescriptorFromWindowsSwapChainPanel;
241
+ struct WGPUSurfaceDescriptorFromXcbWindow;
242
+ struct WGPUSurfaceDescriptorFromXlibWindow;
243
+ struct WGPUSurfaceTexture;
244
+ struct WGPUSwapChainDescriptor;
245
+ struct WGPUTextureBindingLayout;
246
+ struct WGPUTextureBindingViewDimensionDescriptor;
247
+ struct WGPUTextureDataLayout;
248
+ struct WGPUTextureViewDescriptor;
249
+ struct WGPUUncapturedErrorCallbackInfo;
250
+ struct WGPUVertexAttribute;
251
+ struct WGPUYCbCrVkDescriptor;
252
+ struct WGPUAHardwareBufferProperties;
253
+ struct WGPUAdapterPropertiesMemoryHeaps;
254
+ struct WGPUBindGroupDescriptor;
255
+ struct WGPUBindGroupLayoutEntry;
256
+ struct WGPUBlendState;
257
+ struct WGPUCompilationInfo;
258
+ struct WGPUComputePassDescriptor;
259
+ struct WGPUDepthStencilState;
260
+ struct WGPUDrmFormatCapabilities;
261
+ struct WGPUExternalTextureDescriptor;
262
+ struct WGPUFutureWaitInfo;
263
+ struct WGPUImageCopyBuffer;
264
+ struct WGPUImageCopyExternalTexture;
265
+ struct WGPUImageCopyTexture;
266
+ struct WGPUInstanceDescriptor;
267
+ struct WGPUPipelineLayoutPixelLocalStorage;
268
+ struct WGPUProgrammableStageDescriptor;
269
+ struct WGPURenderPassColorAttachment;
270
+ struct WGPURenderPassStorageAttachment;
271
+ struct WGPURequiredLimits;
272
+ struct WGPUSharedTextureMemoryAHardwareBufferProperties;
273
+ struct WGPUSharedTextureMemoryDmaBufDescriptor;
274
+ struct WGPUSharedTextureMemoryProperties;
275
+ struct WGPUSupportedLimits;
276
+ struct WGPUTextureDescriptor;
277
+ struct WGPUVertexBufferLayout;
278
+ struct WGPUBindGroupLayoutDescriptor;
279
+ struct WGPUColorTargetState;
280
+ struct WGPUComputePipelineDescriptor;
281
+ struct WGPUDeviceDescriptor;
282
+ struct WGPURenderPassDescriptor;
283
+ struct WGPURenderPassPixelLocalStorage;
284
+ struct WGPUVertexState;
285
+ struct WGPUFragmentState;
286
+ struct WGPURenderPipelineDescriptor;
287
+
288
+ typedef enum WGPUWGSLFeatureName {
289
+ WGPUWGSLFeatureName_ReadonlyAndReadwriteStorageTextures = 0x00000001,
290
+ WGPUWGSLFeatureName_Packed4x8IntegerDotProduct = 0x00000002,
291
+ WGPUWGSLFeatureName_UnrestrictedPointerParameters = 0x00000003,
292
+ WGPUWGSLFeatureName_PointerCompositeAccess = 0x00000004,
293
+ WGPUWGSLFeatureName_ChromiumTestingUnimplemented = 0x00050000,
294
+ WGPUWGSLFeatureName_ChromiumTestingUnsafeExperimental = 0x00050001,
295
+ WGPUWGSLFeatureName_ChromiumTestingExperimental = 0x00050002,
296
+ WGPUWGSLFeatureName_ChromiumTestingShippedWithKillswitch = 0x00050003,
297
+ WGPUWGSLFeatureName_ChromiumTestingShipped = 0x00050004,
298
+ WGPUWGSLFeatureName_Force32 = 0x7FFFFFFF
299
+ } WGPUWGSLFeatureName WGPU_ENUM_ATTRIBUTE;
300
+ typedef enum WGPUAdapterType {
301
+ WGPUAdapterType_DiscreteGPU = 0x00000001,
302
+ WGPUAdapterType_IntegratedGPU = 0x00000002,
303
+ WGPUAdapterType_CPU = 0x00000003,
304
+ WGPUAdapterType_Unknown = 0x00000004,
305
+ WGPUAdapterType_Force32 = 0x7FFFFFFF
306
+ } WGPUAdapterType WGPU_ENUM_ATTRIBUTE;
307
+ typedef enum WGPUAddressMode {
308
+ WGPUAddressMode_Undefined = 0x00000000,
309
+ WGPUAddressMode_ClampToEdge = 0x00000001,
310
+ WGPUAddressMode_Repeat = 0x00000002,
311
+ WGPUAddressMode_MirrorRepeat = 0x00000003,
312
+ WGPUAddressMode_Force32 = 0x7FFFFFFF
313
+ } WGPUAddressMode WGPU_ENUM_ATTRIBUTE;
314
+ typedef enum WGPUAlphaMode {
315
+ WGPUAlphaMode_Opaque = 0x00000001,
316
+ WGPUAlphaMode_Premultiplied = 0x00000002,
317
+ WGPUAlphaMode_Unpremultiplied = 0x00000003,
318
+ WGPUAlphaMode_Force32 = 0x7FFFFFFF
319
+ } WGPUAlphaMode WGPU_ENUM_ATTRIBUTE;
320
+ typedef enum WGPUBackendType {
321
+ WGPUBackendType_Undefined = 0x00000000,
322
+ WGPUBackendType_Null = 0x00000001,
323
+ WGPUBackendType_WebGPU = 0x00000002,
324
+ WGPUBackendType_D3D11 = 0x00000003,
325
+ WGPUBackendType_D3D12 = 0x00000004,
326
+ WGPUBackendType_Metal = 0x00000005,
327
+ WGPUBackendType_Vulkan = 0x00000006,
328
+ WGPUBackendType_OpenGL = 0x00000007,
329
+ WGPUBackendType_OpenGLES = 0x00000008,
330
+ WGPUBackendType_Force32 = 0x7FFFFFFF
331
+ } WGPUBackendType WGPU_ENUM_ATTRIBUTE;
332
+ typedef enum WGPUBlendFactor {
333
+ WGPUBlendFactor_Undefined = 0x00000000,
334
+ WGPUBlendFactor_Zero = 0x00000001,
335
+ WGPUBlendFactor_One = 0x00000002,
336
+ WGPUBlendFactor_Src = 0x00000003,
337
+ WGPUBlendFactor_OneMinusSrc = 0x00000004,
338
+ WGPUBlendFactor_SrcAlpha = 0x00000005,
339
+ WGPUBlendFactor_OneMinusSrcAlpha = 0x00000006,
340
+ WGPUBlendFactor_Dst = 0x00000007,
341
+ WGPUBlendFactor_OneMinusDst = 0x00000008,
342
+ WGPUBlendFactor_DstAlpha = 0x00000009,
343
+ WGPUBlendFactor_OneMinusDstAlpha = 0x0000000A,
344
+ WGPUBlendFactor_SrcAlphaSaturated = 0x0000000B,
345
+ WGPUBlendFactor_Constant = 0x0000000C,
346
+ WGPUBlendFactor_OneMinusConstant = 0x0000000D,
347
+ WGPUBlendFactor_Src1 = 0x0000000E,
348
+ WGPUBlendFactor_OneMinusSrc1 = 0x0000000F,
349
+ WGPUBlendFactor_Src1Alpha = 0x00000010,
350
+ WGPUBlendFactor_OneMinusSrc1Alpha = 0x00000011,
351
+ WGPUBlendFactor_Force32 = 0x7FFFFFFF
352
+ } WGPUBlendFactor WGPU_ENUM_ATTRIBUTE;
353
+ typedef enum WGPUBlendOperation {
354
+ WGPUBlendOperation_Undefined = 0x00000000,
355
+ WGPUBlendOperation_Add = 0x00000001,
356
+ WGPUBlendOperation_Subtract = 0x00000002,
357
+ WGPUBlendOperation_ReverseSubtract = 0x00000003,
358
+ WGPUBlendOperation_Min = 0x00000004,
359
+ WGPUBlendOperation_Max = 0x00000005,
360
+ WGPUBlendOperation_Force32 = 0x7FFFFFFF
361
+ } WGPUBlendOperation WGPU_ENUM_ATTRIBUTE;
362
+ typedef enum WGPUBufferBindingType {
363
+ WGPUBufferBindingType_Undefined = 0x00000000,
364
+ WGPUBufferBindingType_Uniform = 0x00000001,
365
+ WGPUBufferBindingType_Storage = 0x00000002,
366
+ WGPUBufferBindingType_ReadOnlyStorage = 0x00000003,
367
+ WGPUBufferBindingType_Force32 = 0x7FFFFFFF
368
+ } WGPUBufferBindingType WGPU_ENUM_ATTRIBUTE;
369
+ typedef enum WGPUBufferMapAsyncStatus {
370
+ WGPUBufferMapAsyncStatus_Success = 0x00000001,
371
+ WGPUBufferMapAsyncStatus_InstanceDropped = 0x00000002,
372
+ WGPUBufferMapAsyncStatus_ValidationError = 0x00000003,
373
+ WGPUBufferMapAsyncStatus_Unknown = 0x00000004,
374
+ WGPUBufferMapAsyncStatus_DeviceLost = 0x00000005,
375
+ WGPUBufferMapAsyncStatus_DestroyedBeforeCallback = 0x00000006,
376
+ WGPUBufferMapAsyncStatus_UnmappedBeforeCallback = 0x00000007,
377
+ WGPUBufferMapAsyncStatus_MappingAlreadyPending = 0x00000008,
378
+ WGPUBufferMapAsyncStatus_OffsetOutOfRange = 0x00000009,
379
+ WGPUBufferMapAsyncStatus_SizeOutOfRange = 0x0000000A,
380
+ WGPUBufferMapAsyncStatus_Force32 = 0x7FFFFFFF
381
+ } WGPUBufferMapAsyncStatus WGPU_ENUM_ATTRIBUTE;
382
+ typedef enum WGPUBufferMapState {
383
+ WGPUBufferMapState_Unmapped = 0x00000001,
384
+ WGPUBufferMapState_Pending = 0x00000002,
385
+ WGPUBufferMapState_Mapped = 0x00000003,
386
+ WGPUBufferMapState_Force32 = 0x7FFFFFFF
387
+ } WGPUBufferMapState WGPU_ENUM_ATTRIBUTE;
388
+ typedef enum WGPUCallbackMode {
389
+ WGPUCallbackMode_WaitAnyOnly = 0x00000001,
390
+ WGPUCallbackMode_AllowProcessEvents = 0x00000002,
391
+ WGPUCallbackMode_AllowSpontaneous = 0x00000003,
392
+ WGPUCallbackMode_Force32 = 0x7FFFFFFF
393
+ } WGPUCallbackMode WGPU_ENUM_ATTRIBUTE;
394
+ typedef enum WGPUCompareFunction {
395
+ WGPUCompareFunction_Undefined = 0x00000000,
396
+ WGPUCompareFunction_Never = 0x00000001,
397
+ WGPUCompareFunction_Less = 0x00000002,
398
+ WGPUCompareFunction_Equal = 0x00000003,
399
+ WGPUCompareFunction_LessEqual = 0x00000004,
400
+ WGPUCompareFunction_Greater = 0x00000005,
401
+ WGPUCompareFunction_NotEqual = 0x00000006,
402
+ WGPUCompareFunction_GreaterEqual = 0x00000007,
403
+ WGPUCompareFunction_Always = 0x00000008,
404
+ WGPUCompareFunction_Force32 = 0x7FFFFFFF
405
+ } WGPUCompareFunction WGPU_ENUM_ATTRIBUTE;
406
+ typedef enum WGPUCompilationInfoRequestStatus {
407
+ WGPUCompilationInfoRequestStatus_Success = 0x00000001,
408
+ WGPUCompilationInfoRequestStatus_InstanceDropped = 0x00000002,
409
+ WGPUCompilationInfoRequestStatus_Error = 0x00000003,
410
+ WGPUCompilationInfoRequestStatus_DeviceLost = 0x00000004,
411
+ WGPUCompilationInfoRequestStatus_Unknown = 0x00000005,
412
+ WGPUCompilationInfoRequestStatus_Force32 = 0x7FFFFFFF
413
+ } WGPUCompilationInfoRequestStatus WGPU_ENUM_ATTRIBUTE;
414
+ typedef enum WGPUCompilationMessageType {
415
+ WGPUCompilationMessageType_Error = 0x00000001,
416
+ WGPUCompilationMessageType_Warning = 0x00000002,
417
+ WGPUCompilationMessageType_Info = 0x00000003,
418
+ WGPUCompilationMessageType_Force32 = 0x7FFFFFFF
419
+ } WGPUCompilationMessageType WGPU_ENUM_ATTRIBUTE;
420
+ typedef enum WGPUCompositeAlphaMode {
421
+ WGPUCompositeAlphaMode_Auto = 0x00000001,
422
+ WGPUCompositeAlphaMode_Opaque = 0x00000002,
423
+ WGPUCompositeAlphaMode_Premultiplied = 0x00000003,
424
+ WGPUCompositeAlphaMode_Unpremultiplied = 0x00000004,
425
+ WGPUCompositeAlphaMode_Inherit = 0x00000005,
426
+ WGPUCompositeAlphaMode_Force32 = 0x7FFFFFFF
427
+ } WGPUCompositeAlphaMode WGPU_ENUM_ATTRIBUTE;
428
+ typedef enum WGPUCreatePipelineAsyncStatus {
429
+ WGPUCreatePipelineAsyncStatus_Success = 0x00000001,
430
+ WGPUCreatePipelineAsyncStatus_InstanceDropped = 0x00000002,
431
+ WGPUCreatePipelineAsyncStatus_ValidationError = 0x00000003,
432
+ WGPUCreatePipelineAsyncStatus_InternalError = 0x00000004,
433
+ WGPUCreatePipelineAsyncStatus_DeviceLost = 0x00000005,
434
+ WGPUCreatePipelineAsyncStatus_DeviceDestroyed = 0x00000006,
435
+ WGPUCreatePipelineAsyncStatus_Unknown = 0x00000007,
436
+ WGPUCreatePipelineAsyncStatus_Force32 = 0x7FFFFFFF
437
+ } WGPUCreatePipelineAsyncStatus WGPU_ENUM_ATTRIBUTE;
438
+ typedef enum WGPUCullMode {
439
+ WGPUCullMode_Undefined = 0x00000000,
440
+ WGPUCullMode_None = 0x00000001,
441
+ WGPUCullMode_Front = 0x00000002,
442
+ WGPUCullMode_Back = 0x00000003,
443
+ WGPUCullMode_Force32 = 0x7FFFFFFF
444
+ } WGPUCullMode WGPU_ENUM_ATTRIBUTE;
445
+ typedef enum WGPUDeviceLostReason {
446
+ WGPUDeviceLostReason_Unknown = 0x00000001,
447
+ WGPUDeviceLostReason_Destroyed = 0x00000002,
448
+ WGPUDeviceLostReason_InstanceDropped = 0x00000003,
449
+ WGPUDeviceLostReason_FailedCreation = 0x00000004,
450
+ WGPUDeviceLostReason_Force32 = 0x7FFFFFFF
451
+ } WGPUDeviceLostReason WGPU_ENUM_ATTRIBUTE;
452
+ typedef enum WGPUErrorFilter {
453
+ WGPUErrorFilter_Validation = 0x00000001,
454
+ WGPUErrorFilter_OutOfMemory = 0x00000002,
455
+ WGPUErrorFilter_Internal = 0x00000003,
456
+ WGPUErrorFilter_Force32 = 0x7FFFFFFF
457
+ } WGPUErrorFilter WGPU_ENUM_ATTRIBUTE;
458
+ typedef enum WGPUErrorType {
459
+ WGPUErrorType_NoError = 0x00000001,
460
+ WGPUErrorType_Validation = 0x00000002,
461
+ WGPUErrorType_OutOfMemory = 0x00000003,
462
+ WGPUErrorType_Internal = 0x00000004,
463
+ WGPUErrorType_Unknown = 0x00000005,
464
+ WGPUErrorType_DeviceLost = 0x00000006,
465
+ WGPUErrorType_Force32 = 0x7FFFFFFF
466
+ } WGPUErrorType WGPU_ENUM_ATTRIBUTE;
467
+ typedef enum WGPUExternalTextureRotation {
468
+ WGPUExternalTextureRotation_Rotate0Degrees = 0x00000001,
469
+ WGPUExternalTextureRotation_Rotate90Degrees = 0x00000002,
470
+ WGPUExternalTextureRotation_Rotate180Degrees = 0x00000003,
471
+ WGPUExternalTextureRotation_Rotate270Degrees = 0x00000004,
472
+ WGPUExternalTextureRotation_Force32 = 0x7FFFFFFF
473
+ } WGPUExternalTextureRotation WGPU_ENUM_ATTRIBUTE;
474
+ typedef enum WGPUFeatureName {
475
+ WGPUFeatureName_DepthClipControl = 0x00000001,
476
+ WGPUFeatureName_Depth32FloatStencil8 = 0x00000002,
477
+ WGPUFeatureName_TimestampQuery = 0x00000003,
478
+ WGPUFeatureName_TextureCompressionBC = 0x00000004,
479
+ WGPUFeatureName_TextureCompressionETC2 = 0x00000005,
480
+ WGPUFeatureName_TextureCompressionASTC = 0x00000006,
481
+ WGPUFeatureName_IndirectFirstInstance = 0x00000007,
482
+ WGPUFeatureName_ShaderF16 = 0x00000008,
483
+ WGPUFeatureName_RG11B10UfloatRenderable = 0x00000009,
484
+ WGPUFeatureName_BGRA8UnormStorage = 0x0000000A,
485
+ WGPUFeatureName_Float32Filterable = 0x0000000B,
486
+ WGPUFeatureName_Subgroups = 0x0000000C,
487
+ WGPUFeatureName_SubgroupsF16 = 0x0000000D,
488
+ WGPUFeatureName_DawnInternalUsages = 0x00050000,
489
+ WGPUFeatureName_DawnMultiPlanarFormats = 0x00050001,
490
+ WGPUFeatureName_DawnNative = 0x00050002,
491
+ WGPUFeatureName_ChromiumExperimentalTimestampQueryInsidePasses = 0x00050003,
492
+ WGPUFeatureName_ImplicitDeviceSynchronization = 0x00050004,
493
+ WGPUFeatureName_SurfaceCapabilities = 0x00050005,
494
+ WGPUFeatureName_TransientAttachments = 0x00050006,
495
+ WGPUFeatureName_MSAARenderToSingleSampled = 0x00050007,
496
+ WGPUFeatureName_DualSourceBlending = 0x00050008,
497
+ WGPUFeatureName_D3D11MultithreadProtected = 0x00050009,
498
+ WGPUFeatureName_ANGLETextureSharing = 0x0005000A,
499
+ WGPUFeatureName_ChromiumExperimentalSubgroups = 0x0005000B,
500
+ WGPUFeatureName_ChromiumExperimentalSubgroupUniformControlFlow = 0x0005000C,
501
+ WGPUFeatureName_PixelLocalStorageCoherent = 0x0005000D,
502
+ WGPUFeatureName_PixelLocalStorageNonCoherent = 0x0005000E,
503
+ WGPUFeatureName_Unorm16TextureFormats = 0x0005000F,
504
+ WGPUFeatureName_Snorm16TextureFormats = 0x00050010,
505
+ WGPUFeatureName_MultiPlanarFormatExtendedUsages = 0x00050011,
506
+ WGPUFeatureName_MultiPlanarFormatP010 = 0x00050012,
507
+ WGPUFeatureName_HostMappedPointer = 0x00050013,
508
+ WGPUFeatureName_MultiPlanarRenderTargets = 0x00050014,
509
+ WGPUFeatureName_MultiPlanarFormatNv12a = 0x00050015,
510
+ WGPUFeatureName_FramebufferFetch = 0x00050016,
511
+ WGPUFeatureName_BufferMapExtendedUsages = 0x00050017,
512
+ WGPUFeatureName_AdapterPropertiesMemoryHeaps = 0x00050018,
513
+ WGPUFeatureName_AdapterPropertiesD3D = 0x00050019,
514
+ WGPUFeatureName_AdapterPropertiesVk = 0x0005001A,
515
+ WGPUFeatureName_R8UnormStorage = 0x0005001B,
516
+ WGPUFeatureName_FormatCapabilities = 0x0005001C,
517
+ WGPUFeatureName_DrmFormatCapabilities = 0x0005001D,
518
+ WGPUFeatureName_Norm16TextureFormats = 0x0005001E,
519
+ WGPUFeatureName_MultiPlanarFormatNv16 = 0x0005001F,
520
+ WGPUFeatureName_MultiPlanarFormatNv24 = 0x00050020,
521
+ WGPUFeatureName_MultiPlanarFormatP210 = 0x00050021,
522
+ WGPUFeatureName_MultiPlanarFormatP410 = 0x00050022,
523
+ WGPUFeatureName_SharedTextureMemoryVkDedicatedAllocation = 0x00050023,
524
+ WGPUFeatureName_SharedTextureMemoryAHardwareBuffer = 0x00050024,
525
+ WGPUFeatureName_SharedTextureMemoryDmaBuf = 0x00050025,
526
+ WGPUFeatureName_SharedTextureMemoryOpaqueFD = 0x00050026,
527
+ WGPUFeatureName_SharedTextureMemoryZirconHandle = 0x00050027,
528
+ WGPUFeatureName_SharedTextureMemoryDXGISharedHandle = 0x00050028,
529
+ WGPUFeatureName_SharedTextureMemoryD3D11Texture2D = 0x00050029,
530
+ WGPUFeatureName_SharedTextureMemoryIOSurface = 0x0005002A,
531
+ WGPUFeatureName_SharedTextureMemoryEGLImage = 0x0005002B,
532
+ WGPUFeatureName_SharedFenceVkSemaphoreOpaqueFD = 0x0005002C,
533
+ WGPUFeatureName_SharedFenceVkSemaphoreSyncFD = 0x0005002D,
534
+ WGPUFeatureName_SharedFenceVkSemaphoreZirconHandle = 0x0005002E,
535
+ WGPUFeatureName_SharedFenceDXGISharedHandle = 0x0005002F,
536
+ WGPUFeatureName_SharedFenceMTLSharedEvent = 0x00050030,
537
+ WGPUFeatureName_SharedBufferMemoryD3D12Resource = 0x00050031,
538
+ WGPUFeatureName_StaticSamplers = 0x00050032,
539
+ WGPUFeatureName_YCbCrVulkanSamplers = 0x00050033,
540
+ WGPUFeatureName_ShaderModuleCompilationOptions = 0x00050034,
541
+ WGPUFeatureName_DawnLoadResolveTexture = 0x00050035,
542
+ WGPUFeatureName_Force32 = 0x7FFFFFFF
543
+ } WGPUFeatureName WGPU_ENUM_ATTRIBUTE;
544
+ typedef enum WGPUFilterMode {
545
+ WGPUFilterMode_Undefined = 0x00000000,
546
+ WGPUFilterMode_Nearest = 0x00000001,
547
+ WGPUFilterMode_Linear = 0x00000002,
548
+ WGPUFilterMode_Force32 = 0x7FFFFFFF
549
+ } WGPUFilterMode WGPU_ENUM_ATTRIBUTE;
550
+ typedef enum WGPUFrontFace {
551
+ WGPUFrontFace_Undefined = 0x00000000,
552
+ WGPUFrontFace_CCW = 0x00000001,
553
+ WGPUFrontFace_CW = 0x00000002,
554
+ WGPUFrontFace_Force32 = 0x7FFFFFFF
555
+ } WGPUFrontFace WGPU_ENUM_ATTRIBUTE;
556
+ typedef enum WGPUIndexFormat {
557
+ WGPUIndexFormat_Undefined = 0x00000000,
558
+ WGPUIndexFormat_Uint16 = 0x00000001,
559
+ WGPUIndexFormat_Uint32 = 0x00000002,
560
+ WGPUIndexFormat_Force32 = 0x7FFFFFFF
561
+ } WGPUIndexFormat WGPU_ENUM_ATTRIBUTE;
562
+ typedef enum WGPULoadOp {
563
+ WGPULoadOp_Undefined = 0x00000000,
564
+ WGPULoadOp_Clear = 0x00000001,
565
+ WGPULoadOp_Load = 0x00000002,
566
+ WGPULoadOp_ExpandResolveTexture = 0x00050003,
567
+ WGPULoadOp_Force32 = 0x7FFFFFFF
568
+ } WGPULoadOp WGPU_ENUM_ATTRIBUTE;
569
+ typedef enum WGPULoggingType {
570
+ WGPULoggingType_Verbose = 0x00000001,
571
+ WGPULoggingType_Info = 0x00000002,
572
+ WGPULoggingType_Warning = 0x00000003,
573
+ WGPULoggingType_Error = 0x00000004,
574
+ WGPULoggingType_Force32 = 0x7FFFFFFF
575
+ } WGPULoggingType WGPU_ENUM_ATTRIBUTE;
576
+ typedef enum WGPUMapAsyncStatus {
577
+ WGPUMapAsyncStatus_Success = 0x00000001,
578
+ WGPUMapAsyncStatus_InstanceDropped = 0x00000002,
579
+ WGPUMapAsyncStatus_Error = 0x00000003,
580
+ WGPUMapAsyncStatus_Aborted = 0x00000004,
581
+ WGPUMapAsyncStatus_Unknown = 0x00000005,
582
+ WGPUMapAsyncStatus_Force32 = 0x7FFFFFFF
583
+ } WGPUMapAsyncStatus WGPU_ENUM_ATTRIBUTE;
584
+ typedef enum WGPUMipmapFilterMode {
585
+ WGPUMipmapFilterMode_Undefined = 0x00000000,
586
+ WGPUMipmapFilterMode_Nearest = 0x00000001,
587
+ WGPUMipmapFilterMode_Linear = 0x00000002,
588
+ WGPUMipmapFilterMode_Force32 = 0x7FFFFFFF
589
+ } WGPUMipmapFilterMode WGPU_ENUM_ATTRIBUTE;
590
+ typedef enum WGPUPopErrorScopeStatus {
591
+ WGPUPopErrorScopeStatus_Success = 0x00000001,
592
+ WGPUPopErrorScopeStatus_InstanceDropped = 0x00000002,
593
+ WGPUPopErrorScopeStatus_Force32 = 0x7FFFFFFF
594
+ } WGPUPopErrorScopeStatus WGPU_ENUM_ATTRIBUTE;
595
+ typedef enum WGPUPowerPreference {
596
+ WGPUPowerPreference_Undefined = 0x00000000,
597
+ WGPUPowerPreference_LowPower = 0x00000001,
598
+ WGPUPowerPreference_HighPerformance = 0x00000002,
599
+ WGPUPowerPreference_Force32 = 0x7FFFFFFF
600
+ } WGPUPowerPreference WGPU_ENUM_ATTRIBUTE;
601
+ typedef enum WGPUPresentMode {
602
+ WGPUPresentMode_Fifo = 0x00000001,
603
+ WGPUPresentMode_FifoRelaxed = 0x00000002,
604
+ WGPUPresentMode_Immediate = 0x00000003,
605
+ WGPUPresentMode_Mailbox = 0x00000004,
606
+ WGPUPresentMode_Force32 = 0x7FFFFFFF
607
+ } WGPUPresentMode WGPU_ENUM_ATTRIBUTE;
608
+ typedef enum WGPUPrimitiveTopology {
609
+ WGPUPrimitiveTopology_Undefined = 0x00000000,
610
+ WGPUPrimitiveTopology_PointList = 0x00000001,
611
+ WGPUPrimitiveTopology_LineList = 0x00000002,
612
+ WGPUPrimitiveTopology_LineStrip = 0x00000003,
613
+ WGPUPrimitiveTopology_TriangleList = 0x00000004,
614
+ WGPUPrimitiveTopology_TriangleStrip = 0x00000005,
615
+ WGPUPrimitiveTopology_Force32 = 0x7FFFFFFF
616
+ } WGPUPrimitiveTopology WGPU_ENUM_ATTRIBUTE;
617
+ typedef enum WGPUQueryType {
618
+ WGPUQueryType_Occlusion = 0x00000001,
619
+ WGPUQueryType_Timestamp = 0x00000002,
620
+ WGPUQueryType_Force32 = 0x7FFFFFFF
621
+ } WGPUQueryType WGPU_ENUM_ATTRIBUTE;
622
+ typedef enum WGPUQueueWorkDoneStatus {
623
+ WGPUQueueWorkDoneStatus_Success = 0x00000001,
624
+ WGPUQueueWorkDoneStatus_InstanceDropped = 0x00000002,
625
+ WGPUQueueWorkDoneStatus_Error = 0x00000003,
626
+ WGPUQueueWorkDoneStatus_Unknown = 0x00000004,
627
+ WGPUQueueWorkDoneStatus_DeviceLost = 0x00000005,
628
+ WGPUQueueWorkDoneStatus_Force32 = 0x7FFFFFFF
629
+ } WGPUQueueWorkDoneStatus WGPU_ENUM_ATTRIBUTE;
630
+ typedef enum WGPURequestAdapterStatus {
631
+ WGPURequestAdapterStatus_Success = 0x00000001,
632
+ WGPURequestAdapterStatus_InstanceDropped = 0x00000002,
633
+ WGPURequestAdapterStatus_Unavailable = 0x00000003,
634
+ WGPURequestAdapterStatus_Error = 0x00000004,
635
+ WGPURequestAdapterStatus_Unknown = 0x00000005,
636
+ WGPURequestAdapterStatus_Force32 = 0x7FFFFFFF
637
+ } WGPURequestAdapterStatus WGPU_ENUM_ATTRIBUTE;
638
+ typedef enum WGPURequestDeviceStatus {
639
+ WGPURequestDeviceStatus_Success = 0x00000001,
640
+ WGPURequestDeviceStatus_InstanceDropped = 0x00000002,
641
+ WGPURequestDeviceStatus_Error = 0x00000003,
642
+ WGPURequestDeviceStatus_Unknown = 0x00000004,
643
+ WGPURequestDeviceStatus_Force32 = 0x7FFFFFFF
644
+ } WGPURequestDeviceStatus WGPU_ENUM_ATTRIBUTE;
645
+ typedef enum WGPUSType {
646
+ WGPUSType_ShaderModuleSPIRVDescriptor = 0x00000001,
647
+ WGPUSType_ShaderModuleWGSLDescriptor = 0x00000002,
648
+ WGPUSType_PrimitiveDepthClipControl = 0x00000003,
649
+ WGPUSType_RenderPassDescriptorMaxDrawCount = 0x00000004,
650
+ WGPUSType_TextureBindingViewDimensionDescriptor = 0x00020000,
651
+ WGPUSType_SurfaceDescriptorFromCanvasHTMLSelector = 0x00040000,
652
+ WGPUSType_SurfaceDescriptorFromMetalLayer = 0x00010000,
653
+ WGPUSType_SurfaceDescriptorFromWindowsHWND = 0x00010001,
654
+ WGPUSType_SurfaceDescriptorFromXlibWindow = 0x00010002,
655
+ WGPUSType_SurfaceDescriptorFromWaylandSurface = 0x00010003,
656
+ WGPUSType_SurfaceDescriptorFromAndroidNativeWindow = 0x00010004,
657
+ WGPUSType_SurfaceDescriptorFromXcbWindow = 0x00010005,
658
+ WGPUSType_SurfaceDescriptorFromWindowsCoreWindow = 0x00050000,
659
+ WGPUSType_ExternalTextureBindingEntry = 0x00050001,
660
+ WGPUSType_ExternalTextureBindingLayout = 0x00050002,
661
+ WGPUSType_SurfaceDescriptorFromWindowsSwapChainPanel = 0x00050003,
662
+ WGPUSType_DepthStencilStateDepthWriteDefinedDawn = 0x00050004,
663
+ WGPUSType_DawnTextureInternalUsageDescriptor = 0x00050005,
664
+ WGPUSType_DawnEncoderInternalUsageDescriptor = 0x00050006,
665
+ WGPUSType_DawnInstanceDescriptor = 0x00050007,
666
+ WGPUSType_DawnCacheDeviceDescriptor = 0x00050008,
667
+ WGPUSType_DawnAdapterPropertiesPowerPreference = 0x00050009,
668
+ WGPUSType_DawnBufferDescriptorErrorInfoFromWireClient = 0x0005000A,
669
+ WGPUSType_DawnTogglesDescriptor = 0x0005000B,
670
+ WGPUSType_DawnShaderModuleSPIRVOptionsDescriptor = 0x0005000C,
671
+ WGPUSType_RequestAdapterOptionsLUID = 0x0005000D,
672
+ WGPUSType_RequestAdapterOptionsGetGLProc = 0x0005000E,
673
+ WGPUSType_RequestAdapterOptionsD3D11Device = 0x0005000F,
674
+ WGPUSType_DawnRenderPassColorAttachmentRenderToSingleSampled = 0x00050010,
675
+ WGPUSType_RenderPassPixelLocalStorage = 0x00050011,
676
+ WGPUSType_PipelineLayoutPixelLocalStorage = 0x00050012,
677
+ WGPUSType_BufferHostMappedPointer = 0x00050013,
678
+ WGPUSType_DawnExperimentalSubgroupLimits = 0x00050014,
679
+ WGPUSType_AdapterPropertiesMemoryHeaps = 0x00050015,
680
+ WGPUSType_AdapterPropertiesD3D = 0x00050016,
681
+ WGPUSType_AdapterPropertiesVk = 0x00050017,
682
+ WGPUSType_DawnComputePipelineFullSubgroups = 0x00050018,
683
+ WGPUSType_DawnWireWGSLControl = 0x00050019,
684
+ WGPUSType_DawnWGSLBlocklist = 0x0005001A,
685
+ WGPUSType_DrmFormatCapabilities = 0x0005001B,
686
+ WGPUSType_ShaderModuleCompilationOptions = 0x0005001C,
687
+ WGPUSType_ColorTargetStateExpandResolveTextureDawn = 0x0005001D,
688
+ WGPUSType_SharedTextureMemoryVkDedicatedAllocationDescriptor = 0x0005001E,
689
+ WGPUSType_SharedTextureMemoryAHardwareBufferDescriptor = 0x0005001F,
690
+ WGPUSType_SharedTextureMemoryDmaBufDescriptor = 0x00050020,
691
+ WGPUSType_SharedTextureMemoryOpaqueFDDescriptor = 0x00050021,
692
+ WGPUSType_SharedTextureMemoryZirconHandleDescriptor = 0x00050022,
693
+ WGPUSType_SharedTextureMemoryDXGISharedHandleDescriptor = 0x00050023,
694
+ WGPUSType_SharedTextureMemoryD3D11Texture2DDescriptor = 0x00050024,
695
+ WGPUSType_SharedTextureMemoryIOSurfaceDescriptor = 0x00050025,
696
+ WGPUSType_SharedTextureMemoryEGLImageDescriptor = 0x00050026,
697
+ WGPUSType_SharedTextureMemoryInitializedBeginState = 0x00050027,
698
+ WGPUSType_SharedTextureMemoryInitializedEndState = 0x00050028,
699
+ WGPUSType_SharedTextureMemoryVkImageLayoutBeginState = 0x00050029,
700
+ WGPUSType_SharedTextureMemoryVkImageLayoutEndState = 0x0005002A,
701
+ WGPUSType_SharedTextureMemoryD3DSwapchainBeginState = 0x0005002B,
702
+ WGPUSType_SharedFenceVkSemaphoreOpaqueFDDescriptor = 0x0005002C,
703
+ WGPUSType_SharedFenceVkSemaphoreOpaqueFDExportInfo = 0x0005002D,
704
+ WGPUSType_SharedFenceVkSemaphoreSyncFDDescriptor = 0x0005002E,
705
+ WGPUSType_SharedFenceVkSemaphoreSyncFDExportInfo = 0x0005002F,
706
+ WGPUSType_SharedFenceVkSemaphoreZirconHandleDescriptor = 0x00050030,
707
+ WGPUSType_SharedFenceVkSemaphoreZirconHandleExportInfo = 0x00050031,
708
+ WGPUSType_SharedFenceDXGISharedHandleDescriptor = 0x00050032,
709
+ WGPUSType_SharedFenceDXGISharedHandleExportInfo = 0x00050033,
710
+ WGPUSType_SharedFenceMTLSharedEventDescriptor = 0x00050034,
711
+ WGPUSType_SharedFenceMTLSharedEventExportInfo = 0x00050035,
712
+ WGPUSType_SharedBufferMemoryD3D12ResourceDescriptor = 0x00050036,
713
+ WGPUSType_StaticSamplerBindingLayout = 0x00050037,
714
+ WGPUSType_YCbCrVkDescriptor = 0x00050038,
715
+ WGPUSType_SharedTextureMemoryAHardwareBufferProperties = 0x00050039,
716
+ WGPUSType_AHardwareBufferProperties = 0x0005003A,
717
+ WGPUSType_Force32 = 0x7FFFFFFF
718
+ } WGPUSType WGPU_ENUM_ATTRIBUTE;
719
+ typedef enum WGPUSamplerBindingType {
720
+ WGPUSamplerBindingType_Undefined = 0x00000000,
721
+ WGPUSamplerBindingType_Filtering = 0x00000001,
722
+ WGPUSamplerBindingType_NonFiltering = 0x00000002,
723
+ WGPUSamplerBindingType_Comparison = 0x00000003,
724
+ WGPUSamplerBindingType_Force32 = 0x7FFFFFFF
725
+ } WGPUSamplerBindingType WGPU_ENUM_ATTRIBUTE;
726
+ typedef enum WGPUSharedFenceType {
727
+ WGPUSharedFenceType_VkSemaphoreOpaqueFD = 0x00000001,
728
+ WGPUSharedFenceType_VkSemaphoreSyncFD = 0x00000002,
729
+ WGPUSharedFenceType_VkSemaphoreZirconHandle = 0x00000003,
730
+ WGPUSharedFenceType_DXGISharedHandle = 0x00000004,
731
+ WGPUSharedFenceType_MTLSharedEvent = 0x00000005,
732
+ WGPUSharedFenceType_Force32 = 0x7FFFFFFF
733
+ } WGPUSharedFenceType WGPU_ENUM_ATTRIBUTE;
734
+ typedef enum WGPUStatus {
735
+ WGPUStatus_Success = 0x00000001,
736
+ WGPUStatus_Error = 0x00000002,
737
+ WGPUStatus_Force32 = 0x7FFFFFFF
738
+ } WGPUStatus WGPU_ENUM_ATTRIBUTE;
739
+ typedef enum WGPUStencilOperation {
740
+ WGPUStencilOperation_Undefined = 0x00000000,
741
+ WGPUStencilOperation_Keep = 0x00000001,
742
+ WGPUStencilOperation_Zero = 0x00000002,
743
+ WGPUStencilOperation_Replace = 0x00000003,
744
+ WGPUStencilOperation_Invert = 0x00000004,
745
+ WGPUStencilOperation_IncrementClamp = 0x00000005,
746
+ WGPUStencilOperation_DecrementClamp = 0x00000006,
747
+ WGPUStencilOperation_IncrementWrap = 0x00000007,
748
+ WGPUStencilOperation_DecrementWrap = 0x00000008,
749
+ WGPUStencilOperation_Force32 = 0x7FFFFFFF
750
+ } WGPUStencilOperation WGPU_ENUM_ATTRIBUTE;
751
+ typedef enum WGPUStorageTextureAccess {
752
+ WGPUStorageTextureAccess_Undefined = 0x00000000,
753
+ WGPUStorageTextureAccess_WriteOnly = 0x00000001,
754
+ WGPUStorageTextureAccess_ReadOnly = 0x00000002,
755
+ WGPUStorageTextureAccess_ReadWrite = 0x00000003,
756
+ WGPUStorageTextureAccess_Force32 = 0x7FFFFFFF
757
+ } WGPUStorageTextureAccess WGPU_ENUM_ATTRIBUTE;
758
+ typedef enum WGPUStoreOp {
759
+ WGPUStoreOp_Undefined = 0x00000000,
760
+ WGPUStoreOp_Store = 0x00000001,
761
+ WGPUStoreOp_Discard = 0x00000002,
762
+ WGPUStoreOp_Force32 = 0x7FFFFFFF
763
+ } WGPUStoreOp WGPU_ENUM_ATTRIBUTE;
764
+ typedef enum WGPUSurfaceGetCurrentTextureStatus {
765
+ WGPUSurfaceGetCurrentTextureStatus_Success = 0x00000001,
766
+ WGPUSurfaceGetCurrentTextureStatus_Timeout = 0x00000002,
767
+ WGPUSurfaceGetCurrentTextureStatus_Outdated = 0x00000003,
768
+ WGPUSurfaceGetCurrentTextureStatus_Lost = 0x00000004,
769
+ WGPUSurfaceGetCurrentTextureStatus_OutOfMemory = 0x00000005,
770
+ WGPUSurfaceGetCurrentTextureStatus_DeviceLost = 0x00000006,
771
+ WGPUSurfaceGetCurrentTextureStatus_Error = 0x00000007,
772
+ WGPUSurfaceGetCurrentTextureStatus_Force32 = 0x7FFFFFFF
773
+ } WGPUSurfaceGetCurrentTextureStatus WGPU_ENUM_ATTRIBUTE;
774
+ typedef enum WGPUTextureAspect {
775
+ WGPUTextureAspect_Undefined = 0x00000000,
776
+ WGPUTextureAspect_All = 0x00000001,
777
+ WGPUTextureAspect_StencilOnly = 0x00000002,
778
+ WGPUTextureAspect_DepthOnly = 0x00000003,
779
+ WGPUTextureAspect_Plane0Only = 0x00050000,
780
+ WGPUTextureAspect_Plane1Only = 0x00050001,
781
+ WGPUTextureAspect_Plane2Only = 0x00050002,
782
+ WGPUTextureAspect_Force32 = 0x7FFFFFFF
783
+ } WGPUTextureAspect WGPU_ENUM_ATTRIBUTE;
784
+ typedef enum WGPUTextureDimension {
785
+ WGPUTextureDimension_Undefined = 0x00000000,
786
+ WGPUTextureDimension_1D = 0x00000001,
787
+ WGPUTextureDimension_2D = 0x00000002,
788
+ WGPUTextureDimension_3D = 0x00000003,
789
+ WGPUTextureDimension_Force32 = 0x7FFFFFFF
790
+ } WGPUTextureDimension WGPU_ENUM_ATTRIBUTE;
791
+ typedef enum WGPUTextureFormat {
792
+ WGPUTextureFormat_Undefined = 0x00000000,
793
+ WGPUTextureFormat_R8Unorm = 0x00000001,
794
+ WGPUTextureFormat_R8Snorm = 0x00000002,
795
+ WGPUTextureFormat_R8Uint = 0x00000003,
796
+ WGPUTextureFormat_R8Sint = 0x00000004,
797
+ WGPUTextureFormat_R16Uint = 0x00000005,
798
+ WGPUTextureFormat_R16Sint = 0x00000006,
799
+ WGPUTextureFormat_R16Float = 0x00000007,
800
+ WGPUTextureFormat_RG8Unorm = 0x00000008,
801
+ WGPUTextureFormat_RG8Snorm = 0x00000009,
802
+ WGPUTextureFormat_RG8Uint = 0x0000000A,
803
+ WGPUTextureFormat_RG8Sint = 0x0000000B,
804
+ WGPUTextureFormat_R32Float = 0x0000000C,
805
+ WGPUTextureFormat_R32Uint = 0x0000000D,
806
+ WGPUTextureFormat_R32Sint = 0x0000000E,
807
+ WGPUTextureFormat_RG16Uint = 0x0000000F,
808
+ WGPUTextureFormat_RG16Sint = 0x00000010,
809
+ WGPUTextureFormat_RG16Float = 0x00000011,
810
+ WGPUTextureFormat_RGBA8Unorm = 0x00000012,
811
+ WGPUTextureFormat_RGBA8UnormSrgb = 0x00000013,
812
+ WGPUTextureFormat_RGBA8Snorm = 0x00000014,
813
+ WGPUTextureFormat_RGBA8Uint = 0x00000015,
814
+ WGPUTextureFormat_RGBA8Sint = 0x00000016,
815
+ WGPUTextureFormat_BGRA8Unorm = 0x00000017,
816
+ WGPUTextureFormat_BGRA8UnormSrgb = 0x00000018,
817
+ WGPUTextureFormat_RGB10A2Uint = 0x00000019,
818
+ WGPUTextureFormat_RGB10A2Unorm = 0x0000001A,
819
+ WGPUTextureFormat_RG11B10Ufloat = 0x0000001B,
820
+ WGPUTextureFormat_RGB9E5Ufloat = 0x0000001C,
821
+ WGPUTextureFormat_RG32Float = 0x0000001D,
822
+ WGPUTextureFormat_RG32Uint = 0x0000001E,
823
+ WGPUTextureFormat_RG32Sint = 0x0000001F,
824
+ WGPUTextureFormat_RGBA16Uint = 0x00000020,
825
+ WGPUTextureFormat_RGBA16Sint = 0x00000021,
826
+ WGPUTextureFormat_RGBA16Float = 0x00000022,
827
+ WGPUTextureFormat_RGBA32Float = 0x00000023,
828
+ WGPUTextureFormat_RGBA32Uint = 0x00000024,
829
+ WGPUTextureFormat_RGBA32Sint = 0x00000025,
830
+ WGPUTextureFormat_Stencil8 = 0x00000026,
831
+ WGPUTextureFormat_Depth16Unorm = 0x00000027,
832
+ WGPUTextureFormat_Depth24Plus = 0x00000028,
833
+ WGPUTextureFormat_Depth24PlusStencil8 = 0x00000029,
834
+ WGPUTextureFormat_Depth32Float = 0x0000002A,
835
+ WGPUTextureFormat_Depth32FloatStencil8 = 0x0000002B,
836
+ WGPUTextureFormat_BC1RGBAUnorm = 0x0000002C,
837
+ WGPUTextureFormat_BC1RGBAUnormSrgb = 0x0000002D,
838
+ WGPUTextureFormat_BC2RGBAUnorm = 0x0000002E,
839
+ WGPUTextureFormat_BC2RGBAUnormSrgb = 0x0000002F,
840
+ WGPUTextureFormat_BC3RGBAUnorm = 0x00000030,
841
+ WGPUTextureFormat_BC3RGBAUnormSrgb = 0x00000031,
842
+ WGPUTextureFormat_BC4RUnorm = 0x00000032,
843
+ WGPUTextureFormat_BC4RSnorm = 0x00000033,
844
+ WGPUTextureFormat_BC5RGUnorm = 0x00000034,
845
+ WGPUTextureFormat_BC5RGSnorm = 0x00000035,
846
+ WGPUTextureFormat_BC6HRGBUfloat = 0x00000036,
847
+ WGPUTextureFormat_BC6HRGBFloat = 0x00000037,
848
+ WGPUTextureFormat_BC7RGBAUnorm = 0x00000038,
849
+ WGPUTextureFormat_BC7RGBAUnormSrgb = 0x00000039,
850
+ WGPUTextureFormat_ETC2RGB8Unorm = 0x0000003A,
851
+ WGPUTextureFormat_ETC2RGB8UnormSrgb = 0x0000003B,
852
+ WGPUTextureFormat_ETC2RGB8A1Unorm = 0x0000003C,
853
+ WGPUTextureFormat_ETC2RGB8A1UnormSrgb = 0x0000003D,
854
+ WGPUTextureFormat_ETC2RGBA8Unorm = 0x0000003E,
855
+ WGPUTextureFormat_ETC2RGBA8UnormSrgb = 0x0000003F,
856
+ WGPUTextureFormat_EACR11Unorm = 0x00000040,
857
+ WGPUTextureFormat_EACR11Snorm = 0x00000041,
858
+ WGPUTextureFormat_EACRG11Unorm = 0x00000042,
859
+ WGPUTextureFormat_EACRG11Snorm = 0x00000043,
860
+ WGPUTextureFormat_ASTC4x4Unorm = 0x00000044,
861
+ WGPUTextureFormat_ASTC4x4UnormSrgb = 0x00000045,
862
+ WGPUTextureFormat_ASTC5x4Unorm = 0x00000046,
863
+ WGPUTextureFormat_ASTC5x4UnormSrgb = 0x00000047,
864
+ WGPUTextureFormat_ASTC5x5Unorm = 0x00000048,
865
+ WGPUTextureFormat_ASTC5x5UnormSrgb = 0x00000049,
866
+ WGPUTextureFormat_ASTC6x5Unorm = 0x0000004A,
867
+ WGPUTextureFormat_ASTC6x5UnormSrgb = 0x0000004B,
868
+ WGPUTextureFormat_ASTC6x6Unorm = 0x0000004C,
869
+ WGPUTextureFormat_ASTC6x6UnormSrgb = 0x0000004D,
870
+ WGPUTextureFormat_ASTC8x5Unorm = 0x0000004E,
871
+ WGPUTextureFormat_ASTC8x5UnormSrgb = 0x0000004F,
872
+ WGPUTextureFormat_ASTC8x6Unorm = 0x00000050,
873
+ WGPUTextureFormat_ASTC8x6UnormSrgb = 0x00000051,
874
+ WGPUTextureFormat_ASTC8x8Unorm = 0x00000052,
875
+ WGPUTextureFormat_ASTC8x8UnormSrgb = 0x00000053,
876
+ WGPUTextureFormat_ASTC10x5Unorm = 0x00000054,
877
+ WGPUTextureFormat_ASTC10x5UnormSrgb = 0x00000055,
878
+ WGPUTextureFormat_ASTC10x6Unorm = 0x00000056,
879
+ WGPUTextureFormat_ASTC10x6UnormSrgb = 0x00000057,
880
+ WGPUTextureFormat_ASTC10x8Unorm = 0x00000058,
881
+ WGPUTextureFormat_ASTC10x8UnormSrgb = 0x00000059,
882
+ WGPUTextureFormat_ASTC10x10Unorm = 0x0000005A,
883
+ WGPUTextureFormat_ASTC10x10UnormSrgb = 0x0000005B,
884
+ WGPUTextureFormat_ASTC12x10Unorm = 0x0000005C,
885
+ WGPUTextureFormat_ASTC12x10UnormSrgb = 0x0000005D,
886
+ WGPUTextureFormat_ASTC12x12Unorm = 0x0000005E,
887
+ WGPUTextureFormat_ASTC12x12UnormSrgb = 0x0000005F,
888
+ WGPUTextureFormat_R16Unorm = 0x00050000,
889
+ WGPUTextureFormat_RG16Unorm = 0x00050001,
890
+ WGPUTextureFormat_RGBA16Unorm = 0x00050002,
891
+ WGPUTextureFormat_R16Snorm = 0x00050003,
892
+ WGPUTextureFormat_RG16Snorm = 0x00050004,
893
+ WGPUTextureFormat_RGBA16Snorm = 0x00050005,
894
+ WGPUTextureFormat_R8BG8Biplanar420Unorm = 0x00050006,
895
+ WGPUTextureFormat_R10X6BG10X6Biplanar420Unorm = 0x00050007,
896
+ WGPUTextureFormat_R8BG8A8Triplanar420Unorm = 0x00050008,
897
+ WGPUTextureFormat_R8BG8Biplanar422Unorm = 0x00050009,
898
+ WGPUTextureFormat_R8BG8Biplanar444Unorm = 0x0005000A,
899
+ WGPUTextureFormat_R10X6BG10X6Biplanar422Unorm = 0x0005000B,
900
+ WGPUTextureFormat_R10X6BG10X6Biplanar444Unorm = 0x0005000C,
901
+ WGPUTextureFormat_External = 0x0005000D,
902
+ WGPUTextureFormat_Force32 = 0x7FFFFFFF
903
+ } WGPUTextureFormat WGPU_ENUM_ATTRIBUTE;
904
+ typedef enum WGPUTextureSampleType {
905
+ WGPUTextureSampleType_Undefined = 0x00000000,
906
+ WGPUTextureSampleType_Float = 0x00000001,
907
+ WGPUTextureSampleType_UnfilterableFloat = 0x00000002,
908
+ WGPUTextureSampleType_Depth = 0x00000003,
909
+ WGPUTextureSampleType_Sint = 0x00000004,
910
+ WGPUTextureSampleType_Uint = 0x00000005,
911
+ WGPUTextureSampleType_Force32 = 0x7FFFFFFF
912
+ } WGPUTextureSampleType WGPU_ENUM_ATTRIBUTE;
913
+ typedef enum WGPUTextureViewDimension {
914
+ WGPUTextureViewDimension_Undefined = 0x00000000,
915
+ WGPUTextureViewDimension_1D = 0x00000001,
916
+ WGPUTextureViewDimension_2D = 0x00000002,
917
+ WGPUTextureViewDimension_2DArray = 0x00000003,
918
+ WGPUTextureViewDimension_Cube = 0x00000004,
919
+ WGPUTextureViewDimension_CubeArray = 0x00000005,
920
+ WGPUTextureViewDimension_3D = 0x00000006,
921
+ WGPUTextureViewDimension_Force32 = 0x7FFFFFFF
922
+ } WGPUTextureViewDimension WGPU_ENUM_ATTRIBUTE;
923
+ typedef enum WGPUVertexFormat {
924
+ WGPUVertexFormat_Uint8x2 = 0x00000001,
925
+ WGPUVertexFormat_Uint8x4 = 0x00000002,
926
+ WGPUVertexFormat_Sint8x2 = 0x00000003,
927
+ WGPUVertexFormat_Sint8x4 = 0x00000004,
928
+ WGPUVertexFormat_Unorm8x2 = 0x00000005,
929
+ WGPUVertexFormat_Unorm8x4 = 0x00000006,
930
+ WGPUVertexFormat_Snorm8x2 = 0x00000007,
931
+ WGPUVertexFormat_Snorm8x4 = 0x00000008,
932
+ WGPUVertexFormat_Uint16x2 = 0x00000009,
933
+ WGPUVertexFormat_Uint16x4 = 0x0000000A,
934
+ WGPUVertexFormat_Sint16x2 = 0x0000000B,
935
+ WGPUVertexFormat_Sint16x4 = 0x0000000C,
936
+ WGPUVertexFormat_Unorm16x2 = 0x0000000D,
937
+ WGPUVertexFormat_Unorm16x4 = 0x0000000E,
938
+ WGPUVertexFormat_Snorm16x2 = 0x0000000F,
939
+ WGPUVertexFormat_Snorm16x4 = 0x00000010,
940
+ WGPUVertexFormat_Float16x2 = 0x00000011,
941
+ WGPUVertexFormat_Float16x4 = 0x00000012,
942
+ WGPUVertexFormat_Float32 = 0x00000013,
943
+ WGPUVertexFormat_Float32x2 = 0x00000014,
944
+ WGPUVertexFormat_Float32x3 = 0x00000015,
945
+ WGPUVertexFormat_Float32x4 = 0x00000016,
946
+ WGPUVertexFormat_Uint32 = 0x00000017,
947
+ WGPUVertexFormat_Uint32x2 = 0x00000018,
948
+ WGPUVertexFormat_Uint32x3 = 0x00000019,
949
+ WGPUVertexFormat_Uint32x4 = 0x0000001A,
950
+ WGPUVertexFormat_Sint32 = 0x0000001B,
951
+ WGPUVertexFormat_Sint32x2 = 0x0000001C,
952
+ WGPUVertexFormat_Sint32x3 = 0x0000001D,
953
+ WGPUVertexFormat_Sint32x4 = 0x0000001E,
954
+ WGPUVertexFormat_Unorm10_10_10_2 = 0x0000001F,
955
+ WGPUVertexFormat_Force32 = 0x7FFFFFFF
956
+ } WGPUVertexFormat WGPU_ENUM_ATTRIBUTE;
957
+ typedef enum WGPUVertexStepMode {
958
+ WGPUVertexStepMode_Undefined = 0x00000000,
959
+ WGPUVertexStepMode_VertexBufferNotUsed = 0x00000001,
960
+ WGPUVertexStepMode_Vertex = 0x00000002,
961
+ WGPUVertexStepMode_Instance = 0x00000003,
962
+ WGPUVertexStepMode_Force32 = 0x7FFFFFFF
963
+ } WGPUVertexStepMode WGPU_ENUM_ATTRIBUTE;
964
+ typedef enum WGPUWaitStatus {
965
+ WGPUWaitStatus_Success = 0x00000001,
966
+ WGPUWaitStatus_TimedOut = 0x00000002,
967
+ WGPUWaitStatus_UnsupportedTimeout = 0x00000003,
968
+ WGPUWaitStatus_UnsupportedCount = 0x00000004,
969
+ WGPUWaitStatus_UnsupportedMixedSources = 0x00000005,
970
+ WGPUWaitStatus_Unknown = 0x00000006,
971
+ WGPUWaitStatus_Force32 = 0x7FFFFFFF
972
+ } WGPUWaitStatus WGPU_ENUM_ATTRIBUTE;
973
+
974
+ typedef WGPUFlags WGPUBufferUsage;
975
+ typedef WGPUFlags WGPUBufferUsageFlags;
976
+ static const WGPUBufferUsage WGPUBufferUsage_None = 0x0000000000000000;
977
+ static const WGPUBufferUsage WGPUBufferUsage_MapRead = 0x0000000000000001;
978
+ static const WGPUBufferUsage WGPUBufferUsage_MapWrite = 0x0000000000000002;
979
+ static const WGPUBufferUsage WGPUBufferUsage_CopySrc = 0x0000000000000004;
980
+ static const WGPUBufferUsage WGPUBufferUsage_CopyDst = 0x0000000000000008;
981
+ static const WGPUBufferUsage WGPUBufferUsage_Index = 0x0000000000000010;
982
+ static const WGPUBufferUsage WGPUBufferUsage_Vertex = 0x0000000000000020;
983
+ static const WGPUBufferUsage WGPUBufferUsage_Uniform = 0x0000000000000040;
984
+ static const WGPUBufferUsage WGPUBufferUsage_Storage = 0x0000000000000080;
985
+ static const WGPUBufferUsage WGPUBufferUsage_Indirect = 0x0000000000000100;
986
+ static const WGPUBufferUsage WGPUBufferUsage_QueryResolve = 0x0000000000000200;
987
+ static const WGPUBufferUsage WGPUBufferUsage_Force32 = 0x7FFFFFFF;
988
+ typedef WGPUFlags WGPUColorWriteMask;
989
+ typedef WGPUFlags WGPUColorWriteMaskFlags;
990
+ static const WGPUColorWriteMask WGPUColorWriteMask_None = 0x0000000000000000;
991
+ static const WGPUColorWriteMask WGPUColorWriteMask_Red = 0x0000000000000001;
992
+ static const WGPUColorWriteMask WGPUColorWriteMask_Green = 0x0000000000000002;
993
+ static const WGPUColorWriteMask WGPUColorWriteMask_Blue = 0x0000000000000004;
994
+ static const WGPUColorWriteMask WGPUColorWriteMask_Alpha = 0x0000000000000008;
995
+ static const WGPUColorWriteMask WGPUColorWriteMask_All = 0x000000000000000F;
996
+ static const WGPUColorWriteMask WGPUColorWriteMask_Force32 = 0x7FFFFFFF;
997
+ typedef WGPUFlags WGPUHeapProperty;
998
+ typedef WGPUFlags WGPUHeapPropertyFlags;
999
+ static const WGPUHeapProperty WGPUHeapProperty_DeviceLocal = 0x0000000000000001;
1000
+ static const WGPUHeapProperty WGPUHeapProperty_HostVisible = 0x0000000000000002;
1001
+ static const WGPUHeapProperty WGPUHeapProperty_HostCoherent = 0x0000000000000004;
1002
+ static const WGPUHeapProperty WGPUHeapProperty_HostUncached = 0x0000000000000008;
1003
+ static const WGPUHeapProperty WGPUHeapProperty_HostCached = 0x0000000000000010;
1004
+ static const WGPUHeapProperty WGPUHeapProperty_Force32 = 0x7FFFFFFF;
1005
+ typedef WGPUFlags WGPUMapMode;
1006
+ typedef WGPUFlags WGPUMapModeFlags;
1007
+ static const WGPUMapMode WGPUMapMode_None = 0x0000000000000000;
1008
+ static const WGPUMapMode WGPUMapMode_Read = 0x0000000000000001;
1009
+ static const WGPUMapMode WGPUMapMode_Write = 0x0000000000000002;
1010
+ static const WGPUMapMode WGPUMapMode_Force32 = 0x7FFFFFFF;
1011
+ typedef WGPUFlags WGPUShaderStage;
1012
+ typedef WGPUFlags WGPUShaderStageFlags;
1013
+ static const WGPUShaderStage WGPUShaderStage_None = 0x0000000000000000;
1014
+ static const WGPUShaderStage WGPUShaderStage_Vertex = 0x0000000000000001;
1015
+ static const WGPUShaderStage WGPUShaderStage_Fragment = 0x0000000000000002;
1016
+ static const WGPUShaderStage WGPUShaderStage_Compute = 0x0000000000000004;
1017
+ static const WGPUShaderStage WGPUShaderStage_Force32 = 0x7FFFFFFF;
1018
+ typedef WGPUFlags WGPUTextureUsage;
1019
+ typedef WGPUFlags WGPUTextureUsageFlags;
1020
+ static const WGPUTextureUsage WGPUTextureUsage_None = 0x0000000000000000;
1021
+ static const WGPUTextureUsage WGPUTextureUsage_CopySrc = 0x0000000000000001;
1022
+ static const WGPUTextureUsage WGPUTextureUsage_CopyDst = 0x0000000000000002;
1023
+ static const WGPUTextureUsage WGPUTextureUsage_TextureBinding = 0x0000000000000004;
1024
+ static const WGPUTextureUsage WGPUTextureUsage_StorageBinding = 0x0000000000000008;
1025
+ static const WGPUTextureUsage WGPUTextureUsage_RenderAttachment = 0x0000000000000010;
1026
+ static const WGPUTextureUsage WGPUTextureUsage_TransientAttachment = 0x0000000000000020;
1027
+ static const WGPUTextureUsage WGPUTextureUsage_StorageAttachment = 0x0000000000000040;
1028
+ static const WGPUTextureUsage WGPUTextureUsage_Force32 = 0x7FFFFFFF;
1029
+ typedef void (*WGPUBufferMapCallback)(WGPUBufferMapAsyncStatus status, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
1030
+ typedef void (*WGPUCallback)(void * userdata) WGPU_FUNCTION_ATTRIBUTE;
1031
+ typedef void (*WGPUCompilationInfoCallback)(WGPUCompilationInfoRequestStatus status, struct WGPUCompilationInfo const * compilationInfo, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
1032
+ typedef void (*WGPUCreateComputePipelineAsyncCallback)(WGPUCreatePipelineAsyncStatus status, WGPUComputePipeline pipeline, char const * message, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
1033
+ typedef void (*WGPUCreateRenderPipelineAsyncCallback)(WGPUCreatePipelineAsyncStatus status, WGPURenderPipeline pipeline, char const * message, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
1034
+ typedef size_t (*WGPUDawnLoadCacheDataFunction)(void const * key, size_t keySize, void * value, size_t valueSize, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
1035
+ typedef void (*WGPUDawnStoreCacheDataFunction)(void const * key, size_t keySize, void const * value, size_t valueSize, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
1036
+ typedef void (*WGPUDeviceLostCallback)(WGPUDeviceLostReason reason, char const * message, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
1037
+ typedef void (*WGPUDeviceLostCallbackNew)(WGPUDevice const * device, WGPUDeviceLostReason reason, char const * message, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
1038
+ typedef void (*WGPUErrorCallback)(WGPUErrorType type, char const * message, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
1039
+ typedef void (*WGPULoggingCallback)(WGPULoggingType type, char const * message, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
1040
+ typedef void (*WGPUPopErrorScopeCallback)(WGPUPopErrorScopeStatus status, WGPUErrorType type, char const * message, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
1041
+ typedef void (*WGPUProc)(void) WGPU_FUNCTION_ATTRIBUTE;
1042
+ typedef void (*WGPUQueueWorkDoneCallback)(WGPUQueueWorkDoneStatus status, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
1043
+ typedef void (*WGPURequestAdapterCallback)(WGPURequestAdapterStatus status, WGPUAdapter adapter, char const * message, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
1044
+ typedef void (*WGPURequestDeviceCallback)(WGPURequestDeviceStatus status, WGPUDevice device, char const * message, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
1045
+
1046
+ // Callback function pointers
1047
+ typedef void (*WGPUBufferMapCallback2)(WGPUMapAsyncStatus status, char const * message, void* userdata1, void* userdata2) WGPU_FUNCTION_ATTRIBUTE;
1048
+ typedef void (*WGPUCompilationInfoCallback2)(WGPUCompilationInfoRequestStatus status, struct WGPUCompilationInfo const * compilationInfo, void* userdata1, void* userdata2) WGPU_FUNCTION_ATTRIBUTE;
1049
+ typedef void (*WGPUCreateComputePipelineAsyncCallback2)(WGPUCreatePipelineAsyncStatus status, WGPUComputePipeline pipeline, char const * message, void* userdata1, void* userdata2) WGPU_FUNCTION_ATTRIBUTE;
1050
+ typedef void (*WGPUCreateRenderPipelineAsyncCallback2)(WGPUCreatePipelineAsyncStatus status, WGPURenderPipeline pipeline, char const * message, void* userdata1, void* userdata2) WGPU_FUNCTION_ATTRIBUTE;
1051
+ typedef void (*WGPUDeviceLostCallback2)(WGPUDevice const * device, WGPUDeviceLostReason reason, char const * message, void* userdata1, void* userdata2) WGPU_FUNCTION_ATTRIBUTE;
1052
+ typedef void (*WGPUPopErrorScopeCallback2)(WGPUPopErrorScopeStatus status, WGPUErrorType type, char const * message, void* userdata1, void* userdata2) WGPU_FUNCTION_ATTRIBUTE;
1053
+ typedef void (*WGPUQueueWorkDoneCallback2)(WGPUQueueWorkDoneStatus status, void* userdata1, void* userdata2) WGPU_FUNCTION_ATTRIBUTE;
1054
+ typedef void (*WGPURequestAdapterCallback2)(WGPURequestAdapterStatus status, WGPUAdapter adapter, char const * message, void* userdata1, void* userdata2) WGPU_FUNCTION_ATTRIBUTE;
1055
+ typedef void (*WGPURequestDeviceCallback2)(WGPURequestDeviceStatus status, WGPUDevice device, char const * message, void* userdata1, void* userdata2) WGPU_FUNCTION_ATTRIBUTE;
1056
+ typedef void (*WGPUUncapturedErrorCallback)(WGPUDevice const * device, WGPUErrorType type, char const * message, void* userdata1, void* userdata2) WGPU_FUNCTION_ATTRIBUTE;
1057
+
1058
+ typedef struct WGPUChainedStruct {
1059
+ struct WGPUChainedStruct const * next;
1060
+ WGPUSType sType;
1061
+ } WGPUChainedStruct WGPU_STRUCTURE_ATTRIBUTE;
1062
+
1063
+ typedef struct WGPUChainedStructOut {
1064
+ struct WGPUChainedStructOut * next;
1065
+ WGPUSType sType;
1066
+ } WGPUChainedStructOut WGPU_STRUCTURE_ATTRIBUTE;
1067
+
1068
+
1069
+ #define WGPU_COMMA ,
1070
+
1071
+ typedef struct WGPUBufferMapCallbackInfo2 {
1072
+ WGPUChainedStruct const* nextInChain;
1073
+ WGPUCallbackMode mode;
1074
+ WGPUBufferMapCallback2 callback;
1075
+ void* userdata1;
1076
+ void* userdata2;
1077
+ } WGPUBufferMapCallbackInfo2 WGPU_STRUCTURE_ATTRIBUTE;
1078
+
1079
+ #define WGPU_BUFFER_MAP_CALLBACK_INFO_2_INIT WGPU_MAKE_INIT_STRUCT(WGPUBufferMapCallbackInfo2, { \
1080
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1081
+ /*.mode=*/{} WGPU_COMMA \
1082
+ /*.callback=*/nullptr WGPU_COMMA \
1083
+ /*.userdata1=*/nullptr WGPU_COMMA \
1084
+ /*.userdata2=*/nullptr WGPU_COMMA \
1085
+ })
1086
+
1087
+ typedef struct WGPUCompilationInfoCallbackInfo2 {
1088
+ WGPUChainedStruct const* nextInChain;
1089
+ WGPUCallbackMode mode;
1090
+ WGPUCompilationInfoCallback2 callback;
1091
+ void* userdata1;
1092
+ void* userdata2;
1093
+ } WGPUCompilationInfoCallbackInfo2 WGPU_STRUCTURE_ATTRIBUTE;
1094
+
1095
+ #define WGPU_COMPILATION_INFO_CALLBACK_INFO_2_INIT WGPU_MAKE_INIT_STRUCT(WGPUCompilationInfoCallbackInfo2, { \
1096
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1097
+ /*.mode=*/{} WGPU_COMMA \
1098
+ /*.callback=*/nullptr WGPU_COMMA \
1099
+ /*.userdata1=*/nullptr WGPU_COMMA \
1100
+ /*.userdata2=*/nullptr WGPU_COMMA \
1101
+ })
1102
+
1103
+ typedef struct WGPUCreateComputePipelineAsyncCallbackInfo2 {
1104
+ WGPUChainedStruct const* nextInChain;
1105
+ WGPUCallbackMode mode;
1106
+ WGPUCreateComputePipelineAsyncCallback2 callback;
1107
+ void* userdata1;
1108
+ void* userdata2;
1109
+ } WGPUCreateComputePipelineAsyncCallbackInfo2 WGPU_STRUCTURE_ATTRIBUTE;
1110
+
1111
+ #define WGPU_CREATE_COMPUTE_PIPELINE_ASYNC_CALLBACK_INFO_2_INIT WGPU_MAKE_INIT_STRUCT(WGPUCreateComputePipelineAsyncCallbackInfo2, { \
1112
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1113
+ /*.mode=*/{} WGPU_COMMA \
1114
+ /*.callback=*/nullptr WGPU_COMMA \
1115
+ /*.userdata1=*/nullptr WGPU_COMMA \
1116
+ /*.userdata2=*/nullptr WGPU_COMMA \
1117
+ })
1118
+
1119
+ typedef struct WGPUCreateRenderPipelineAsyncCallbackInfo2 {
1120
+ WGPUChainedStruct const* nextInChain;
1121
+ WGPUCallbackMode mode;
1122
+ WGPUCreateRenderPipelineAsyncCallback2 callback;
1123
+ void* userdata1;
1124
+ void* userdata2;
1125
+ } WGPUCreateRenderPipelineAsyncCallbackInfo2 WGPU_STRUCTURE_ATTRIBUTE;
1126
+
1127
+ #define WGPU_CREATE_RENDER_PIPELINE_ASYNC_CALLBACK_INFO_2_INIT WGPU_MAKE_INIT_STRUCT(WGPUCreateRenderPipelineAsyncCallbackInfo2, { \
1128
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1129
+ /*.mode=*/{} WGPU_COMMA \
1130
+ /*.callback=*/nullptr WGPU_COMMA \
1131
+ /*.userdata1=*/nullptr WGPU_COMMA \
1132
+ /*.userdata2=*/nullptr WGPU_COMMA \
1133
+ })
1134
+
1135
+ typedef struct WGPUDeviceLostCallbackInfo2 {
1136
+ WGPUChainedStruct const* nextInChain;
1137
+ WGPUCallbackMode mode;
1138
+ WGPUDeviceLostCallback2 callback;
1139
+ void* userdata1;
1140
+ void* userdata2;
1141
+ } WGPUDeviceLostCallbackInfo2 WGPU_STRUCTURE_ATTRIBUTE;
1142
+
1143
+ #define WGPU_DEVICE_LOST_CALLBACK_INFO_2_INIT WGPU_MAKE_INIT_STRUCT(WGPUDeviceLostCallbackInfo2, { \
1144
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1145
+ /*.mode=*/{} WGPU_COMMA \
1146
+ /*.callback=*/nullptr WGPU_COMMA \
1147
+ /*.userdata1=*/nullptr WGPU_COMMA \
1148
+ /*.userdata2=*/nullptr WGPU_COMMA \
1149
+ })
1150
+
1151
+ typedef struct WGPUPopErrorScopeCallbackInfo2 {
1152
+ WGPUChainedStruct const* nextInChain;
1153
+ WGPUCallbackMode mode;
1154
+ WGPUPopErrorScopeCallback2 callback;
1155
+ void* userdata1;
1156
+ void* userdata2;
1157
+ } WGPUPopErrorScopeCallbackInfo2 WGPU_STRUCTURE_ATTRIBUTE;
1158
+
1159
+ #define WGPU_POP_ERROR_SCOPE_CALLBACK_INFO_2_INIT WGPU_MAKE_INIT_STRUCT(WGPUPopErrorScopeCallbackInfo2, { \
1160
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1161
+ /*.mode=*/{} WGPU_COMMA \
1162
+ /*.callback=*/nullptr WGPU_COMMA \
1163
+ /*.userdata1=*/nullptr WGPU_COMMA \
1164
+ /*.userdata2=*/nullptr WGPU_COMMA \
1165
+ })
1166
+
1167
+ typedef struct WGPUQueueWorkDoneCallbackInfo2 {
1168
+ WGPUChainedStruct const* nextInChain;
1169
+ WGPUCallbackMode mode;
1170
+ WGPUQueueWorkDoneCallback2 callback;
1171
+ void* userdata1;
1172
+ void* userdata2;
1173
+ } WGPUQueueWorkDoneCallbackInfo2 WGPU_STRUCTURE_ATTRIBUTE;
1174
+
1175
+ #define WGPU_QUEUE_WORK_DONE_CALLBACK_INFO_2_INIT WGPU_MAKE_INIT_STRUCT(WGPUQueueWorkDoneCallbackInfo2, { \
1176
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1177
+ /*.mode=*/{} WGPU_COMMA \
1178
+ /*.callback=*/nullptr WGPU_COMMA \
1179
+ /*.userdata1=*/nullptr WGPU_COMMA \
1180
+ /*.userdata2=*/nullptr WGPU_COMMA \
1181
+ })
1182
+
1183
+ typedef struct WGPURequestAdapterCallbackInfo2 {
1184
+ WGPUChainedStruct const* nextInChain;
1185
+ WGPUCallbackMode mode;
1186
+ WGPURequestAdapterCallback2 callback;
1187
+ void* userdata1;
1188
+ void* userdata2;
1189
+ } WGPURequestAdapterCallbackInfo2 WGPU_STRUCTURE_ATTRIBUTE;
1190
+
1191
+ #define WGPU_REQUEST_ADAPTER_CALLBACK_INFO_2_INIT WGPU_MAKE_INIT_STRUCT(WGPURequestAdapterCallbackInfo2, { \
1192
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1193
+ /*.mode=*/{} WGPU_COMMA \
1194
+ /*.callback=*/nullptr WGPU_COMMA \
1195
+ /*.userdata1=*/nullptr WGPU_COMMA \
1196
+ /*.userdata2=*/nullptr WGPU_COMMA \
1197
+ })
1198
+
1199
+ typedef struct WGPURequestDeviceCallbackInfo2 {
1200
+ WGPUChainedStruct const* nextInChain;
1201
+ WGPUCallbackMode mode;
1202
+ WGPURequestDeviceCallback2 callback;
1203
+ void* userdata1;
1204
+ void* userdata2;
1205
+ } WGPURequestDeviceCallbackInfo2 WGPU_STRUCTURE_ATTRIBUTE;
1206
+
1207
+ #define WGPU_REQUEST_DEVICE_CALLBACK_INFO_2_INIT WGPU_MAKE_INIT_STRUCT(WGPURequestDeviceCallbackInfo2, { \
1208
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1209
+ /*.mode=*/{} WGPU_COMMA \
1210
+ /*.callback=*/nullptr WGPU_COMMA \
1211
+ /*.userdata1=*/nullptr WGPU_COMMA \
1212
+ /*.userdata2=*/nullptr WGPU_COMMA \
1213
+ })
1214
+
1215
+ typedef struct WGPUUncapturedErrorCallbackInfo2 {
1216
+ WGPUChainedStruct const* nextInChain;
1217
+ WGPUUncapturedErrorCallback callback;
1218
+ void* userdata1;
1219
+ void* userdata2;
1220
+ } WGPUUncapturedErrorCallbackInfo2 WGPU_STRUCTURE_ATTRIBUTE;
1221
+
1222
+ #define WGPU_UNCAPTURED_ERROR_CALLBACK_INFO_2_INIT WGPU_MAKE_INIT_STRUCT(WGPUUncapturedErrorCallbackInfo2, { \
1223
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1224
+ /*.callback=*/nullptr WGPU_COMMA \
1225
+ /*.userdata1=*/nullptr WGPU_COMMA \
1226
+ /*.userdata2=*/nullptr WGPU_COMMA \
1227
+ })
1228
+
1229
+ typedef struct WGPUINTERNAL__HAVE_EMDAWNWEBGPU_HEADER {
1230
+ } WGPUINTERNAL__HAVE_EMDAWNWEBGPU_HEADER WGPU_STRUCTURE_ATTRIBUTE;
1231
+
1232
+ #define WGPU_INTERNAL__HAVE_EMDAWNWEBGPU_HEADER_INIT WGPU_MAKE_INIT_STRUCT(WGPUINTERNAL__HAVE_EMDAWNWEBGPU_HEADER, { \
1233
+ })
1234
+
1235
+ typedef struct WGPUAdapterInfo {
1236
+ WGPUChainedStructOut * nextInChain;
1237
+ char const * vendor;
1238
+ char const * architecture;
1239
+ char const * device;
1240
+ char const * description;
1241
+ WGPUBackendType backendType;
1242
+ WGPUAdapterType adapterType;
1243
+ uint32_t vendorID;
1244
+ uint32_t deviceID;
1245
+ WGPUBool compatibilityMode;
1246
+ } WGPUAdapterInfo WGPU_STRUCTURE_ATTRIBUTE;
1247
+
1248
+ #define WGPU_ADAPTER_INFO_INIT WGPU_MAKE_INIT_STRUCT(WGPUAdapterInfo, { \
1249
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1250
+ /*.vendor=*/nullptr WGPU_COMMA \
1251
+ /*.architecture=*/nullptr WGPU_COMMA \
1252
+ /*.device=*/nullptr WGPU_COMMA \
1253
+ /*.description=*/nullptr WGPU_COMMA \
1254
+ /*.backendType=*/{} WGPU_COMMA \
1255
+ /*.adapterType=*/{} WGPU_COMMA \
1256
+ /*.vendorID=*/{} WGPU_COMMA \
1257
+ /*.deviceID=*/{} WGPU_COMMA \
1258
+ /*.compatibilityMode=*/false WGPU_COMMA \
1259
+ })
1260
+
1261
+ typedef struct WGPUAdapterProperties {
1262
+ WGPUChainedStructOut * nextInChain;
1263
+ uint32_t vendorID;
1264
+ char const * vendorName;
1265
+ char const * architecture;
1266
+ uint32_t deviceID;
1267
+ char const * name;
1268
+ char const * driverDescription;
1269
+ WGPUAdapterType adapterType;
1270
+ WGPUBackendType backendType;
1271
+ WGPUBool compatibilityMode;
1272
+ } WGPUAdapterProperties WGPU_STRUCTURE_ATTRIBUTE;
1273
+
1274
+ #define WGPU_ADAPTER_PROPERTIES_INIT WGPU_MAKE_INIT_STRUCT(WGPUAdapterProperties, { \
1275
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1276
+ /*.vendorID=*/{} WGPU_COMMA \
1277
+ /*.vendorName=*/nullptr WGPU_COMMA \
1278
+ /*.architecture=*/nullptr WGPU_COMMA \
1279
+ /*.deviceID=*/{} WGPU_COMMA \
1280
+ /*.name=*/nullptr WGPU_COMMA \
1281
+ /*.driverDescription=*/nullptr WGPU_COMMA \
1282
+ /*.adapterType=*/{} WGPU_COMMA \
1283
+ /*.backendType=*/{} WGPU_COMMA \
1284
+ /*.compatibilityMode=*/false WGPU_COMMA \
1285
+ })
1286
+
1287
+ // Can be chained in WGPUAdapterInfo
1288
+ // Can be chained in WGPUAdapterProperties
1289
+ typedef struct WGPUAdapterPropertiesD3D {
1290
+ WGPUChainedStructOut chain;
1291
+ uint32_t shaderModel;
1292
+ } WGPUAdapterPropertiesD3D WGPU_STRUCTURE_ATTRIBUTE;
1293
+
1294
+ #define WGPU_ADAPTER_PROPERTIES_D3D_INIT WGPU_MAKE_INIT_STRUCT(WGPUAdapterPropertiesD3D, { \
1295
+ /*.chain=*/{} WGPU_COMMA \
1296
+ /*.shaderModel=*/{} WGPU_COMMA \
1297
+ })
1298
+
1299
+ // Can be chained in WGPUAdapterInfo
1300
+ // Can be chained in WGPUAdapterProperties
1301
+ typedef struct WGPUAdapterPropertiesVk {
1302
+ WGPUChainedStructOut chain;
1303
+ uint32_t driverVersion;
1304
+ } WGPUAdapterPropertiesVk WGPU_STRUCTURE_ATTRIBUTE;
1305
+
1306
+ #define WGPU_ADAPTER_PROPERTIES_VK_INIT WGPU_MAKE_INIT_STRUCT(WGPUAdapterPropertiesVk, { \
1307
+ /*.chain=*/{} WGPU_COMMA \
1308
+ /*.driverVersion=*/{} WGPU_COMMA \
1309
+ })
1310
+
1311
+ typedef struct WGPUBindGroupEntry {
1312
+ WGPUChainedStruct const * nextInChain;
1313
+ uint32_t binding;
1314
+ WGPU_NULLABLE WGPUBuffer buffer;
1315
+ uint64_t offset;
1316
+ uint64_t size;
1317
+ WGPU_NULLABLE WGPUSampler sampler;
1318
+ WGPU_NULLABLE WGPUTextureView textureView;
1319
+ } WGPUBindGroupEntry WGPU_STRUCTURE_ATTRIBUTE;
1320
+
1321
+ #define WGPU_BIND_GROUP_ENTRY_INIT WGPU_MAKE_INIT_STRUCT(WGPUBindGroupEntry, { \
1322
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1323
+ /*.binding=*/{} WGPU_COMMA \
1324
+ /*.buffer=*/nullptr WGPU_COMMA \
1325
+ /*.offset=*/0 WGPU_COMMA \
1326
+ /*.size=*/WGPU_WHOLE_SIZE WGPU_COMMA \
1327
+ /*.sampler=*/nullptr WGPU_COMMA \
1328
+ /*.textureView=*/nullptr WGPU_COMMA \
1329
+ })
1330
+
1331
+ typedef struct WGPUBlendComponent {
1332
+ WGPUBlendOperation operation;
1333
+ WGPUBlendFactor srcFactor;
1334
+ WGPUBlendFactor dstFactor;
1335
+ } WGPUBlendComponent WGPU_STRUCTURE_ATTRIBUTE;
1336
+
1337
+ #define WGPU_BLEND_COMPONENT_INIT WGPU_MAKE_INIT_STRUCT(WGPUBlendComponent, { \
1338
+ /*.operation=*/WGPUBlendOperation_Add WGPU_COMMA \
1339
+ /*.srcFactor=*/WGPUBlendFactor_One WGPU_COMMA \
1340
+ /*.dstFactor=*/WGPUBlendFactor_Zero WGPU_COMMA \
1341
+ })
1342
+
1343
+ typedef struct WGPUBufferBindingLayout {
1344
+ WGPUChainedStruct const * nextInChain;
1345
+ WGPUBufferBindingType type;
1346
+ WGPUBool hasDynamicOffset;
1347
+ uint64_t minBindingSize;
1348
+ } WGPUBufferBindingLayout WGPU_STRUCTURE_ATTRIBUTE;
1349
+
1350
+ #define WGPU_BUFFER_BINDING_LAYOUT_INIT WGPU_MAKE_INIT_STRUCT(WGPUBufferBindingLayout, { \
1351
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1352
+ /*.type=*/WGPUBufferBindingType_Undefined WGPU_COMMA \
1353
+ /*.hasDynamicOffset=*/false WGPU_COMMA \
1354
+ /*.minBindingSize=*/0 WGPU_COMMA \
1355
+ })
1356
+
1357
+ typedef struct WGPUBufferDescriptor {
1358
+ WGPUChainedStruct const * nextInChain;
1359
+ WGPU_NULLABLE char const * label;
1360
+ WGPUBufferUsage usage;
1361
+ uint64_t size;
1362
+ WGPUBool mappedAtCreation;
1363
+ } WGPUBufferDescriptor WGPU_STRUCTURE_ATTRIBUTE;
1364
+
1365
+ #define WGPU_BUFFER_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUBufferDescriptor, { \
1366
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1367
+ /*.label=*/nullptr WGPU_COMMA \
1368
+ /*.usage=*/{} WGPU_COMMA \
1369
+ /*.size=*/{} WGPU_COMMA \
1370
+ /*.mappedAtCreation=*/false WGPU_COMMA \
1371
+ })
1372
+
1373
+ // Can be chained in WGPUBufferDescriptor
1374
+ typedef struct WGPUBufferHostMappedPointer {
1375
+ WGPUChainedStruct chain;
1376
+ void * pointer;
1377
+ WGPUCallback disposeCallback;
1378
+ void * userdata;
1379
+ } WGPUBufferHostMappedPointer WGPU_STRUCTURE_ATTRIBUTE;
1380
+
1381
+ #define WGPU_BUFFER_HOST_MAPPED_POINTER_INIT WGPU_MAKE_INIT_STRUCT(WGPUBufferHostMappedPointer, { \
1382
+ /*.chain=*/{} WGPU_COMMA \
1383
+ /*.pointer=*/{} WGPU_COMMA \
1384
+ /*.disposeCallback=*/{} WGPU_COMMA \
1385
+ /*.userdata=*/{} WGPU_COMMA \
1386
+ })
1387
+
1388
+ typedef struct WGPUBufferMapCallbackInfo {
1389
+ WGPUChainedStruct const * nextInChain;
1390
+ WGPUCallbackMode mode;
1391
+ WGPUBufferMapCallback callback;
1392
+ void * userdata;
1393
+ } WGPUBufferMapCallbackInfo WGPU_STRUCTURE_ATTRIBUTE;
1394
+
1395
+ #define WGPU_BUFFER_MAP_CALLBACK_INFO_INIT WGPU_MAKE_INIT_STRUCT(WGPUBufferMapCallbackInfo, { \
1396
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1397
+ /*.mode=*/{} WGPU_COMMA \
1398
+ /*.callback=*/{} WGPU_COMMA \
1399
+ /*.userdata=*/{} WGPU_COMMA \
1400
+ })
1401
+
1402
+ typedef struct WGPUColor {
1403
+ double r;
1404
+ double g;
1405
+ double b;
1406
+ double a;
1407
+ } WGPUColor WGPU_STRUCTURE_ATTRIBUTE;
1408
+
1409
+ #define WGPU_COLOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUColor, { \
1410
+ /*.r=*/{} WGPU_COMMA \
1411
+ /*.g=*/{} WGPU_COMMA \
1412
+ /*.b=*/{} WGPU_COMMA \
1413
+ /*.a=*/{} WGPU_COMMA \
1414
+ })
1415
+
1416
+ // Can be chained in WGPUColorTargetState
1417
+ typedef struct WGPUColorTargetStateExpandResolveTextureDawn {
1418
+ WGPUChainedStruct chain;
1419
+ WGPUBool enabled;
1420
+ } WGPUColorTargetStateExpandResolveTextureDawn WGPU_STRUCTURE_ATTRIBUTE;
1421
+
1422
+ #define WGPU_COLOR_TARGET_STATE_EXPAND_RESOLVE_TEXTURE_DAWN_INIT WGPU_MAKE_INIT_STRUCT(WGPUColorTargetStateExpandResolveTextureDawn, { \
1423
+ /*.chain=*/{} WGPU_COMMA \
1424
+ /*.enabled=*/false WGPU_COMMA \
1425
+ })
1426
+
1427
+ typedef struct WGPUCommandBufferDescriptor {
1428
+ WGPUChainedStruct const * nextInChain;
1429
+ WGPU_NULLABLE char const * label;
1430
+ } WGPUCommandBufferDescriptor WGPU_STRUCTURE_ATTRIBUTE;
1431
+
1432
+ #define WGPU_COMMAND_BUFFER_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUCommandBufferDescriptor, { \
1433
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1434
+ /*.label=*/nullptr WGPU_COMMA \
1435
+ })
1436
+
1437
+ typedef struct WGPUCommandEncoderDescriptor {
1438
+ WGPUChainedStruct const * nextInChain;
1439
+ WGPU_NULLABLE char const * label;
1440
+ } WGPUCommandEncoderDescriptor WGPU_STRUCTURE_ATTRIBUTE;
1441
+
1442
+ #define WGPU_COMMAND_ENCODER_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUCommandEncoderDescriptor, { \
1443
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1444
+ /*.label=*/nullptr WGPU_COMMA \
1445
+ })
1446
+
1447
+ typedef struct WGPUCompilationInfoCallbackInfo {
1448
+ WGPUChainedStruct const * nextInChain;
1449
+ WGPUCallbackMode mode;
1450
+ WGPUCompilationInfoCallback callback;
1451
+ void * userdata;
1452
+ } WGPUCompilationInfoCallbackInfo WGPU_STRUCTURE_ATTRIBUTE;
1453
+
1454
+ #define WGPU_COMPILATION_INFO_CALLBACK_INFO_INIT WGPU_MAKE_INIT_STRUCT(WGPUCompilationInfoCallbackInfo, { \
1455
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1456
+ /*.mode=*/{} WGPU_COMMA \
1457
+ /*.callback=*/{} WGPU_COMMA \
1458
+ /*.userdata=*/nullptr WGPU_COMMA \
1459
+ })
1460
+
1461
+ typedef struct WGPUCompilationMessage {
1462
+ WGPUChainedStruct const * nextInChain;
1463
+ WGPU_NULLABLE char const * message;
1464
+ WGPUCompilationMessageType type;
1465
+ uint64_t lineNum;
1466
+ uint64_t linePos;
1467
+ uint64_t offset;
1468
+ uint64_t length;
1469
+ uint64_t utf16LinePos;
1470
+ uint64_t utf16Offset;
1471
+ uint64_t utf16Length;
1472
+ } WGPUCompilationMessage WGPU_STRUCTURE_ATTRIBUTE;
1473
+
1474
+ #define WGPU_COMPILATION_MESSAGE_INIT WGPU_MAKE_INIT_STRUCT(WGPUCompilationMessage, { \
1475
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1476
+ /*.message=*/nullptr WGPU_COMMA \
1477
+ /*.type=*/{} WGPU_COMMA \
1478
+ /*.lineNum=*/{} WGPU_COMMA \
1479
+ /*.linePos=*/{} WGPU_COMMA \
1480
+ /*.offset=*/{} WGPU_COMMA \
1481
+ /*.length=*/{} WGPU_COMMA \
1482
+ /*.utf16LinePos=*/{} WGPU_COMMA \
1483
+ /*.utf16Offset=*/{} WGPU_COMMA \
1484
+ /*.utf16Length=*/{} WGPU_COMMA \
1485
+ })
1486
+
1487
+ typedef struct WGPUComputePassTimestampWrites {
1488
+ WGPUQuerySet querySet;
1489
+ uint32_t beginningOfPassWriteIndex;
1490
+ uint32_t endOfPassWriteIndex;
1491
+ } WGPUComputePassTimestampWrites WGPU_STRUCTURE_ATTRIBUTE;
1492
+
1493
+ #define WGPU_COMPUTE_PASS_TIMESTAMP_WRITES_INIT WGPU_MAKE_INIT_STRUCT(WGPUComputePassTimestampWrites, { \
1494
+ /*.querySet=*/{} WGPU_COMMA \
1495
+ /*.beginningOfPassWriteIndex=*/WGPU_QUERY_SET_INDEX_UNDEFINED WGPU_COMMA \
1496
+ /*.endOfPassWriteIndex=*/WGPU_QUERY_SET_INDEX_UNDEFINED WGPU_COMMA \
1497
+ })
1498
+
1499
+ typedef struct WGPUConstantEntry {
1500
+ WGPUChainedStruct const * nextInChain;
1501
+ char const * key;
1502
+ double value;
1503
+ } WGPUConstantEntry WGPU_STRUCTURE_ATTRIBUTE;
1504
+
1505
+ #define WGPU_CONSTANT_ENTRY_INIT WGPU_MAKE_INIT_STRUCT(WGPUConstantEntry, { \
1506
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1507
+ /*.key=*/{} WGPU_COMMA \
1508
+ /*.value=*/{} WGPU_COMMA \
1509
+ })
1510
+
1511
+ typedef struct WGPUCopyTextureForBrowserOptions {
1512
+ WGPUChainedStruct const * nextInChain;
1513
+ WGPUBool flipY;
1514
+ WGPUBool needsColorSpaceConversion;
1515
+ WGPUAlphaMode srcAlphaMode;
1516
+ WGPU_NULLABLE float const * srcTransferFunctionParameters;
1517
+ WGPU_NULLABLE float const * conversionMatrix;
1518
+ WGPU_NULLABLE float const * dstTransferFunctionParameters;
1519
+ WGPUAlphaMode dstAlphaMode;
1520
+ WGPUBool internalUsage;
1521
+ } WGPUCopyTextureForBrowserOptions WGPU_STRUCTURE_ATTRIBUTE;
1522
+
1523
+ #define WGPU_COPY_TEXTURE_FOR_BROWSER_OPTIONS_INIT WGPU_MAKE_INIT_STRUCT(WGPUCopyTextureForBrowserOptions, { \
1524
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1525
+ /*.flipY=*/false WGPU_COMMA \
1526
+ /*.needsColorSpaceConversion=*/false WGPU_COMMA \
1527
+ /*.srcAlphaMode=*/WGPUAlphaMode_Unpremultiplied WGPU_COMMA \
1528
+ /*.srcTransferFunctionParameters=*/nullptr WGPU_COMMA \
1529
+ /*.conversionMatrix=*/nullptr WGPU_COMMA \
1530
+ /*.dstTransferFunctionParameters=*/nullptr WGPU_COMMA \
1531
+ /*.dstAlphaMode=*/WGPUAlphaMode_Unpremultiplied WGPU_COMMA \
1532
+ /*.internalUsage=*/false WGPU_COMMA \
1533
+ })
1534
+
1535
+ typedef struct WGPUCreateComputePipelineAsyncCallbackInfo {
1536
+ WGPUChainedStruct const * nextInChain;
1537
+ WGPUCallbackMode mode;
1538
+ WGPUCreateComputePipelineAsyncCallback callback;
1539
+ void * userdata;
1540
+ } WGPUCreateComputePipelineAsyncCallbackInfo WGPU_STRUCTURE_ATTRIBUTE;
1541
+
1542
+ #define WGPU_CREATE_COMPUTE_PIPELINE_ASYNC_CALLBACK_INFO_INIT WGPU_MAKE_INIT_STRUCT(WGPUCreateComputePipelineAsyncCallbackInfo, { \
1543
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1544
+ /*.mode=*/{} WGPU_COMMA \
1545
+ /*.callback=*/{} WGPU_COMMA \
1546
+ /*.userdata=*/{} WGPU_COMMA \
1547
+ })
1548
+
1549
+ typedef struct WGPUCreateRenderPipelineAsyncCallbackInfo {
1550
+ WGPUChainedStruct const * nextInChain;
1551
+ WGPUCallbackMode mode;
1552
+ WGPUCreateRenderPipelineAsyncCallback callback;
1553
+ void * userdata;
1554
+ } WGPUCreateRenderPipelineAsyncCallbackInfo WGPU_STRUCTURE_ATTRIBUTE;
1555
+
1556
+ #define WGPU_CREATE_RENDER_PIPELINE_ASYNC_CALLBACK_INFO_INIT WGPU_MAKE_INIT_STRUCT(WGPUCreateRenderPipelineAsyncCallbackInfo, { \
1557
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1558
+ /*.mode=*/{} WGPU_COMMA \
1559
+ /*.callback=*/{} WGPU_COMMA \
1560
+ /*.userdata=*/{} WGPU_COMMA \
1561
+ })
1562
+
1563
+ // Can be chained in WGPUInstanceDescriptor
1564
+ typedef struct WGPUDawnWGSLBlocklist {
1565
+ WGPUChainedStruct chain;
1566
+ size_t blocklistedFeatureCount;
1567
+ const char* const * blocklistedFeatures;
1568
+ } WGPUDawnWGSLBlocklist WGPU_STRUCTURE_ATTRIBUTE;
1569
+
1570
+ #define WGPU_DAWN_WGSL_BLOCKLIST_INIT WGPU_MAKE_INIT_STRUCT(WGPUDawnWGSLBlocklist, { \
1571
+ /*.chain=*/{} WGPU_COMMA \
1572
+ /*.blocklistedFeatureCount=*/0 WGPU_COMMA \
1573
+ /*.blocklistedFeatures=*/{} WGPU_COMMA \
1574
+ })
1575
+
1576
+ // Can be chained in WGPUAdapterInfo
1577
+ // Can be chained in WGPUAdapterProperties
1578
+ typedef struct WGPUDawnAdapterPropertiesPowerPreference {
1579
+ WGPUChainedStructOut chain;
1580
+ WGPUPowerPreference powerPreference;
1581
+ } WGPUDawnAdapterPropertiesPowerPreference WGPU_STRUCTURE_ATTRIBUTE;
1582
+
1583
+ #define WGPU_DAWN_ADAPTER_PROPERTIES_POWER_PREFERENCE_INIT WGPU_MAKE_INIT_STRUCT(WGPUDawnAdapterPropertiesPowerPreference, { \
1584
+ /*.chain=*/{} WGPU_COMMA \
1585
+ /*.powerPreference=*/WGPUPowerPreference_Undefined WGPU_COMMA \
1586
+ })
1587
+
1588
+ // Can be chained in WGPUBufferDescriptor
1589
+ typedef struct WGPUDawnBufferDescriptorErrorInfoFromWireClient {
1590
+ WGPUChainedStruct chain;
1591
+ WGPUBool outOfMemory;
1592
+ } WGPUDawnBufferDescriptorErrorInfoFromWireClient WGPU_STRUCTURE_ATTRIBUTE;
1593
+
1594
+ #define WGPU_DAWN_BUFFER_DESCRIPTOR_ERROR_INFO_FROM_WIRE_CLIENT_INIT WGPU_MAKE_INIT_STRUCT(WGPUDawnBufferDescriptorErrorInfoFromWireClient, { \
1595
+ /*.chain=*/{} WGPU_COMMA \
1596
+ /*.outOfMemory=*/false WGPU_COMMA \
1597
+ })
1598
+
1599
+ // Can be chained in WGPUDeviceDescriptor
1600
+ typedef struct WGPUDawnCacheDeviceDescriptor {
1601
+ WGPUChainedStruct chain;
1602
+ char const * isolationKey;
1603
+ WGPUDawnLoadCacheDataFunction loadDataFunction;
1604
+ WGPUDawnStoreCacheDataFunction storeDataFunction;
1605
+ void * functionUserdata;
1606
+ } WGPUDawnCacheDeviceDescriptor WGPU_STRUCTURE_ATTRIBUTE;
1607
+
1608
+ #define WGPU_DAWN_CACHE_DEVICE_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUDawnCacheDeviceDescriptor, { \
1609
+ /*.chain=*/{} WGPU_COMMA \
1610
+ /*.isolationKey=*/"" WGPU_COMMA \
1611
+ /*.loadDataFunction=*/nullptr WGPU_COMMA \
1612
+ /*.storeDataFunction=*/nullptr WGPU_COMMA \
1613
+ /*.functionUserdata=*/nullptr WGPU_COMMA \
1614
+ })
1615
+
1616
+ // Can be chained in WGPUComputePipelineDescriptor
1617
+ typedef struct WGPUDawnComputePipelineFullSubgroups {
1618
+ WGPUChainedStruct chain;
1619
+ WGPUBool requiresFullSubgroups;
1620
+ } WGPUDawnComputePipelineFullSubgroups WGPU_STRUCTURE_ATTRIBUTE;
1621
+
1622
+ #define WGPU_DAWN_COMPUTE_PIPELINE_FULL_SUBGROUPS_INIT WGPU_MAKE_INIT_STRUCT(WGPUDawnComputePipelineFullSubgroups, { \
1623
+ /*.chain=*/{} WGPU_COMMA \
1624
+ /*.requiresFullSubgroups=*/false WGPU_COMMA \
1625
+ })
1626
+
1627
+ // Can be chained in WGPUCommandEncoderDescriptor
1628
+ typedef struct WGPUDawnEncoderInternalUsageDescriptor {
1629
+ WGPUChainedStruct chain;
1630
+ WGPUBool useInternalUsages;
1631
+ } WGPUDawnEncoderInternalUsageDescriptor WGPU_STRUCTURE_ATTRIBUTE;
1632
+
1633
+ #define WGPU_DAWN_ENCODER_INTERNAL_USAGE_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUDawnEncoderInternalUsageDescriptor, { \
1634
+ /*.chain=*/{} WGPU_COMMA \
1635
+ /*.useInternalUsages=*/false WGPU_COMMA \
1636
+ })
1637
+
1638
+ // Can be chained in WGPUSupportedLimits
1639
+ typedef struct WGPUDawnExperimentalSubgroupLimits {
1640
+ WGPUChainedStructOut chain;
1641
+ uint32_t minSubgroupSize;
1642
+ uint32_t maxSubgroupSize;
1643
+ } WGPUDawnExperimentalSubgroupLimits WGPU_STRUCTURE_ATTRIBUTE;
1644
+
1645
+ #define WGPU_DAWN_EXPERIMENTAL_SUBGROUP_LIMITS_INIT WGPU_MAKE_INIT_STRUCT(WGPUDawnExperimentalSubgroupLimits, { \
1646
+ /*.chain=*/{} WGPU_COMMA \
1647
+ /*.minSubgroupSize=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1648
+ /*.maxSubgroupSize=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1649
+ })
1650
+
1651
+ // Can be chained in WGPURenderPassColorAttachment
1652
+ typedef struct WGPUDawnRenderPassColorAttachmentRenderToSingleSampled {
1653
+ WGPUChainedStruct chain;
1654
+ uint32_t implicitSampleCount;
1655
+ } WGPUDawnRenderPassColorAttachmentRenderToSingleSampled WGPU_STRUCTURE_ATTRIBUTE;
1656
+
1657
+ #define WGPU_DAWN_RENDER_PASS_COLOR_ATTACHMENT_RENDER_TO_SINGLE_SAMPLED_INIT WGPU_MAKE_INIT_STRUCT(WGPUDawnRenderPassColorAttachmentRenderToSingleSampled, { \
1658
+ /*.chain=*/{} WGPU_COMMA \
1659
+ /*.implicitSampleCount=*/1 WGPU_COMMA \
1660
+ })
1661
+
1662
+ // Can be chained in WGPUShaderModuleDescriptor
1663
+ typedef struct WGPUDawnShaderModuleSPIRVOptionsDescriptor {
1664
+ WGPUChainedStruct chain;
1665
+ WGPUBool allowNonUniformDerivatives;
1666
+ } WGPUDawnShaderModuleSPIRVOptionsDescriptor WGPU_STRUCTURE_ATTRIBUTE;
1667
+
1668
+ #define WGPU_DAWN_SHADER_MODULE_SPIRV_OPTIONS_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUDawnShaderModuleSPIRVOptionsDescriptor, { \
1669
+ /*.chain=*/{} WGPU_COMMA \
1670
+ /*.allowNonUniformDerivatives=*/false WGPU_COMMA \
1671
+ })
1672
+
1673
+ // Can be chained in WGPUTextureDescriptor
1674
+ typedef struct WGPUDawnTextureInternalUsageDescriptor {
1675
+ WGPUChainedStruct chain;
1676
+ WGPUTextureUsage internalUsage;
1677
+ } WGPUDawnTextureInternalUsageDescriptor WGPU_STRUCTURE_ATTRIBUTE;
1678
+
1679
+ #define WGPU_DAWN_TEXTURE_INTERNAL_USAGE_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUDawnTextureInternalUsageDescriptor, { \
1680
+ /*.chain=*/{} WGPU_COMMA \
1681
+ /*.internalUsage=*/WGPUTextureUsage_None WGPU_COMMA \
1682
+ })
1683
+
1684
+ // Can be chained in WGPUInstanceDescriptor
1685
+ // Can be chained in WGPURequestAdapterOptions
1686
+ // Can be chained in WGPUDeviceDescriptor
1687
+ typedef struct WGPUDawnTogglesDescriptor {
1688
+ WGPUChainedStruct chain;
1689
+ size_t enabledToggleCount;
1690
+ const char* const * enabledToggles;
1691
+ size_t disabledToggleCount;
1692
+ const char* const * disabledToggles;
1693
+ } WGPUDawnTogglesDescriptor WGPU_STRUCTURE_ATTRIBUTE;
1694
+
1695
+ #define WGPU_DAWN_TOGGLES_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUDawnTogglesDescriptor, { \
1696
+ /*.chain=*/{} WGPU_COMMA \
1697
+ /*.enabledToggleCount=*/0 WGPU_COMMA \
1698
+ /*.enabledToggles=*/{} WGPU_COMMA \
1699
+ /*.disabledToggleCount=*/0 WGPU_COMMA \
1700
+ /*.disabledToggles=*/{} WGPU_COMMA \
1701
+ })
1702
+
1703
+ // Can be chained in WGPUInstanceDescriptor
1704
+ typedef struct WGPUDawnWireWGSLControl {
1705
+ WGPUChainedStruct chain;
1706
+ WGPUBool enableExperimental;
1707
+ WGPUBool enableUnsafe;
1708
+ WGPUBool enableTesting;
1709
+ } WGPUDawnWireWGSLControl WGPU_STRUCTURE_ATTRIBUTE;
1710
+
1711
+ #define WGPU_DAWN_WIRE_WGSL_CONTROL_INIT WGPU_MAKE_INIT_STRUCT(WGPUDawnWireWGSLControl, { \
1712
+ /*.chain=*/{} WGPU_COMMA \
1713
+ /*.enableExperimental=*/false WGPU_COMMA \
1714
+ /*.enableUnsafe=*/false WGPU_COMMA \
1715
+ /*.enableTesting=*/false WGPU_COMMA \
1716
+ })
1717
+
1718
+ // Can be chained in WGPUDepthStencilState
1719
+ typedef struct WGPUDepthStencilStateDepthWriteDefinedDawn {
1720
+ WGPUChainedStruct chain;
1721
+ WGPUBool depthWriteDefined;
1722
+ } WGPUDepthStencilStateDepthWriteDefinedDawn WGPU_STRUCTURE_ATTRIBUTE;
1723
+
1724
+ #define WGPU_DEPTH_STENCIL_STATE_DEPTH_WRITE_DEFINED_DAWN_INIT WGPU_MAKE_INIT_STRUCT(WGPUDepthStencilStateDepthWriteDefinedDawn, { \
1725
+ /*.chain=*/{} WGPU_COMMA \
1726
+ /*.depthWriteDefined=*/{} WGPU_COMMA \
1727
+ })
1728
+
1729
+ typedef struct WGPUDeviceLostCallbackInfo {
1730
+ WGPUChainedStruct const * nextInChain;
1731
+ WGPUCallbackMode mode;
1732
+ WGPUDeviceLostCallbackNew callback;
1733
+ void * userdata;
1734
+ } WGPUDeviceLostCallbackInfo WGPU_STRUCTURE_ATTRIBUTE;
1735
+
1736
+ #define WGPU_DEVICE_LOST_CALLBACK_INFO_INIT WGPU_MAKE_INIT_STRUCT(WGPUDeviceLostCallbackInfo, { \
1737
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1738
+ /*.mode=*/WGPUCallbackMode_WaitAnyOnly WGPU_COMMA \
1739
+ /*.callback=*/nullptr WGPU_COMMA \
1740
+ /*.userdata=*/nullptr WGPU_COMMA \
1741
+ })
1742
+
1743
+ typedef struct WGPUDrmFormatProperties {
1744
+ uint64_t modifier;
1745
+ uint32_t modifierPlaneCount;
1746
+ } WGPUDrmFormatProperties WGPU_STRUCTURE_ATTRIBUTE;
1747
+
1748
+ #define WGPU_DRM_FORMAT_PROPERTIES_INIT WGPU_MAKE_INIT_STRUCT(WGPUDrmFormatProperties, { \
1749
+ /*.modifier=*/{} WGPU_COMMA \
1750
+ /*.modifierPlaneCount=*/{} WGPU_COMMA \
1751
+ })
1752
+
1753
+ typedef struct WGPUExtent2D {
1754
+ uint32_t width;
1755
+ uint32_t height;
1756
+ } WGPUExtent2D WGPU_STRUCTURE_ATTRIBUTE;
1757
+
1758
+ #define WGPU_EXTENT_2D_INIT WGPU_MAKE_INIT_STRUCT(WGPUExtent2D, { \
1759
+ /*.width=*/{} WGPU_COMMA \
1760
+ /*.height=*/{} WGPU_COMMA \
1761
+ })
1762
+
1763
+ typedef struct WGPUExtent3D {
1764
+ uint32_t width;
1765
+ uint32_t height;
1766
+ uint32_t depthOrArrayLayers;
1767
+ } WGPUExtent3D WGPU_STRUCTURE_ATTRIBUTE;
1768
+
1769
+ #define WGPU_EXTENT_3D_INIT WGPU_MAKE_INIT_STRUCT(WGPUExtent3D, { \
1770
+ /*.width=*/{} WGPU_COMMA \
1771
+ /*.height=*/1 WGPU_COMMA \
1772
+ /*.depthOrArrayLayers=*/1 WGPU_COMMA \
1773
+ })
1774
+
1775
+ // Can be chained in WGPUBindGroupEntry
1776
+ typedef struct WGPUExternalTextureBindingEntry {
1777
+ WGPUChainedStruct chain;
1778
+ WGPUExternalTexture externalTexture;
1779
+ } WGPUExternalTextureBindingEntry WGPU_STRUCTURE_ATTRIBUTE;
1780
+
1781
+ #define WGPU_EXTERNAL_TEXTURE_BINDING_ENTRY_INIT WGPU_MAKE_INIT_STRUCT(WGPUExternalTextureBindingEntry, { \
1782
+ /*.chain=*/{} WGPU_COMMA \
1783
+ /*.externalTexture=*/{} WGPU_COMMA \
1784
+ })
1785
+
1786
+ // Can be chained in WGPUBindGroupLayoutEntry
1787
+ typedef struct WGPUExternalTextureBindingLayout {
1788
+ WGPUChainedStruct chain;
1789
+ } WGPUExternalTextureBindingLayout WGPU_STRUCTURE_ATTRIBUTE;
1790
+
1791
+ #define WGPU_EXTERNAL_TEXTURE_BINDING_LAYOUT_INIT WGPU_MAKE_INIT_STRUCT(WGPUExternalTextureBindingLayout, { \
1792
+ /*.chain=*/{} WGPU_COMMA \
1793
+ })
1794
+
1795
+ typedef struct WGPUFormatCapabilities {
1796
+ WGPUChainedStructOut * nextInChain;
1797
+ } WGPUFormatCapabilities WGPU_STRUCTURE_ATTRIBUTE;
1798
+
1799
+ #define WGPU_FORMAT_CAPABILITIES_INIT WGPU_MAKE_INIT_STRUCT(WGPUFormatCapabilities, { \
1800
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1801
+ })
1802
+
1803
+ typedef struct WGPUFuture {
1804
+ uint64_t id;
1805
+ } WGPUFuture WGPU_STRUCTURE_ATTRIBUTE;
1806
+
1807
+ #define WGPU_FUTURE_INIT WGPU_MAKE_INIT_STRUCT(WGPUFuture, { \
1808
+ /*.id=*/{} WGPU_COMMA \
1809
+ })
1810
+
1811
+ typedef struct WGPUInstanceFeatures {
1812
+ WGPUChainedStruct const * nextInChain;
1813
+ WGPUBool timedWaitAnyEnable;
1814
+ size_t timedWaitAnyMaxCount;
1815
+ } WGPUInstanceFeatures WGPU_STRUCTURE_ATTRIBUTE;
1816
+
1817
+ #define WGPU_INSTANCE_FEATURES_INIT WGPU_MAKE_INIT_STRUCT(WGPUInstanceFeatures, { \
1818
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1819
+ /*.timedWaitAnyEnable=*/false WGPU_COMMA \
1820
+ /*.timedWaitAnyMaxCount=*/0 WGPU_COMMA \
1821
+ })
1822
+
1823
+ typedef struct WGPULimits {
1824
+ uint32_t maxTextureDimension1D;
1825
+ uint32_t maxTextureDimension2D;
1826
+ uint32_t maxTextureDimension3D;
1827
+ uint32_t maxTextureArrayLayers;
1828
+ uint32_t maxBindGroups;
1829
+ uint32_t maxBindGroupsPlusVertexBuffers;
1830
+ uint32_t maxBindingsPerBindGroup;
1831
+ uint32_t maxDynamicUniformBuffersPerPipelineLayout;
1832
+ uint32_t maxDynamicStorageBuffersPerPipelineLayout;
1833
+ uint32_t maxSampledTexturesPerShaderStage;
1834
+ uint32_t maxSamplersPerShaderStage;
1835
+ uint32_t maxStorageBuffersPerShaderStage;
1836
+ uint32_t maxStorageTexturesPerShaderStage;
1837
+ uint32_t maxUniformBuffersPerShaderStage;
1838
+ uint64_t maxUniformBufferBindingSize;
1839
+ uint64_t maxStorageBufferBindingSize;
1840
+ uint32_t minUniformBufferOffsetAlignment;
1841
+ uint32_t minStorageBufferOffsetAlignment;
1842
+ uint32_t maxVertexBuffers;
1843
+ uint64_t maxBufferSize;
1844
+ uint32_t maxVertexAttributes;
1845
+ uint32_t maxVertexBufferArrayStride;
1846
+ uint32_t maxInterStageShaderComponents;
1847
+ uint32_t maxInterStageShaderVariables;
1848
+ uint32_t maxColorAttachments;
1849
+ uint32_t maxColorAttachmentBytesPerSample;
1850
+ uint32_t maxComputeWorkgroupStorageSize;
1851
+ uint32_t maxComputeInvocationsPerWorkgroup;
1852
+ uint32_t maxComputeWorkgroupSizeX;
1853
+ uint32_t maxComputeWorkgroupSizeY;
1854
+ uint32_t maxComputeWorkgroupSizeZ;
1855
+ uint32_t maxComputeWorkgroupsPerDimension;
1856
+ } WGPULimits WGPU_STRUCTURE_ATTRIBUTE;
1857
+
1858
+ #define WGPU_LIMITS_INIT WGPU_MAKE_INIT_STRUCT(WGPULimits, { \
1859
+ /*.maxTextureDimension1D=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1860
+ /*.maxTextureDimension2D=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1861
+ /*.maxTextureDimension3D=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1862
+ /*.maxTextureArrayLayers=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1863
+ /*.maxBindGroups=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1864
+ /*.maxBindGroupsPlusVertexBuffers=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1865
+ /*.maxBindingsPerBindGroup=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1866
+ /*.maxDynamicUniformBuffersPerPipelineLayout=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1867
+ /*.maxDynamicStorageBuffersPerPipelineLayout=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1868
+ /*.maxSampledTexturesPerShaderStage=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1869
+ /*.maxSamplersPerShaderStage=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1870
+ /*.maxStorageBuffersPerShaderStage=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1871
+ /*.maxStorageTexturesPerShaderStage=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1872
+ /*.maxUniformBuffersPerShaderStage=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1873
+ /*.maxUniformBufferBindingSize=*/WGPU_LIMIT_U64_UNDEFINED WGPU_COMMA \
1874
+ /*.maxStorageBufferBindingSize=*/WGPU_LIMIT_U64_UNDEFINED WGPU_COMMA \
1875
+ /*.minUniformBufferOffsetAlignment=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1876
+ /*.minStorageBufferOffsetAlignment=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1877
+ /*.maxVertexBuffers=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1878
+ /*.maxBufferSize=*/WGPU_LIMIT_U64_UNDEFINED WGPU_COMMA \
1879
+ /*.maxVertexAttributes=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1880
+ /*.maxVertexBufferArrayStride=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1881
+ /*.maxInterStageShaderComponents=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1882
+ /*.maxInterStageShaderVariables=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1883
+ /*.maxColorAttachments=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1884
+ /*.maxColorAttachmentBytesPerSample=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1885
+ /*.maxComputeWorkgroupStorageSize=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1886
+ /*.maxComputeInvocationsPerWorkgroup=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1887
+ /*.maxComputeWorkgroupSizeX=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1888
+ /*.maxComputeWorkgroupSizeY=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1889
+ /*.maxComputeWorkgroupSizeZ=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1890
+ /*.maxComputeWorkgroupsPerDimension=*/WGPU_LIMIT_U32_UNDEFINED WGPU_COMMA \
1891
+ })
1892
+
1893
+ typedef struct WGPUMemoryHeapInfo {
1894
+ WGPUHeapProperty properties;
1895
+ uint64_t size;
1896
+ } WGPUMemoryHeapInfo WGPU_STRUCTURE_ATTRIBUTE;
1897
+
1898
+ #define WGPU_MEMORY_HEAP_INFO_INIT WGPU_MAKE_INIT_STRUCT(WGPUMemoryHeapInfo, { \
1899
+ /*.properties=*/{} WGPU_COMMA \
1900
+ /*.size=*/{} WGPU_COMMA \
1901
+ })
1902
+
1903
+ typedef struct WGPUMultisampleState {
1904
+ WGPUChainedStruct const * nextInChain;
1905
+ uint32_t count;
1906
+ uint32_t mask;
1907
+ WGPUBool alphaToCoverageEnabled;
1908
+ } WGPUMultisampleState WGPU_STRUCTURE_ATTRIBUTE;
1909
+
1910
+ #define WGPU_MULTISAMPLE_STATE_INIT WGPU_MAKE_INIT_STRUCT(WGPUMultisampleState, { \
1911
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1912
+ /*.count=*/1 WGPU_COMMA \
1913
+ /*.mask=*/0xFFFFFFFF WGPU_COMMA \
1914
+ /*.alphaToCoverageEnabled=*/false WGPU_COMMA \
1915
+ })
1916
+
1917
+ typedef struct WGPUOrigin2D {
1918
+ uint32_t x;
1919
+ uint32_t y;
1920
+ } WGPUOrigin2D WGPU_STRUCTURE_ATTRIBUTE;
1921
+
1922
+ #define WGPU_ORIGIN_2D_INIT WGPU_MAKE_INIT_STRUCT(WGPUOrigin2D, { \
1923
+ /*.x=*/0 WGPU_COMMA \
1924
+ /*.y=*/0 WGPU_COMMA \
1925
+ })
1926
+
1927
+ typedef struct WGPUOrigin3D {
1928
+ uint32_t x;
1929
+ uint32_t y;
1930
+ uint32_t z;
1931
+ } WGPUOrigin3D WGPU_STRUCTURE_ATTRIBUTE;
1932
+
1933
+ #define WGPU_ORIGIN_3D_INIT WGPU_MAKE_INIT_STRUCT(WGPUOrigin3D, { \
1934
+ /*.x=*/0 WGPU_COMMA \
1935
+ /*.y=*/0 WGPU_COMMA \
1936
+ /*.z=*/0 WGPU_COMMA \
1937
+ })
1938
+
1939
+ typedef struct WGPUPipelineLayoutDescriptor {
1940
+ WGPUChainedStruct const * nextInChain;
1941
+ WGPU_NULLABLE char const * label;
1942
+ size_t bindGroupLayoutCount;
1943
+ WGPUBindGroupLayout const * bindGroupLayouts;
1944
+ } WGPUPipelineLayoutDescriptor WGPU_STRUCTURE_ATTRIBUTE;
1945
+
1946
+ #define WGPU_PIPELINE_LAYOUT_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUPipelineLayoutDescriptor, { \
1947
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1948
+ /*.label=*/nullptr WGPU_COMMA \
1949
+ /*.bindGroupLayoutCount=*/{} WGPU_COMMA \
1950
+ /*.bindGroupLayouts=*/{} WGPU_COMMA \
1951
+ })
1952
+
1953
+ typedef struct WGPUPipelineLayoutStorageAttachment {
1954
+ WGPUChainedStruct const * nextInChain;
1955
+ uint64_t offset;
1956
+ WGPUTextureFormat format;
1957
+ } WGPUPipelineLayoutStorageAttachment WGPU_STRUCTURE_ATTRIBUTE;
1958
+
1959
+ #define WGPU_PIPELINE_LAYOUT_STORAGE_ATTACHMENT_INIT WGPU_MAKE_INIT_STRUCT(WGPUPipelineLayoutStorageAttachment, { \
1960
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1961
+ /*.offset=*/0 WGPU_COMMA \
1962
+ /*.format=*/{} WGPU_COMMA \
1963
+ })
1964
+
1965
+ typedef struct WGPUPopErrorScopeCallbackInfo {
1966
+ WGPUChainedStruct const * nextInChain;
1967
+ WGPUCallbackMode mode;
1968
+ WGPUPopErrorScopeCallback callback;
1969
+ WGPUErrorCallback oldCallback;
1970
+ void * userdata;
1971
+ } WGPUPopErrorScopeCallbackInfo WGPU_STRUCTURE_ATTRIBUTE;
1972
+
1973
+ #define WGPU_POP_ERROR_SCOPE_CALLBACK_INFO_INIT WGPU_MAKE_INIT_STRUCT(WGPUPopErrorScopeCallbackInfo, { \
1974
+ /*.nextInChain=*/nullptr WGPU_COMMA \
1975
+ /*.mode=*/WGPUCallbackMode_WaitAnyOnly WGPU_COMMA \
1976
+ /*.callback=*/{} WGPU_COMMA \
1977
+ /*.oldCallback=*/{} WGPU_COMMA \
1978
+ /*.userdata=*/nullptr WGPU_COMMA \
1979
+ })
1980
+
1981
+ // Can be chained in WGPUPrimitiveState
1982
+ typedef struct WGPUPrimitiveDepthClipControl {
1983
+ WGPUChainedStruct chain;
1984
+ WGPUBool unclippedDepth;
1985
+ } WGPUPrimitiveDepthClipControl WGPU_STRUCTURE_ATTRIBUTE;
1986
+
1987
+ #define WGPU_PRIMITIVE_DEPTH_CLIP_CONTROL_INIT WGPU_MAKE_INIT_STRUCT(WGPUPrimitiveDepthClipControl, { \
1988
+ /*.chain=*/{} WGPU_COMMA \
1989
+ /*.unclippedDepth=*/false WGPU_COMMA \
1990
+ })
1991
+
1992
+ typedef struct WGPUPrimitiveState {
1993
+ WGPUChainedStruct const * nextInChain;
1994
+ WGPUPrimitiveTopology topology;
1995
+ WGPUIndexFormat stripIndexFormat;
1996
+ WGPUFrontFace frontFace;
1997
+ WGPUCullMode cullMode;
1998
+ } WGPUPrimitiveState WGPU_STRUCTURE_ATTRIBUTE;
1999
+
2000
+ #define WGPU_PRIMITIVE_STATE_INIT WGPU_MAKE_INIT_STRUCT(WGPUPrimitiveState, { \
2001
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2002
+ /*.topology=*/WGPUPrimitiveTopology_TriangleList WGPU_COMMA \
2003
+ /*.stripIndexFormat=*/WGPUIndexFormat_Undefined WGPU_COMMA \
2004
+ /*.frontFace=*/WGPUFrontFace_CCW WGPU_COMMA \
2005
+ /*.cullMode=*/WGPUCullMode_None WGPU_COMMA \
2006
+ })
2007
+
2008
+ typedef struct WGPUQuerySetDescriptor {
2009
+ WGPUChainedStruct const * nextInChain;
2010
+ WGPU_NULLABLE char const * label;
2011
+ WGPUQueryType type;
2012
+ uint32_t count;
2013
+ } WGPUQuerySetDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2014
+
2015
+ #define WGPU_QUERY_SET_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUQuerySetDescriptor, { \
2016
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2017
+ /*.label=*/nullptr WGPU_COMMA \
2018
+ /*.type=*/{} WGPU_COMMA \
2019
+ /*.count=*/{} WGPU_COMMA \
2020
+ })
2021
+
2022
+ typedef struct WGPUQueueDescriptor {
2023
+ WGPUChainedStruct const * nextInChain;
2024
+ WGPU_NULLABLE char const * label;
2025
+ } WGPUQueueDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2026
+
2027
+ #define WGPU_QUEUE_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUQueueDescriptor, { \
2028
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2029
+ /*.label=*/nullptr WGPU_COMMA \
2030
+ })
2031
+
2032
+ typedef struct WGPUQueueWorkDoneCallbackInfo {
2033
+ WGPUChainedStruct const * nextInChain;
2034
+ WGPUCallbackMode mode;
2035
+ WGPUQueueWorkDoneCallback callback;
2036
+ void * userdata;
2037
+ } WGPUQueueWorkDoneCallbackInfo WGPU_STRUCTURE_ATTRIBUTE;
2038
+
2039
+ #define WGPU_QUEUE_WORK_DONE_CALLBACK_INFO_INIT WGPU_MAKE_INIT_STRUCT(WGPUQueueWorkDoneCallbackInfo, { \
2040
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2041
+ /*.mode=*/{} WGPU_COMMA \
2042
+ /*.callback=*/{} WGPU_COMMA \
2043
+ /*.userdata=*/{} WGPU_COMMA \
2044
+ })
2045
+
2046
+ typedef struct WGPURenderBundleDescriptor {
2047
+ WGPUChainedStruct const * nextInChain;
2048
+ WGPU_NULLABLE char const * label;
2049
+ } WGPURenderBundleDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2050
+
2051
+ #define WGPU_RENDER_BUNDLE_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPURenderBundleDescriptor, { \
2052
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2053
+ /*.label=*/nullptr WGPU_COMMA \
2054
+ })
2055
+
2056
+ typedef struct WGPURenderBundleEncoderDescriptor {
2057
+ WGPUChainedStruct const * nextInChain;
2058
+ WGPU_NULLABLE char const * label;
2059
+ size_t colorFormatCount;
2060
+ WGPUTextureFormat const * colorFormats;
2061
+ WGPUTextureFormat depthStencilFormat;
2062
+ uint32_t sampleCount;
2063
+ WGPUBool depthReadOnly;
2064
+ WGPUBool stencilReadOnly;
2065
+ } WGPURenderBundleEncoderDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2066
+
2067
+ #define WGPU_RENDER_BUNDLE_ENCODER_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPURenderBundleEncoderDescriptor, { \
2068
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2069
+ /*.label=*/nullptr WGPU_COMMA \
2070
+ /*.colorFormatCount=*/{} WGPU_COMMA \
2071
+ /*.colorFormats=*/{} WGPU_COMMA \
2072
+ /*.depthStencilFormat=*/WGPUTextureFormat_Undefined WGPU_COMMA \
2073
+ /*.sampleCount=*/1 WGPU_COMMA \
2074
+ /*.depthReadOnly=*/false WGPU_COMMA \
2075
+ /*.stencilReadOnly=*/false WGPU_COMMA \
2076
+ })
2077
+
2078
+ typedef struct WGPURenderPassDepthStencilAttachment {
2079
+ WGPUTextureView view;
2080
+ WGPULoadOp depthLoadOp;
2081
+ WGPUStoreOp depthStoreOp;
2082
+ float depthClearValue;
2083
+ WGPUBool depthReadOnly;
2084
+ WGPULoadOp stencilLoadOp;
2085
+ WGPUStoreOp stencilStoreOp;
2086
+ uint32_t stencilClearValue;
2087
+ WGPUBool stencilReadOnly;
2088
+ } WGPURenderPassDepthStencilAttachment WGPU_STRUCTURE_ATTRIBUTE;
2089
+
2090
+ #define WGPU_RENDER_PASS_DEPTH_STENCIL_ATTACHMENT_INIT WGPU_MAKE_INIT_STRUCT(WGPURenderPassDepthStencilAttachment, { \
2091
+ /*.view=*/{} WGPU_COMMA \
2092
+ /*.depthLoadOp=*/WGPULoadOp_Undefined WGPU_COMMA \
2093
+ /*.depthStoreOp=*/WGPUStoreOp_Undefined WGPU_COMMA \
2094
+ /*.depthClearValue=*/NAN WGPU_COMMA \
2095
+ /*.depthReadOnly=*/false WGPU_COMMA \
2096
+ /*.stencilLoadOp=*/WGPULoadOp_Undefined WGPU_COMMA \
2097
+ /*.stencilStoreOp=*/WGPUStoreOp_Undefined WGPU_COMMA \
2098
+ /*.stencilClearValue=*/0 WGPU_COMMA \
2099
+ /*.stencilReadOnly=*/false WGPU_COMMA \
2100
+ })
2101
+
2102
+ // Can be chained in WGPURenderPassDescriptor
2103
+ typedef struct WGPURenderPassDescriptorMaxDrawCount {
2104
+ WGPUChainedStruct chain;
2105
+ uint64_t maxDrawCount;
2106
+ } WGPURenderPassDescriptorMaxDrawCount WGPU_STRUCTURE_ATTRIBUTE;
2107
+
2108
+ #define WGPU_RENDER_PASS_DESCRIPTOR_MAX_DRAW_COUNT_INIT WGPU_MAKE_INIT_STRUCT(WGPURenderPassDescriptorMaxDrawCount, { \
2109
+ /*.chain=*/{} WGPU_COMMA \
2110
+ /*.maxDrawCount=*/50000000 WGPU_COMMA \
2111
+ })
2112
+
2113
+ typedef struct WGPURenderPassTimestampWrites {
2114
+ WGPUQuerySet querySet;
2115
+ uint32_t beginningOfPassWriteIndex;
2116
+ uint32_t endOfPassWriteIndex;
2117
+ } WGPURenderPassTimestampWrites WGPU_STRUCTURE_ATTRIBUTE;
2118
+
2119
+ #define WGPU_RENDER_PASS_TIMESTAMP_WRITES_INIT WGPU_MAKE_INIT_STRUCT(WGPURenderPassTimestampWrites, { \
2120
+ /*.querySet=*/{} WGPU_COMMA \
2121
+ /*.beginningOfPassWriteIndex=*/WGPU_QUERY_SET_INDEX_UNDEFINED WGPU_COMMA \
2122
+ /*.endOfPassWriteIndex=*/WGPU_QUERY_SET_INDEX_UNDEFINED WGPU_COMMA \
2123
+ })
2124
+
2125
+ typedef struct WGPURequestAdapterCallbackInfo {
2126
+ WGPUChainedStruct const * nextInChain;
2127
+ WGPUCallbackMode mode;
2128
+ WGPURequestAdapterCallback callback;
2129
+ void * userdata;
2130
+ } WGPURequestAdapterCallbackInfo WGPU_STRUCTURE_ATTRIBUTE;
2131
+
2132
+ #define WGPU_REQUEST_ADAPTER_CALLBACK_INFO_INIT WGPU_MAKE_INIT_STRUCT(WGPURequestAdapterCallbackInfo, { \
2133
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2134
+ /*.mode=*/{} WGPU_COMMA \
2135
+ /*.callback=*/{} WGPU_COMMA \
2136
+ /*.userdata=*/{} WGPU_COMMA \
2137
+ })
2138
+
2139
+ typedef struct WGPURequestAdapterOptions {
2140
+ WGPUChainedStruct const * nextInChain;
2141
+ WGPU_NULLABLE WGPUSurface compatibleSurface;
2142
+ WGPUPowerPreference powerPreference;
2143
+ WGPUBackendType backendType;
2144
+ WGPUBool forceFallbackAdapter;
2145
+ WGPUBool compatibilityMode;
2146
+ } WGPURequestAdapterOptions WGPU_STRUCTURE_ATTRIBUTE;
2147
+
2148
+ #define WGPU_REQUEST_ADAPTER_OPTIONS_INIT WGPU_MAKE_INIT_STRUCT(WGPURequestAdapterOptions, { \
2149
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2150
+ /*.compatibleSurface=*/nullptr WGPU_COMMA \
2151
+ /*.powerPreference=*/WGPUPowerPreference_Undefined WGPU_COMMA \
2152
+ /*.backendType=*/WGPUBackendType_Undefined WGPU_COMMA \
2153
+ /*.forceFallbackAdapter=*/false WGPU_COMMA \
2154
+ /*.compatibilityMode=*/false WGPU_COMMA \
2155
+ })
2156
+
2157
+ typedef struct WGPURequestDeviceCallbackInfo {
2158
+ WGPUChainedStruct const * nextInChain;
2159
+ WGPUCallbackMode mode;
2160
+ WGPURequestDeviceCallback callback;
2161
+ void * userdata;
2162
+ } WGPURequestDeviceCallbackInfo WGPU_STRUCTURE_ATTRIBUTE;
2163
+
2164
+ #define WGPU_REQUEST_DEVICE_CALLBACK_INFO_INIT WGPU_MAKE_INIT_STRUCT(WGPURequestDeviceCallbackInfo, { \
2165
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2166
+ /*.mode=*/{} WGPU_COMMA \
2167
+ /*.callback=*/{} WGPU_COMMA \
2168
+ /*.userdata=*/{} WGPU_COMMA \
2169
+ })
2170
+
2171
+ typedef struct WGPUSamplerBindingLayout {
2172
+ WGPUChainedStruct const * nextInChain;
2173
+ WGPUSamplerBindingType type;
2174
+ } WGPUSamplerBindingLayout WGPU_STRUCTURE_ATTRIBUTE;
2175
+
2176
+ #define WGPU_SAMPLER_BINDING_LAYOUT_INIT WGPU_MAKE_INIT_STRUCT(WGPUSamplerBindingLayout, { \
2177
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2178
+ /*.type=*/WGPUSamplerBindingType_Undefined WGPU_COMMA \
2179
+ })
2180
+
2181
+ typedef struct WGPUSamplerDescriptor {
2182
+ WGPUChainedStruct const * nextInChain;
2183
+ WGPU_NULLABLE char const * label;
2184
+ WGPUAddressMode addressModeU;
2185
+ WGPUAddressMode addressModeV;
2186
+ WGPUAddressMode addressModeW;
2187
+ WGPUFilterMode magFilter;
2188
+ WGPUFilterMode minFilter;
2189
+ WGPUMipmapFilterMode mipmapFilter;
2190
+ float lodMinClamp;
2191
+ float lodMaxClamp;
2192
+ WGPUCompareFunction compare;
2193
+ uint16_t maxAnisotropy;
2194
+ } WGPUSamplerDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2195
+
2196
+ #define WGPU_SAMPLER_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUSamplerDescriptor, { \
2197
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2198
+ /*.label=*/nullptr WGPU_COMMA \
2199
+ /*.addressModeU=*/WGPUAddressMode_ClampToEdge WGPU_COMMA \
2200
+ /*.addressModeV=*/WGPUAddressMode_ClampToEdge WGPU_COMMA \
2201
+ /*.addressModeW=*/WGPUAddressMode_ClampToEdge WGPU_COMMA \
2202
+ /*.magFilter=*/WGPUFilterMode_Nearest WGPU_COMMA \
2203
+ /*.minFilter=*/WGPUFilterMode_Nearest WGPU_COMMA \
2204
+ /*.mipmapFilter=*/WGPUMipmapFilterMode_Nearest WGPU_COMMA \
2205
+ /*.lodMinClamp=*/0.0f WGPU_COMMA \
2206
+ /*.lodMaxClamp=*/32.0f WGPU_COMMA \
2207
+ /*.compare=*/WGPUCompareFunction_Undefined WGPU_COMMA \
2208
+ /*.maxAnisotropy=*/1 WGPU_COMMA \
2209
+ })
2210
+
2211
+ // Can be chained in WGPUShaderModuleDescriptor
2212
+ typedef struct WGPUShaderModuleSPIRVDescriptor {
2213
+ WGPUChainedStruct chain;
2214
+ uint32_t codeSize;
2215
+ uint32_t const * code;
2216
+ } WGPUShaderModuleSPIRVDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2217
+
2218
+ #define WGPU_SHADER_MODULE_SPIRV_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUShaderModuleSPIRVDescriptor, { \
2219
+ /*.chain=*/{} WGPU_COMMA \
2220
+ /*.codeSize=*/{} WGPU_COMMA \
2221
+ /*.code=*/{} WGPU_COMMA \
2222
+ })
2223
+
2224
+ // Can be chained in WGPUShaderModuleDescriptor
2225
+ typedef struct WGPUShaderModuleWGSLDescriptor {
2226
+ WGPUChainedStruct chain;
2227
+ char const * code;
2228
+ } WGPUShaderModuleWGSLDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2229
+
2230
+ #define WGPU_SHADER_MODULE_WGSL_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUShaderModuleWGSLDescriptor, { \
2231
+ /*.chain=*/{} WGPU_COMMA \
2232
+ /*.code=*/{} WGPU_COMMA \
2233
+ })
2234
+
2235
+ // Can be chained in WGPUShaderModuleDescriptor
2236
+ typedef struct WGPUShaderModuleCompilationOptions {
2237
+ WGPUChainedStruct chain;
2238
+ WGPUBool strictMath;
2239
+ } WGPUShaderModuleCompilationOptions WGPU_STRUCTURE_ATTRIBUTE;
2240
+
2241
+ #define WGPU_SHADER_MODULE_COMPILATION_OPTIONS_INIT WGPU_MAKE_INIT_STRUCT(WGPUShaderModuleCompilationOptions, { \
2242
+ /*.chain=*/{} WGPU_COMMA \
2243
+ /*.strictMath=*/{} WGPU_COMMA \
2244
+ })
2245
+
2246
+ typedef struct WGPUShaderModuleDescriptor {
2247
+ WGPUChainedStruct const * nextInChain;
2248
+ WGPU_NULLABLE char const * label;
2249
+ } WGPUShaderModuleDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2250
+
2251
+ #define WGPU_SHADER_MODULE_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUShaderModuleDescriptor, { \
2252
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2253
+ /*.label=*/nullptr WGPU_COMMA \
2254
+ })
2255
+
2256
+ typedef struct WGPUSharedBufferMemoryBeginAccessDescriptor {
2257
+ WGPUChainedStruct const * nextInChain;
2258
+ WGPUBool initialized;
2259
+ size_t fenceCount;
2260
+ WGPUSharedFence const * fences;
2261
+ uint64_t const * signaledValues;
2262
+ } WGPUSharedBufferMemoryBeginAccessDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2263
+
2264
+ #define WGPU_SHARED_BUFFER_MEMORY_BEGIN_ACCESS_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedBufferMemoryBeginAccessDescriptor, { \
2265
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2266
+ /*.initialized=*/{} WGPU_COMMA \
2267
+ /*.fenceCount=*/0 WGPU_COMMA \
2268
+ /*.fences=*/{} WGPU_COMMA \
2269
+ /*.signaledValues=*/{} WGPU_COMMA \
2270
+ })
2271
+
2272
+ typedef struct WGPUSharedBufferMemoryDescriptor {
2273
+ WGPUChainedStruct const * nextInChain;
2274
+ WGPU_NULLABLE char const * label;
2275
+ } WGPUSharedBufferMemoryDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2276
+
2277
+ #define WGPU_SHARED_BUFFER_MEMORY_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedBufferMemoryDescriptor, { \
2278
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2279
+ /*.label=*/nullptr WGPU_COMMA \
2280
+ })
2281
+
2282
+ typedef struct WGPUSharedBufferMemoryEndAccessState {
2283
+ WGPUChainedStructOut * nextInChain;
2284
+ WGPUBool initialized;
2285
+ size_t fenceCount;
2286
+ WGPUSharedFence const * fences;
2287
+ uint64_t const * signaledValues;
2288
+ } WGPUSharedBufferMemoryEndAccessState WGPU_STRUCTURE_ATTRIBUTE;
2289
+
2290
+ #define WGPU_SHARED_BUFFER_MEMORY_END_ACCESS_STATE_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedBufferMemoryEndAccessState, { \
2291
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2292
+ /*.initialized=*/{} WGPU_COMMA \
2293
+ /*.fenceCount=*/0 WGPU_COMMA \
2294
+ /*.fences=*/{} WGPU_COMMA \
2295
+ /*.signaledValues=*/{} WGPU_COMMA \
2296
+ })
2297
+
2298
+ typedef struct WGPUSharedBufferMemoryProperties {
2299
+ WGPUChainedStructOut * nextInChain;
2300
+ WGPUBufferUsage usage;
2301
+ uint64_t size;
2302
+ } WGPUSharedBufferMemoryProperties WGPU_STRUCTURE_ATTRIBUTE;
2303
+
2304
+ #define WGPU_SHARED_BUFFER_MEMORY_PROPERTIES_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedBufferMemoryProperties, { \
2305
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2306
+ /*.usage=*/{} WGPU_COMMA \
2307
+ /*.size=*/{} WGPU_COMMA \
2308
+ })
2309
+
2310
+ // Can be chained in WGPUSharedFenceDescriptor
2311
+ typedef struct WGPUSharedFenceDXGISharedHandleDescriptor {
2312
+ WGPUChainedStruct chain;
2313
+ void * handle;
2314
+ } WGPUSharedFenceDXGISharedHandleDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2315
+
2316
+ #define WGPU_SHARED_FENCE_DXGI_SHARED_HANDLE_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedFenceDXGISharedHandleDescriptor, { \
2317
+ /*.chain=*/{} WGPU_COMMA \
2318
+ /*.handle=*/{} WGPU_COMMA \
2319
+ })
2320
+
2321
+ // Can be chained in WGPUSharedFenceExportInfo
2322
+ typedef struct WGPUSharedFenceDXGISharedHandleExportInfo {
2323
+ WGPUChainedStructOut chain;
2324
+ void * handle;
2325
+ } WGPUSharedFenceDXGISharedHandleExportInfo WGPU_STRUCTURE_ATTRIBUTE;
2326
+
2327
+ #define WGPU_SHARED_FENCE_DXGI_SHARED_HANDLE_EXPORT_INFO_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedFenceDXGISharedHandleExportInfo, { \
2328
+ /*.chain=*/{} WGPU_COMMA \
2329
+ /*.handle=*/{} WGPU_COMMA \
2330
+ })
2331
+
2332
+ // Can be chained in WGPUSharedFenceDescriptor
2333
+ typedef struct WGPUSharedFenceMTLSharedEventDescriptor {
2334
+ WGPUChainedStruct chain;
2335
+ void * sharedEvent;
2336
+ } WGPUSharedFenceMTLSharedEventDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2337
+
2338
+ #define WGPU_SHARED_FENCE_MTL_SHARED_EVENT_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedFenceMTLSharedEventDescriptor, { \
2339
+ /*.chain=*/{} WGPU_COMMA \
2340
+ /*.sharedEvent=*/{} WGPU_COMMA \
2341
+ })
2342
+
2343
+ // Can be chained in WGPUSharedFenceExportInfo
2344
+ typedef struct WGPUSharedFenceMTLSharedEventExportInfo {
2345
+ WGPUChainedStructOut chain;
2346
+ void * sharedEvent;
2347
+ } WGPUSharedFenceMTLSharedEventExportInfo WGPU_STRUCTURE_ATTRIBUTE;
2348
+
2349
+ #define WGPU_SHARED_FENCE_MTL_SHARED_EVENT_EXPORT_INFO_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedFenceMTLSharedEventExportInfo, { \
2350
+ /*.chain=*/{} WGPU_COMMA \
2351
+ /*.sharedEvent=*/{} WGPU_COMMA \
2352
+ })
2353
+
2354
+ typedef struct WGPUSharedFenceDescriptor {
2355
+ WGPUChainedStruct const * nextInChain;
2356
+ WGPU_NULLABLE char const * label;
2357
+ } WGPUSharedFenceDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2358
+
2359
+ #define WGPU_SHARED_FENCE_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedFenceDescriptor, { \
2360
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2361
+ /*.label=*/nullptr WGPU_COMMA \
2362
+ })
2363
+
2364
+ typedef struct WGPUSharedFenceExportInfo {
2365
+ WGPUChainedStructOut * nextInChain;
2366
+ WGPUSharedFenceType type;
2367
+ } WGPUSharedFenceExportInfo WGPU_STRUCTURE_ATTRIBUTE;
2368
+
2369
+ #define WGPU_SHARED_FENCE_EXPORT_INFO_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedFenceExportInfo, { \
2370
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2371
+ /*.type=*/{} WGPU_COMMA \
2372
+ })
2373
+
2374
+ // Can be chained in WGPUSharedFenceDescriptor
2375
+ typedef struct WGPUSharedFenceVkSemaphoreOpaqueFDDescriptor {
2376
+ WGPUChainedStruct chain;
2377
+ int handle;
2378
+ } WGPUSharedFenceVkSemaphoreOpaqueFDDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2379
+
2380
+ #define WGPU_SHARED_FENCE_VK_SEMAPHORE_OPAQUE_FD_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedFenceVkSemaphoreOpaqueFDDescriptor, { \
2381
+ /*.chain=*/{} WGPU_COMMA \
2382
+ /*.handle=*/{} WGPU_COMMA \
2383
+ })
2384
+
2385
+ // Can be chained in WGPUSharedFenceExportInfo
2386
+ typedef struct WGPUSharedFenceVkSemaphoreOpaqueFDExportInfo {
2387
+ WGPUChainedStructOut chain;
2388
+ int handle;
2389
+ } WGPUSharedFenceVkSemaphoreOpaqueFDExportInfo WGPU_STRUCTURE_ATTRIBUTE;
2390
+
2391
+ #define WGPU_SHARED_FENCE_VK_SEMAPHORE_OPAQUE_FD_EXPORT_INFO_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedFenceVkSemaphoreOpaqueFDExportInfo, { \
2392
+ /*.chain=*/{} WGPU_COMMA \
2393
+ /*.handle=*/{} WGPU_COMMA \
2394
+ })
2395
+
2396
+ // Can be chained in WGPUSharedFenceDescriptor
2397
+ typedef struct WGPUSharedFenceVkSemaphoreSyncFDDescriptor {
2398
+ WGPUChainedStruct chain;
2399
+ int handle;
2400
+ } WGPUSharedFenceVkSemaphoreSyncFDDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2401
+
2402
+ #define WGPU_SHARED_FENCE_VK_SEMAPHORE_SYNC_FD_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedFenceVkSemaphoreSyncFDDescriptor, { \
2403
+ /*.chain=*/{} WGPU_COMMA \
2404
+ /*.handle=*/{} WGPU_COMMA \
2405
+ })
2406
+
2407
+ // Can be chained in WGPUSharedFenceExportInfo
2408
+ typedef struct WGPUSharedFenceVkSemaphoreSyncFDExportInfo {
2409
+ WGPUChainedStructOut chain;
2410
+ int handle;
2411
+ } WGPUSharedFenceVkSemaphoreSyncFDExportInfo WGPU_STRUCTURE_ATTRIBUTE;
2412
+
2413
+ #define WGPU_SHARED_FENCE_VK_SEMAPHORE_SYNC_FD_EXPORT_INFO_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedFenceVkSemaphoreSyncFDExportInfo, { \
2414
+ /*.chain=*/{} WGPU_COMMA \
2415
+ /*.handle=*/{} WGPU_COMMA \
2416
+ })
2417
+
2418
+ // Can be chained in WGPUSharedFenceDescriptor
2419
+ typedef struct WGPUSharedFenceVkSemaphoreZirconHandleDescriptor {
2420
+ WGPUChainedStruct chain;
2421
+ uint32_t handle;
2422
+ } WGPUSharedFenceVkSemaphoreZirconHandleDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2423
+
2424
+ #define WGPU_SHARED_FENCE_VK_SEMAPHORE_ZIRCON_HANDLE_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedFenceVkSemaphoreZirconHandleDescriptor, { \
2425
+ /*.chain=*/{} WGPU_COMMA \
2426
+ /*.handle=*/{} WGPU_COMMA \
2427
+ })
2428
+
2429
+ // Can be chained in WGPUSharedFenceExportInfo
2430
+ typedef struct WGPUSharedFenceVkSemaphoreZirconHandleExportInfo {
2431
+ WGPUChainedStructOut chain;
2432
+ uint32_t handle;
2433
+ } WGPUSharedFenceVkSemaphoreZirconHandleExportInfo WGPU_STRUCTURE_ATTRIBUTE;
2434
+
2435
+ #define WGPU_SHARED_FENCE_VK_SEMAPHORE_ZIRCON_HANDLE_EXPORT_INFO_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedFenceVkSemaphoreZirconHandleExportInfo, { \
2436
+ /*.chain=*/{} WGPU_COMMA \
2437
+ /*.handle=*/{} WGPU_COMMA \
2438
+ })
2439
+
2440
+ // Can be chained in WGPUSharedTextureMemoryBeginAccessDescriptor
2441
+ typedef struct WGPUSharedTextureMemoryD3DSwapchainBeginState {
2442
+ WGPUChainedStruct chain;
2443
+ WGPUBool isSwapchain;
2444
+ } WGPUSharedTextureMemoryD3DSwapchainBeginState WGPU_STRUCTURE_ATTRIBUTE;
2445
+
2446
+ #define WGPU_SHARED_TEXTURE_MEMORY_D3D_SWAPCHAIN_BEGIN_STATE_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryD3DSwapchainBeginState, { \
2447
+ /*.chain=*/{} WGPU_COMMA \
2448
+ /*.isSwapchain=*/false WGPU_COMMA \
2449
+ })
2450
+
2451
+ // Can be chained in WGPUSharedTextureMemoryDescriptor
2452
+ typedef struct WGPUSharedTextureMemoryDXGISharedHandleDescriptor {
2453
+ WGPUChainedStruct chain;
2454
+ void * handle;
2455
+ WGPUBool useKeyedMutex;
2456
+ } WGPUSharedTextureMemoryDXGISharedHandleDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2457
+
2458
+ #define WGPU_SHARED_TEXTURE_MEMORY_DXGI_SHARED_HANDLE_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryDXGISharedHandleDescriptor, { \
2459
+ /*.chain=*/{} WGPU_COMMA \
2460
+ /*.handle=*/{} WGPU_COMMA \
2461
+ /*.useKeyedMutex=*/{} WGPU_COMMA \
2462
+ })
2463
+
2464
+ // Can be chained in WGPUSharedTextureMemoryDescriptor
2465
+ typedef struct WGPUSharedTextureMemoryEGLImageDescriptor {
2466
+ WGPUChainedStruct chain;
2467
+ void * image;
2468
+ } WGPUSharedTextureMemoryEGLImageDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2469
+
2470
+ #define WGPU_SHARED_TEXTURE_MEMORY_EGL_IMAGE_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryEGLImageDescriptor, { \
2471
+ /*.chain=*/{} WGPU_COMMA \
2472
+ /*.image=*/{} WGPU_COMMA \
2473
+ })
2474
+
2475
+ // Can be chained in WGPUSharedTextureMemoryDescriptor
2476
+ typedef struct WGPUSharedTextureMemoryIOSurfaceDescriptor {
2477
+ WGPUChainedStruct chain;
2478
+ void * ioSurface;
2479
+ } WGPUSharedTextureMemoryIOSurfaceDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2480
+
2481
+ #define WGPU_SHARED_TEXTURE_MEMORY_IO_SURFACE_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryIOSurfaceDescriptor, { \
2482
+ /*.chain=*/{} WGPU_COMMA \
2483
+ /*.ioSurface=*/{} WGPU_COMMA \
2484
+ })
2485
+
2486
+ // Can be chained in WGPUSharedTextureMemoryDescriptor
2487
+ typedef struct WGPUSharedTextureMemoryAHardwareBufferDescriptor {
2488
+ WGPUChainedStruct chain;
2489
+ void * handle;
2490
+ WGPUBool useExternalFormat;
2491
+ } WGPUSharedTextureMemoryAHardwareBufferDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2492
+
2493
+ #define WGPU_SHARED_TEXTURE_MEMORY_A_HARDWARE_BUFFER_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryAHardwareBufferDescriptor, { \
2494
+ /*.chain=*/{} WGPU_COMMA \
2495
+ /*.handle=*/{} WGPU_COMMA \
2496
+ /*.useExternalFormat=*/{} WGPU_COMMA \
2497
+ })
2498
+
2499
+ typedef struct WGPUSharedTextureMemoryBeginAccessDescriptor {
2500
+ WGPUChainedStruct const * nextInChain;
2501
+ WGPUBool concurrentRead;
2502
+ WGPUBool initialized;
2503
+ size_t fenceCount;
2504
+ WGPUSharedFence const * fences;
2505
+ uint64_t const * signaledValues;
2506
+ } WGPUSharedTextureMemoryBeginAccessDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2507
+
2508
+ #define WGPU_SHARED_TEXTURE_MEMORY_BEGIN_ACCESS_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryBeginAccessDescriptor, { \
2509
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2510
+ /*.concurrentRead=*/{} WGPU_COMMA \
2511
+ /*.initialized=*/{} WGPU_COMMA \
2512
+ /*.fenceCount=*/{} WGPU_COMMA \
2513
+ /*.fences=*/{} WGPU_COMMA \
2514
+ /*.signaledValues=*/{} WGPU_COMMA \
2515
+ })
2516
+
2517
+ typedef struct WGPUSharedTextureMemoryDescriptor {
2518
+ WGPUChainedStruct const * nextInChain;
2519
+ WGPU_NULLABLE char const * label;
2520
+ } WGPUSharedTextureMemoryDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2521
+
2522
+ #define WGPU_SHARED_TEXTURE_MEMORY_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryDescriptor, { \
2523
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2524
+ /*.label=*/nullptr WGPU_COMMA \
2525
+ })
2526
+
2527
+ typedef struct WGPUSharedTextureMemoryDmaBufPlane {
2528
+ int fd;
2529
+ uint64_t offset;
2530
+ uint32_t stride;
2531
+ } WGPUSharedTextureMemoryDmaBufPlane WGPU_STRUCTURE_ATTRIBUTE;
2532
+
2533
+ #define WGPU_SHARED_TEXTURE_MEMORY_DMA_BUF_PLANE_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryDmaBufPlane, { \
2534
+ /*.fd=*/{} WGPU_COMMA \
2535
+ /*.offset=*/{} WGPU_COMMA \
2536
+ /*.stride=*/{} WGPU_COMMA \
2537
+ })
2538
+
2539
+ typedef struct WGPUSharedTextureMemoryEndAccessState {
2540
+ WGPUChainedStructOut * nextInChain;
2541
+ WGPUBool initialized;
2542
+ size_t fenceCount;
2543
+ WGPUSharedFence const * fences;
2544
+ uint64_t const * signaledValues;
2545
+ } WGPUSharedTextureMemoryEndAccessState WGPU_STRUCTURE_ATTRIBUTE;
2546
+
2547
+ #define WGPU_SHARED_TEXTURE_MEMORY_END_ACCESS_STATE_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryEndAccessState, { \
2548
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2549
+ /*.initialized=*/{} WGPU_COMMA \
2550
+ /*.fenceCount=*/{} WGPU_COMMA \
2551
+ /*.fences=*/{} WGPU_COMMA \
2552
+ /*.signaledValues=*/{} WGPU_COMMA \
2553
+ })
2554
+
2555
+ // Can be chained in WGPUSharedTextureMemoryDescriptor
2556
+ typedef struct WGPUSharedTextureMemoryOpaqueFDDescriptor {
2557
+ WGPUChainedStruct chain;
2558
+ void const * vkImageCreateInfo;
2559
+ int memoryFD;
2560
+ uint32_t memoryTypeIndex;
2561
+ uint64_t allocationSize;
2562
+ WGPUBool dedicatedAllocation;
2563
+ } WGPUSharedTextureMemoryOpaqueFDDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2564
+
2565
+ #define WGPU_SHARED_TEXTURE_MEMORY_OPAQUE_FD_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryOpaqueFDDescriptor, { \
2566
+ /*.chain=*/{} WGPU_COMMA \
2567
+ /*.vkImageCreateInfo=*/{} WGPU_COMMA \
2568
+ /*.memoryFD=*/{} WGPU_COMMA \
2569
+ /*.memoryTypeIndex=*/{} WGPU_COMMA \
2570
+ /*.allocationSize=*/{} WGPU_COMMA \
2571
+ /*.dedicatedAllocation=*/{} WGPU_COMMA \
2572
+ })
2573
+
2574
+ // Can be chained in WGPUSharedTextureMemoryDescriptor
2575
+ typedef struct WGPUSharedTextureMemoryVkDedicatedAllocationDescriptor {
2576
+ WGPUChainedStruct chain;
2577
+ WGPUBool dedicatedAllocation;
2578
+ } WGPUSharedTextureMemoryVkDedicatedAllocationDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2579
+
2580
+ #define WGPU_SHARED_TEXTURE_MEMORY_VK_DEDICATED_ALLOCATION_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryVkDedicatedAllocationDescriptor, { \
2581
+ /*.chain=*/{} WGPU_COMMA \
2582
+ /*.dedicatedAllocation=*/{} WGPU_COMMA \
2583
+ })
2584
+
2585
+ // Can be chained in WGPUSharedTextureMemoryBeginAccessDescriptor
2586
+ typedef struct WGPUSharedTextureMemoryVkImageLayoutBeginState {
2587
+ WGPUChainedStruct chain;
2588
+ int32_t oldLayout;
2589
+ int32_t newLayout;
2590
+ } WGPUSharedTextureMemoryVkImageLayoutBeginState WGPU_STRUCTURE_ATTRIBUTE;
2591
+
2592
+ #define WGPU_SHARED_TEXTURE_MEMORY_VK_IMAGE_LAYOUT_BEGIN_STATE_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryVkImageLayoutBeginState, { \
2593
+ /*.chain=*/{} WGPU_COMMA \
2594
+ /*.oldLayout=*/{} WGPU_COMMA \
2595
+ /*.newLayout=*/{} WGPU_COMMA \
2596
+ })
2597
+
2598
+ // Can be chained in WGPUSharedTextureMemoryEndAccessState
2599
+ typedef struct WGPUSharedTextureMemoryVkImageLayoutEndState {
2600
+ WGPUChainedStructOut chain;
2601
+ int32_t oldLayout;
2602
+ int32_t newLayout;
2603
+ } WGPUSharedTextureMemoryVkImageLayoutEndState WGPU_STRUCTURE_ATTRIBUTE;
2604
+
2605
+ #define WGPU_SHARED_TEXTURE_MEMORY_VK_IMAGE_LAYOUT_END_STATE_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryVkImageLayoutEndState, { \
2606
+ /*.chain=*/{} WGPU_COMMA \
2607
+ /*.oldLayout=*/{} WGPU_COMMA \
2608
+ /*.newLayout=*/{} WGPU_COMMA \
2609
+ })
2610
+
2611
+ // Can be chained in WGPUSharedTextureMemoryDescriptor
2612
+ typedef struct WGPUSharedTextureMemoryZirconHandleDescriptor {
2613
+ WGPUChainedStruct chain;
2614
+ uint32_t memoryFD;
2615
+ uint64_t allocationSize;
2616
+ } WGPUSharedTextureMemoryZirconHandleDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2617
+
2618
+ #define WGPU_SHARED_TEXTURE_MEMORY_ZIRCON_HANDLE_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryZirconHandleDescriptor, { \
2619
+ /*.chain=*/{} WGPU_COMMA \
2620
+ /*.memoryFD=*/{} WGPU_COMMA \
2621
+ /*.allocationSize=*/{} WGPU_COMMA \
2622
+ })
2623
+
2624
+ // Can be chained in WGPUBindGroupLayoutEntry
2625
+ typedef struct WGPUStaticSamplerBindingLayout {
2626
+ WGPUChainedStruct chain;
2627
+ WGPUSampler sampler;
2628
+ } WGPUStaticSamplerBindingLayout WGPU_STRUCTURE_ATTRIBUTE;
2629
+
2630
+ #define WGPU_STATIC_SAMPLER_BINDING_LAYOUT_INIT WGPU_MAKE_INIT_STRUCT(WGPUStaticSamplerBindingLayout, { \
2631
+ /*.chain=*/{} WGPU_COMMA \
2632
+ /*.sampler=*/{} WGPU_COMMA \
2633
+ })
2634
+
2635
+ typedef struct WGPUStencilFaceState {
2636
+ WGPUCompareFunction compare;
2637
+ WGPUStencilOperation failOp;
2638
+ WGPUStencilOperation depthFailOp;
2639
+ WGPUStencilOperation passOp;
2640
+ } WGPUStencilFaceState WGPU_STRUCTURE_ATTRIBUTE;
2641
+
2642
+ #define WGPU_STENCIL_FACE_STATE_INIT WGPU_MAKE_INIT_STRUCT(WGPUStencilFaceState, { \
2643
+ /*.compare=*/WGPUCompareFunction_Always WGPU_COMMA \
2644
+ /*.failOp=*/WGPUStencilOperation_Keep WGPU_COMMA \
2645
+ /*.depthFailOp=*/WGPUStencilOperation_Keep WGPU_COMMA \
2646
+ /*.passOp=*/WGPUStencilOperation_Keep WGPU_COMMA \
2647
+ })
2648
+
2649
+ typedef struct WGPUStorageTextureBindingLayout {
2650
+ WGPUChainedStruct const * nextInChain;
2651
+ WGPUStorageTextureAccess access;
2652
+ WGPUTextureFormat format;
2653
+ WGPUTextureViewDimension viewDimension;
2654
+ } WGPUStorageTextureBindingLayout WGPU_STRUCTURE_ATTRIBUTE;
2655
+
2656
+ #define WGPU_STORAGE_TEXTURE_BINDING_LAYOUT_INIT WGPU_MAKE_INIT_STRUCT(WGPUStorageTextureBindingLayout, { \
2657
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2658
+ /*.access=*/WGPUStorageTextureAccess_Undefined WGPU_COMMA \
2659
+ /*.format=*/WGPUTextureFormat_Undefined WGPU_COMMA \
2660
+ /*.viewDimension=*/WGPUTextureViewDimension_2D WGPU_COMMA \
2661
+ })
2662
+
2663
+ typedef struct WGPUSurfaceCapabilities {
2664
+ WGPUChainedStructOut * nextInChain;
2665
+ WGPUTextureUsage usages;
2666
+ size_t formatCount;
2667
+ WGPUTextureFormat const * formats;
2668
+ size_t presentModeCount;
2669
+ WGPUPresentMode const * presentModes;
2670
+ size_t alphaModeCount;
2671
+ WGPUCompositeAlphaMode const * alphaModes;
2672
+ } WGPUSurfaceCapabilities WGPU_STRUCTURE_ATTRIBUTE;
2673
+
2674
+ #define WGPU_SURFACE_CAPABILITIES_INIT WGPU_MAKE_INIT_STRUCT(WGPUSurfaceCapabilities, { \
2675
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2676
+ /*.usages=*/{} WGPU_COMMA \
2677
+ /*.formatCount=*/{} WGPU_COMMA \
2678
+ /*.formats=*/{} WGPU_COMMA \
2679
+ /*.presentModeCount=*/{} WGPU_COMMA \
2680
+ /*.presentModes=*/{} WGPU_COMMA \
2681
+ /*.alphaModeCount=*/{} WGPU_COMMA \
2682
+ /*.alphaModes=*/{} WGPU_COMMA \
2683
+ })
2684
+
2685
+ typedef struct WGPUSurfaceConfiguration {
2686
+ WGPUChainedStruct const * nextInChain;
2687
+ WGPUDevice device;
2688
+ WGPUTextureFormat format;
2689
+ WGPUTextureUsage usage;
2690
+ size_t viewFormatCount;
2691
+ WGPUTextureFormat const * viewFormats;
2692
+ WGPUCompositeAlphaMode alphaMode;
2693
+ uint32_t width;
2694
+ uint32_t height;
2695
+ WGPUPresentMode presentMode;
2696
+ } WGPUSurfaceConfiguration WGPU_STRUCTURE_ATTRIBUTE;
2697
+
2698
+ #define WGPU_SURFACE_CONFIGURATION_INIT WGPU_MAKE_INIT_STRUCT(WGPUSurfaceConfiguration, { \
2699
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2700
+ /*.device=*/{} WGPU_COMMA \
2701
+ /*.format=*/{} WGPU_COMMA \
2702
+ /*.usage=*/WGPUTextureUsage_RenderAttachment WGPU_COMMA \
2703
+ /*.viewFormatCount=*/0 WGPU_COMMA \
2704
+ /*.viewFormats=*/{} WGPU_COMMA \
2705
+ /*.alphaMode=*/WGPUCompositeAlphaMode_Auto WGPU_COMMA \
2706
+ /*.width=*/{} WGPU_COMMA \
2707
+ /*.height=*/{} WGPU_COMMA \
2708
+ /*.presentMode=*/WGPUPresentMode_Fifo WGPU_COMMA \
2709
+ })
2710
+
2711
+ typedef struct WGPUSurfaceDescriptor {
2712
+ WGPUChainedStruct const * nextInChain;
2713
+ WGPU_NULLABLE char const * label;
2714
+ } WGPUSurfaceDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2715
+
2716
+ #define WGPU_SURFACE_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUSurfaceDescriptor, { \
2717
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2718
+ /*.label=*/nullptr WGPU_COMMA \
2719
+ })
2720
+
2721
+ // Can be chained in WGPUSurfaceDescriptor
2722
+ typedef struct WGPUSurfaceDescriptorFromAndroidNativeWindow {
2723
+ WGPUChainedStruct chain;
2724
+ void * window;
2725
+ } WGPUSurfaceDescriptorFromAndroidNativeWindow WGPU_STRUCTURE_ATTRIBUTE;
2726
+
2727
+ #define WGPU_SURFACE_DESCRIPTOR_FROM_ANDROID_NATIVE_WINDOW_INIT WGPU_MAKE_INIT_STRUCT(WGPUSurfaceDescriptorFromAndroidNativeWindow, { \
2728
+ /*.chain=*/{} WGPU_COMMA \
2729
+ /*.window=*/{} WGPU_COMMA \
2730
+ })
2731
+
2732
+ // Can be chained in WGPUSurfaceDescriptor
2733
+ typedef struct WGPUSurfaceDescriptorFromCanvasHTMLSelector {
2734
+ WGPUChainedStruct chain;
2735
+ char const * selector;
2736
+ } WGPUSurfaceDescriptorFromCanvasHTMLSelector WGPU_STRUCTURE_ATTRIBUTE;
2737
+
2738
+ #define WGPU_SURFACE_DESCRIPTOR_FROM_CANVAS_HTML_SELECTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUSurfaceDescriptorFromCanvasHTMLSelector, { \
2739
+ /*.chain=*/{} WGPU_COMMA \
2740
+ /*.selector=*/{} WGPU_COMMA \
2741
+ })
2742
+
2743
+ // Can be chained in WGPUSurfaceDescriptor
2744
+ typedef struct WGPUSurfaceDescriptorFromMetalLayer {
2745
+ WGPUChainedStruct chain;
2746
+ void * layer;
2747
+ } WGPUSurfaceDescriptorFromMetalLayer WGPU_STRUCTURE_ATTRIBUTE;
2748
+
2749
+ #define WGPU_SURFACE_DESCRIPTOR_FROM_METAL_LAYER_INIT WGPU_MAKE_INIT_STRUCT(WGPUSurfaceDescriptorFromMetalLayer, { \
2750
+ /*.chain=*/{} WGPU_COMMA \
2751
+ /*.layer=*/{} WGPU_COMMA \
2752
+ })
2753
+
2754
+ // Can be chained in WGPUSurfaceDescriptor
2755
+ typedef struct WGPUSurfaceDescriptorFromWaylandSurface {
2756
+ WGPUChainedStruct chain;
2757
+ void * display;
2758
+ void * surface;
2759
+ } WGPUSurfaceDescriptorFromWaylandSurface WGPU_STRUCTURE_ATTRIBUTE;
2760
+
2761
+ #define WGPU_SURFACE_DESCRIPTOR_FROM_WAYLAND_SURFACE_INIT WGPU_MAKE_INIT_STRUCT(WGPUSurfaceDescriptorFromWaylandSurface, { \
2762
+ /*.chain=*/{} WGPU_COMMA \
2763
+ /*.display=*/{} WGPU_COMMA \
2764
+ /*.surface=*/{} WGPU_COMMA \
2765
+ })
2766
+
2767
+ // Can be chained in WGPUSurfaceDescriptor
2768
+ typedef struct WGPUSurfaceDescriptorFromWindowsHWND {
2769
+ WGPUChainedStruct chain;
2770
+ void * hinstance;
2771
+ void * hwnd;
2772
+ } WGPUSurfaceDescriptorFromWindowsHWND WGPU_STRUCTURE_ATTRIBUTE;
2773
+
2774
+ #define WGPU_SURFACE_DESCRIPTOR_FROM_WINDOWS_HWND_INIT WGPU_MAKE_INIT_STRUCT(WGPUSurfaceDescriptorFromWindowsHWND, { \
2775
+ /*.chain=*/{} WGPU_COMMA \
2776
+ /*.hinstance=*/{} WGPU_COMMA \
2777
+ /*.hwnd=*/{} WGPU_COMMA \
2778
+ })
2779
+
2780
+ // Can be chained in WGPUSurfaceDescriptor
2781
+ typedef struct WGPUSurfaceDescriptorFromWindowsCoreWindow {
2782
+ WGPUChainedStruct chain;
2783
+ void * coreWindow;
2784
+ } WGPUSurfaceDescriptorFromWindowsCoreWindow WGPU_STRUCTURE_ATTRIBUTE;
2785
+
2786
+ #define WGPU_SURFACE_DESCRIPTOR_FROM_WINDOWS_CORE_WINDOW_INIT WGPU_MAKE_INIT_STRUCT(WGPUSurfaceDescriptorFromWindowsCoreWindow, { \
2787
+ /*.chain=*/{} WGPU_COMMA \
2788
+ /*.coreWindow=*/{} WGPU_COMMA \
2789
+ })
2790
+
2791
+ // Can be chained in WGPUSurfaceDescriptor
2792
+ typedef struct WGPUSurfaceDescriptorFromWindowsSwapChainPanel {
2793
+ WGPUChainedStruct chain;
2794
+ void * swapChainPanel;
2795
+ } WGPUSurfaceDescriptorFromWindowsSwapChainPanel WGPU_STRUCTURE_ATTRIBUTE;
2796
+
2797
+ #define WGPU_SURFACE_DESCRIPTOR_FROM_WINDOWS_SWAP_CHAIN_PANEL_INIT WGPU_MAKE_INIT_STRUCT(WGPUSurfaceDescriptorFromWindowsSwapChainPanel, { \
2798
+ /*.chain=*/{} WGPU_COMMA \
2799
+ /*.swapChainPanel=*/{} WGPU_COMMA \
2800
+ })
2801
+
2802
+ // Can be chained in WGPUSurfaceDescriptor
2803
+ typedef struct WGPUSurfaceDescriptorFromXcbWindow {
2804
+ WGPUChainedStruct chain;
2805
+ void * connection;
2806
+ uint32_t window;
2807
+ } WGPUSurfaceDescriptorFromXcbWindow WGPU_STRUCTURE_ATTRIBUTE;
2808
+
2809
+ #define WGPU_SURFACE_DESCRIPTOR_FROM_XCB_WINDOW_INIT WGPU_MAKE_INIT_STRUCT(WGPUSurfaceDescriptorFromXcbWindow, { \
2810
+ /*.chain=*/{} WGPU_COMMA \
2811
+ /*.connection=*/{} WGPU_COMMA \
2812
+ /*.window=*/{} WGPU_COMMA \
2813
+ })
2814
+
2815
+ // Can be chained in WGPUSurfaceDescriptor
2816
+ typedef struct WGPUSurfaceDescriptorFromXlibWindow {
2817
+ WGPUChainedStruct chain;
2818
+ void * display;
2819
+ uint64_t window;
2820
+ } WGPUSurfaceDescriptorFromXlibWindow WGPU_STRUCTURE_ATTRIBUTE;
2821
+
2822
+ #define WGPU_SURFACE_DESCRIPTOR_FROM_XLIB_WINDOW_INIT WGPU_MAKE_INIT_STRUCT(WGPUSurfaceDescriptorFromXlibWindow, { \
2823
+ /*.chain=*/{} WGPU_COMMA \
2824
+ /*.display=*/{} WGPU_COMMA \
2825
+ /*.window=*/{} WGPU_COMMA \
2826
+ })
2827
+
2828
+ typedef struct WGPUSurfaceTexture {
2829
+ WGPUTexture texture;
2830
+ WGPUBool suboptimal;
2831
+ WGPUSurfaceGetCurrentTextureStatus status;
2832
+ } WGPUSurfaceTexture WGPU_STRUCTURE_ATTRIBUTE;
2833
+
2834
+ #define WGPU_SURFACE_TEXTURE_INIT WGPU_MAKE_INIT_STRUCT(WGPUSurfaceTexture, { \
2835
+ /*.texture=*/{} WGPU_COMMA \
2836
+ /*.suboptimal=*/{} WGPU_COMMA \
2837
+ /*.status=*/{} WGPU_COMMA \
2838
+ })
2839
+
2840
+ typedef struct WGPUSwapChainDescriptor {
2841
+ WGPUChainedStruct const * nextInChain;
2842
+ WGPU_NULLABLE char const * label;
2843
+ WGPUTextureUsage usage;
2844
+ WGPUTextureFormat format;
2845
+ uint32_t width;
2846
+ uint32_t height;
2847
+ WGPUPresentMode presentMode;
2848
+ } WGPUSwapChainDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2849
+
2850
+ #define WGPU_SWAP_CHAIN_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUSwapChainDescriptor, { \
2851
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2852
+ /*.label=*/nullptr WGPU_COMMA \
2853
+ /*.usage=*/{} WGPU_COMMA \
2854
+ /*.format=*/{} WGPU_COMMA \
2855
+ /*.width=*/{} WGPU_COMMA \
2856
+ /*.height=*/{} WGPU_COMMA \
2857
+ /*.presentMode=*/{} WGPU_COMMA \
2858
+ })
2859
+
2860
+ typedef struct WGPUTextureBindingLayout {
2861
+ WGPUChainedStruct const * nextInChain;
2862
+ WGPUTextureSampleType sampleType;
2863
+ WGPUTextureViewDimension viewDimension;
2864
+ WGPUBool multisampled;
2865
+ } WGPUTextureBindingLayout WGPU_STRUCTURE_ATTRIBUTE;
2866
+
2867
+ #define WGPU_TEXTURE_BINDING_LAYOUT_INIT WGPU_MAKE_INIT_STRUCT(WGPUTextureBindingLayout, { \
2868
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2869
+ /*.sampleType=*/WGPUTextureSampleType_Undefined WGPU_COMMA \
2870
+ /*.viewDimension=*/WGPUTextureViewDimension_2D WGPU_COMMA \
2871
+ /*.multisampled=*/false WGPU_COMMA \
2872
+ })
2873
+
2874
+ // Can be chained in WGPUTextureDescriptor
2875
+ typedef struct WGPUTextureBindingViewDimensionDescriptor {
2876
+ WGPUChainedStruct chain;
2877
+ WGPUTextureViewDimension textureBindingViewDimension;
2878
+ } WGPUTextureBindingViewDimensionDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2879
+
2880
+ #define WGPU_TEXTURE_BINDING_VIEW_DIMENSION_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUTextureBindingViewDimensionDescriptor, { \
2881
+ /*.chain=*/{} WGPU_COMMA \
2882
+ /*.textureBindingViewDimension=*/WGPUTextureViewDimension_Undefined WGPU_COMMA \
2883
+ })
2884
+
2885
+ typedef struct WGPUTextureDataLayout {
2886
+ WGPUChainedStruct const * nextInChain;
2887
+ uint64_t offset;
2888
+ uint32_t bytesPerRow;
2889
+ uint32_t rowsPerImage;
2890
+ } WGPUTextureDataLayout WGPU_STRUCTURE_ATTRIBUTE;
2891
+
2892
+ #define WGPU_TEXTURE_DATA_LAYOUT_INIT WGPU_MAKE_INIT_STRUCT(WGPUTextureDataLayout, { \
2893
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2894
+ /*.offset=*/0 WGPU_COMMA \
2895
+ /*.bytesPerRow=*/WGPU_COPY_STRIDE_UNDEFINED WGPU_COMMA \
2896
+ /*.rowsPerImage=*/WGPU_COPY_STRIDE_UNDEFINED WGPU_COMMA \
2897
+ })
2898
+
2899
+ typedef struct WGPUTextureViewDescriptor {
2900
+ WGPUChainedStruct const * nextInChain;
2901
+ WGPU_NULLABLE char const * label;
2902
+ WGPUTextureFormat format;
2903
+ WGPUTextureViewDimension dimension;
2904
+ uint32_t baseMipLevel;
2905
+ uint32_t mipLevelCount;
2906
+ uint32_t baseArrayLayer;
2907
+ uint32_t arrayLayerCount;
2908
+ WGPUTextureAspect aspect;
2909
+ } WGPUTextureViewDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2910
+
2911
+ #define WGPU_TEXTURE_VIEW_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUTextureViewDescriptor, { \
2912
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2913
+ /*.label=*/nullptr WGPU_COMMA \
2914
+ /*.format=*/WGPUTextureFormat_Undefined WGPU_COMMA \
2915
+ /*.dimension=*/WGPUTextureViewDimension_Undefined WGPU_COMMA \
2916
+ /*.baseMipLevel=*/0 WGPU_COMMA \
2917
+ /*.mipLevelCount=*/WGPU_MIP_LEVEL_COUNT_UNDEFINED WGPU_COMMA \
2918
+ /*.baseArrayLayer=*/0 WGPU_COMMA \
2919
+ /*.arrayLayerCount=*/WGPU_ARRAY_LAYER_COUNT_UNDEFINED WGPU_COMMA \
2920
+ /*.aspect=*/WGPUTextureAspect_All WGPU_COMMA \
2921
+ })
2922
+
2923
+ typedef struct WGPUUncapturedErrorCallbackInfo {
2924
+ WGPUChainedStruct const * nextInChain;
2925
+ WGPUErrorCallback callback;
2926
+ void * userdata;
2927
+ } WGPUUncapturedErrorCallbackInfo WGPU_STRUCTURE_ATTRIBUTE;
2928
+
2929
+ #define WGPU_UNCAPTURED_ERROR_CALLBACK_INFO_INIT WGPU_MAKE_INIT_STRUCT(WGPUUncapturedErrorCallbackInfo, { \
2930
+ /*.nextInChain=*/nullptr WGPU_COMMA \
2931
+ /*.callback=*/nullptr WGPU_COMMA \
2932
+ /*.userdata=*/nullptr WGPU_COMMA \
2933
+ })
2934
+
2935
+ typedef struct WGPUVertexAttribute {
2936
+ WGPUVertexFormat format;
2937
+ uint64_t offset;
2938
+ uint32_t shaderLocation;
2939
+ } WGPUVertexAttribute WGPU_STRUCTURE_ATTRIBUTE;
2940
+
2941
+ #define WGPU_VERTEX_ATTRIBUTE_INIT WGPU_MAKE_INIT_STRUCT(WGPUVertexAttribute, { \
2942
+ /*.format=*/{} WGPU_COMMA \
2943
+ /*.offset=*/{} WGPU_COMMA \
2944
+ /*.shaderLocation=*/{} WGPU_COMMA \
2945
+ })
2946
+
2947
+ // Can be chained in WGPUSamplerDescriptor
2948
+ // Can be chained in WGPUTextureViewDescriptor
2949
+ typedef struct WGPUYCbCrVkDescriptor {
2950
+ WGPUChainedStruct chain;
2951
+ uint32_t vkFormat;
2952
+ uint32_t vkYCbCrModel;
2953
+ uint32_t vkYCbCrRange;
2954
+ uint32_t vkComponentSwizzleRed;
2955
+ uint32_t vkComponentSwizzleGreen;
2956
+ uint32_t vkComponentSwizzleBlue;
2957
+ uint32_t vkComponentSwizzleAlpha;
2958
+ uint32_t vkXChromaOffset;
2959
+ uint32_t vkYChromaOffset;
2960
+ WGPUFilterMode vkChromaFilter;
2961
+ WGPUBool forceExplicitReconstruction;
2962
+ uint64_t externalFormat;
2963
+ } WGPUYCbCrVkDescriptor WGPU_STRUCTURE_ATTRIBUTE;
2964
+
2965
+ #define WGPU_Y_CB_CR_VK_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUYCbCrVkDescriptor, { \
2966
+ /*.chain=*/{} WGPU_COMMA \
2967
+ /*.vkFormat=*/0 WGPU_COMMA \
2968
+ /*.vkYCbCrModel=*/0 WGPU_COMMA \
2969
+ /*.vkYCbCrRange=*/0 WGPU_COMMA \
2970
+ /*.vkComponentSwizzleRed=*/0 WGPU_COMMA \
2971
+ /*.vkComponentSwizzleGreen=*/0 WGPU_COMMA \
2972
+ /*.vkComponentSwizzleBlue=*/0 WGPU_COMMA \
2973
+ /*.vkComponentSwizzleAlpha=*/0 WGPU_COMMA \
2974
+ /*.vkXChromaOffset=*/0 WGPU_COMMA \
2975
+ /*.vkYChromaOffset=*/0 WGPU_COMMA \
2976
+ /*.vkChromaFilter=*/WGPUFilterMode_Nearest WGPU_COMMA \
2977
+ /*.forceExplicitReconstruction=*/false WGPU_COMMA \
2978
+ /*.externalFormat=*/0 WGPU_COMMA \
2979
+ })
2980
+
2981
+ typedef struct WGPUAHardwareBufferProperties {
2982
+ WGPUYCbCrVkDescriptor yCbCrInfo;
2983
+ } WGPUAHardwareBufferProperties WGPU_STRUCTURE_ATTRIBUTE;
2984
+
2985
+ #define WGPU_A_HARDWARE_BUFFER_PROPERTIES_INIT WGPU_MAKE_INIT_STRUCT(WGPUAHardwareBufferProperties, { \
2986
+ /*.yCbCrInfo=*/WGPU_Y_CB_CR_VK_DESCRIPTOR_INIT WGPU_COMMA \
2987
+ })
2988
+
2989
+ // Can be chained in WGPUAdapterInfo
2990
+ // Can be chained in WGPUAdapterProperties
2991
+ typedef struct WGPUAdapterPropertiesMemoryHeaps {
2992
+ WGPUChainedStructOut chain;
2993
+ size_t heapCount;
2994
+ WGPUMemoryHeapInfo const * heapInfo;
2995
+ } WGPUAdapterPropertiesMemoryHeaps WGPU_STRUCTURE_ATTRIBUTE;
2996
+
2997
+ #define WGPU_ADAPTER_PROPERTIES_MEMORY_HEAPS_INIT WGPU_MAKE_INIT_STRUCT(WGPUAdapterPropertiesMemoryHeaps, { \
2998
+ /*.chain=*/{} WGPU_COMMA \
2999
+ /*.heapCount=*/{} WGPU_COMMA \
3000
+ /*.heapInfo=*/{} WGPU_COMMA \
3001
+ })
3002
+
3003
+ typedef struct WGPUBindGroupDescriptor {
3004
+ WGPUChainedStruct const * nextInChain;
3005
+ WGPU_NULLABLE char const * label;
3006
+ WGPUBindGroupLayout layout;
3007
+ size_t entryCount;
3008
+ WGPUBindGroupEntry const * entries;
3009
+ } WGPUBindGroupDescriptor WGPU_STRUCTURE_ATTRIBUTE;
3010
+
3011
+ #define WGPU_BIND_GROUP_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUBindGroupDescriptor, { \
3012
+ /*.nextInChain=*/nullptr WGPU_COMMA \
3013
+ /*.label=*/nullptr WGPU_COMMA \
3014
+ /*.layout=*/{} WGPU_COMMA \
3015
+ /*.entryCount=*/{} WGPU_COMMA \
3016
+ /*.entries=*/{} WGPU_COMMA \
3017
+ })
3018
+
3019
+ typedef struct WGPUBindGroupLayoutEntry {
3020
+ WGPUChainedStruct const * nextInChain;
3021
+ uint32_t binding;
3022
+ WGPUShaderStage visibility;
3023
+ WGPUBufferBindingLayout buffer;
3024
+ WGPUSamplerBindingLayout sampler;
3025
+ WGPUTextureBindingLayout texture;
3026
+ WGPUStorageTextureBindingLayout storageTexture;
3027
+ } WGPUBindGroupLayoutEntry WGPU_STRUCTURE_ATTRIBUTE;
3028
+
3029
+ #define WGPU_BIND_GROUP_LAYOUT_ENTRY_INIT WGPU_MAKE_INIT_STRUCT(WGPUBindGroupLayoutEntry, { \
3030
+ /*.nextInChain=*/nullptr WGPU_COMMA \
3031
+ /*.binding=*/{} WGPU_COMMA \
3032
+ /*.visibility=*/{} WGPU_COMMA \
3033
+ /*.buffer=*/WGPU_BUFFER_BINDING_LAYOUT_INIT WGPU_COMMA \
3034
+ /*.sampler=*/WGPU_SAMPLER_BINDING_LAYOUT_INIT WGPU_COMMA \
3035
+ /*.texture=*/WGPU_TEXTURE_BINDING_LAYOUT_INIT WGPU_COMMA \
3036
+ /*.storageTexture=*/WGPU_STORAGE_TEXTURE_BINDING_LAYOUT_INIT WGPU_COMMA \
3037
+ })
3038
+
3039
+ typedef struct WGPUBlendState {
3040
+ WGPUBlendComponent color;
3041
+ WGPUBlendComponent alpha;
3042
+ } WGPUBlendState WGPU_STRUCTURE_ATTRIBUTE;
3043
+
3044
+ #define WGPU_BLEND_STATE_INIT WGPU_MAKE_INIT_STRUCT(WGPUBlendState, { \
3045
+ /*.color=*/WGPU_BLEND_COMPONENT_INIT WGPU_COMMA \
3046
+ /*.alpha=*/WGPU_BLEND_COMPONENT_INIT WGPU_COMMA \
3047
+ })
3048
+
3049
+ typedef struct WGPUCompilationInfo {
3050
+ WGPUChainedStruct const * nextInChain;
3051
+ size_t messageCount;
3052
+ WGPUCompilationMessage const * messages;
3053
+ } WGPUCompilationInfo WGPU_STRUCTURE_ATTRIBUTE;
3054
+
3055
+ #define WGPU_COMPILATION_INFO_INIT WGPU_MAKE_INIT_STRUCT(WGPUCompilationInfo, { \
3056
+ /*.nextInChain=*/nullptr WGPU_COMMA \
3057
+ /*.messageCount=*/{} WGPU_COMMA \
3058
+ /*.messages=*/{} WGPU_COMMA \
3059
+ })
3060
+
3061
+ typedef struct WGPUComputePassDescriptor {
3062
+ WGPUChainedStruct const * nextInChain;
3063
+ WGPU_NULLABLE char const * label;
3064
+ WGPU_NULLABLE WGPUComputePassTimestampWrites const * timestampWrites;
3065
+ } WGPUComputePassDescriptor WGPU_STRUCTURE_ATTRIBUTE;
3066
+
3067
+ #define WGPU_COMPUTE_PASS_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUComputePassDescriptor, { \
3068
+ /*.nextInChain=*/nullptr WGPU_COMMA \
3069
+ /*.label=*/nullptr WGPU_COMMA \
3070
+ /*.timestampWrites=*/nullptr WGPU_COMMA \
3071
+ })
3072
+
3073
+ typedef struct WGPUDepthStencilState {
3074
+ WGPUChainedStruct const * nextInChain;
3075
+ WGPUTextureFormat format;
3076
+ WGPUBool depthWriteEnabled;
3077
+ WGPUCompareFunction depthCompare;
3078
+ WGPUStencilFaceState stencilFront;
3079
+ WGPUStencilFaceState stencilBack;
3080
+ uint32_t stencilReadMask;
3081
+ uint32_t stencilWriteMask;
3082
+ int32_t depthBias;
3083
+ float depthBiasSlopeScale;
3084
+ float depthBiasClamp;
3085
+ } WGPUDepthStencilState WGPU_STRUCTURE_ATTRIBUTE;
3086
+
3087
+ #define WGPU_DEPTH_STENCIL_STATE_INIT WGPU_MAKE_INIT_STRUCT(WGPUDepthStencilState, { \
3088
+ /*.nextInChain=*/nullptr WGPU_COMMA \
3089
+ /*.format=*/{} WGPU_COMMA \
3090
+ /*.depthWriteEnabled=*/false WGPU_COMMA \
3091
+ /*.depthCompare=*/WGPUCompareFunction_Undefined WGPU_COMMA \
3092
+ /*.stencilFront=*/WGPU_STENCIL_FACE_STATE_INIT WGPU_COMMA \
3093
+ /*.stencilBack=*/WGPU_STENCIL_FACE_STATE_INIT WGPU_COMMA \
3094
+ /*.stencilReadMask=*/0xFFFFFFFF WGPU_COMMA \
3095
+ /*.stencilWriteMask=*/0xFFFFFFFF WGPU_COMMA \
3096
+ /*.depthBias=*/0 WGPU_COMMA \
3097
+ /*.depthBiasSlopeScale=*/0.0f WGPU_COMMA \
3098
+ /*.depthBiasClamp=*/0.0f WGPU_COMMA \
3099
+ })
3100
+
3101
+ // Can be chained in WGPUFormatCapabilities
3102
+ typedef struct WGPUDrmFormatCapabilities {
3103
+ WGPUChainedStructOut chain;
3104
+ size_t propertiesCount;
3105
+ WGPUDrmFormatProperties const * properties;
3106
+ } WGPUDrmFormatCapabilities WGPU_STRUCTURE_ATTRIBUTE;
3107
+
3108
+ #define WGPU_DRM_FORMAT_CAPABILITIES_INIT WGPU_MAKE_INIT_STRUCT(WGPUDrmFormatCapabilities, { \
3109
+ /*.chain=*/{} WGPU_COMMA \
3110
+ /*.propertiesCount=*/{} WGPU_COMMA \
3111
+ /*.properties=*/{} WGPU_COMMA \
3112
+ })
3113
+
3114
+ typedef struct WGPUExternalTextureDescriptor {
3115
+ WGPUChainedStruct const * nextInChain;
3116
+ WGPU_NULLABLE char const * label;
3117
+ WGPUTextureView plane0;
3118
+ WGPU_NULLABLE WGPUTextureView plane1;
3119
+ WGPUOrigin2D visibleOrigin;
3120
+ WGPUExtent2D visibleSize;
3121
+ WGPUBool doYuvToRgbConversionOnly;
3122
+ WGPU_NULLABLE float const * yuvToRgbConversionMatrix;
3123
+ float const * srcTransferFunctionParameters;
3124
+ float const * dstTransferFunctionParameters;
3125
+ float const * gamutConversionMatrix;
3126
+ WGPUBool mirrored;
3127
+ WGPUExternalTextureRotation rotation;
3128
+ } WGPUExternalTextureDescriptor WGPU_STRUCTURE_ATTRIBUTE;
3129
+
3130
+ #define WGPU_EXTERNAL_TEXTURE_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUExternalTextureDescriptor, { \
3131
+ /*.nextInChain=*/nullptr WGPU_COMMA \
3132
+ /*.label=*/nullptr WGPU_COMMA \
3133
+ /*.plane0=*/{} WGPU_COMMA \
3134
+ /*.plane1=*/nullptr WGPU_COMMA \
3135
+ /*.visibleOrigin=*/WGPU_ORIGIN_2D_INIT WGPU_COMMA \
3136
+ /*.visibleSize=*/WGPU_EXTENT_2D_INIT WGPU_COMMA \
3137
+ /*.doYuvToRgbConversionOnly=*/false WGPU_COMMA \
3138
+ /*.yuvToRgbConversionMatrix=*/nullptr WGPU_COMMA \
3139
+ /*.srcTransferFunctionParameters=*/{} WGPU_COMMA \
3140
+ /*.dstTransferFunctionParameters=*/{} WGPU_COMMA \
3141
+ /*.gamutConversionMatrix=*/{} WGPU_COMMA \
3142
+ /*.mirrored=*/false WGPU_COMMA \
3143
+ /*.rotation=*/WGPUExternalTextureRotation_Rotate0Degrees WGPU_COMMA \
3144
+ })
3145
+
3146
+ typedef struct WGPUFutureWaitInfo {
3147
+ WGPUFuture future;
3148
+ WGPUBool completed;
3149
+ } WGPUFutureWaitInfo WGPU_STRUCTURE_ATTRIBUTE;
3150
+
3151
+ #define WGPU_FUTURE_WAIT_INFO_INIT WGPU_MAKE_INIT_STRUCT(WGPUFutureWaitInfo, { \
3152
+ /*.future=*/WGPU_FUTURE_INIT WGPU_COMMA \
3153
+ /*.completed=*/false WGPU_COMMA \
3154
+ })
3155
+
3156
+ typedef struct WGPUImageCopyBuffer {
3157
+ WGPUTextureDataLayout layout;
3158
+ WGPUBuffer buffer;
3159
+ } WGPUImageCopyBuffer WGPU_STRUCTURE_ATTRIBUTE;
3160
+
3161
+ #define WGPU_IMAGE_COPY_BUFFER_INIT WGPU_MAKE_INIT_STRUCT(WGPUImageCopyBuffer, { \
3162
+ /*.layout=*/WGPU_TEXTURE_DATA_LAYOUT_INIT WGPU_COMMA \
3163
+ /*.buffer=*/{} WGPU_COMMA \
3164
+ })
3165
+
3166
+ typedef struct WGPUImageCopyExternalTexture {
3167
+ WGPUChainedStruct const * nextInChain;
3168
+ WGPUExternalTexture externalTexture;
3169
+ WGPUOrigin3D origin;
3170
+ WGPUExtent2D naturalSize;
3171
+ } WGPUImageCopyExternalTexture WGPU_STRUCTURE_ATTRIBUTE;
3172
+
3173
+ #define WGPU_IMAGE_COPY_EXTERNAL_TEXTURE_INIT WGPU_MAKE_INIT_STRUCT(WGPUImageCopyExternalTexture, { \
3174
+ /*.nextInChain=*/nullptr WGPU_COMMA \
3175
+ /*.externalTexture=*/{} WGPU_COMMA \
3176
+ /*.origin=*/WGPU_ORIGIN_3D_INIT WGPU_COMMA \
3177
+ /*.naturalSize=*/WGPU_EXTENT_2D_INIT WGPU_COMMA \
3178
+ })
3179
+
3180
+ typedef struct WGPUImageCopyTexture {
3181
+ WGPUTexture texture;
3182
+ uint32_t mipLevel;
3183
+ WGPUOrigin3D origin;
3184
+ WGPUTextureAspect aspect;
3185
+ } WGPUImageCopyTexture WGPU_STRUCTURE_ATTRIBUTE;
3186
+
3187
+ #define WGPU_IMAGE_COPY_TEXTURE_INIT WGPU_MAKE_INIT_STRUCT(WGPUImageCopyTexture, { \
3188
+ /*.texture=*/{} WGPU_COMMA \
3189
+ /*.mipLevel=*/0 WGPU_COMMA \
3190
+ /*.origin=*/WGPU_ORIGIN_3D_INIT WGPU_COMMA \
3191
+ /*.aspect=*/WGPUTextureAspect_All WGPU_COMMA \
3192
+ })
3193
+
3194
+ typedef struct WGPUInstanceDescriptor {
3195
+ WGPUChainedStruct const * nextInChain;
3196
+ WGPUInstanceFeatures features;
3197
+ } WGPUInstanceDescriptor WGPU_STRUCTURE_ATTRIBUTE;
3198
+
3199
+ #define WGPU_INSTANCE_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUInstanceDescriptor, { \
3200
+ /*.nextInChain=*/nullptr WGPU_COMMA \
3201
+ /*.features=*/WGPU_INSTANCE_FEATURES_INIT WGPU_COMMA \
3202
+ })
3203
+
3204
+ // Can be chained in WGPUPipelineLayoutDescriptor
3205
+ typedef struct WGPUPipelineLayoutPixelLocalStorage {
3206
+ WGPUChainedStruct chain;
3207
+ uint64_t totalPixelLocalStorageSize;
3208
+ size_t storageAttachmentCount;
3209
+ WGPUPipelineLayoutStorageAttachment const * storageAttachments;
3210
+ } WGPUPipelineLayoutPixelLocalStorage WGPU_STRUCTURE_ATTRIBUTE;
3211
+
3212
+ #define WGPU_PIPELINE_LAYOUT_PIXEL_LOCAL_STORAGE_INIT WGPU_MAKE_INIT_STRUCT(WGPUPipelineLayoutPixelLocalStorage, { \
3213
+ /*.chain=*/{} WGPU_COMMA \
3214
+ /*.totalPixelLocalStorageSize=*/{} WGPU_COMMA \
3215
+ /*.storageAttachmentCount=*/0 WGPU_COMMA \
3216
+ /*.storageAttachments=*/{} WGPU_COMMA \
3217
+ })
3218
+
3219
+ typedef struct WGPUProgrammableStageDescriptor {
3220
+ WGPUChainedStruct const * nextInChain;
3221
+ WGPUShaderModule module;
3222
+ WGPU_NULLABLE char const * entryPoint;
3223
+ size_t constantCount;
3224
+ WGPUConstantEntry const * constants;
3225
+ } WGPUProgrammableStageDescriptor WGPU_STRUCTURE_ATTRIBUTE;
3226
+
3227
+ #define WGPU_PROGRAMMABLE_STAGE_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUProgrammableStageDescriptor, { \
3228
+ /*.nextInChain=*/nullptr WGPU_COMMA \
3229
+ /*.module=*/{} WGPU_COMMA \
3230
+ /*.entryPoint=*/nullptr WGPU_COMMA \
3231
+ /*.constantCount=*/0 WGPU_COMMA \
3232
+ /*.constants=*/{} WGPU_COMMA \
3233
+ })
3234
+
3235
+ typedef struct WGPURenderPassColorAttachment {
3236
+ WGPUChainedStruct const * nextInChain;
3237
+ WGPU_NULLABLE WGPUTextureView view;
3238
+ uint32_t depthSlice;
3239
+ WGPU_NULLABLE WGPUTextureView resolveTarget;
3240
+ WGPULoadOp loadOp;
3241
+ WGPUStoreOp storeOp;
3242
+ WGPUColor clearValue;
3243
+ } WGPURenderPassColorAttachment WGPU_STRUCTURE_ATTRIBUTE;
3244
+
3245
+ #define WGPU_RENDER_PASS_COLOR_ATTACHMENT_INIT WGPU_MAKE_INIT_STRUCT(WGPURenderPassColorAttachment, { \
3246
+ /*.nextInChain=*/nullptr WGPU_COMMA \
3247
+ /*.view=*/nullptr WGPU_COMMA \
3248
+ /*.depthSlice=*/WGPU_DEPTH_SLICE_UNDEFINED WGPU_COMMA \
3249
+ /*.resolveTarget=*/nullptr WGPU_COMMA \
3250
+ /*.loadOp=*/{} WGPU_COMMA \
3251
+ /*.storeOp=*/{} WGPU_COMMA \
3252
+ /*.clearValue=*/WGPU_COLOR_INIT WGPU_COMMA \
3253
+ })
3254
+
3255
+ typedef struct WGPURenderPassStorageAttachment {
3256
+ WGPUChainedStruct const * nextInChain;
3257
+ uint64_t offset;
3258
+ WGPUTextureView storage;
3259
+ WGPULoadOp loadOp;
3260
+ WGPUStoreOp storeOp;
3261
+ WGPUColor clearValue;
3262
+ } WGPURenderPassStorageAttachment WGPU_STRUCTURE_ATTRIBUTE;
3263
+
3264
+ #define WGPU_RENDER_PASS_STORAGE_ATTACHMENT_INIT WGPU_MAKE_INIT_STRUCT(WGPURenderPassStorageAttachment, { \
3265
+ /*.nextInChain=*/nullptr WGPU_COMMA \
3266
+ /*.offset=*/0 WGPU_COMMA \
3267
+ /*.storage=*/{} WGPU_COMMA \
3268
+ /*.loadOp=*/{} WGPU_COMMA \
3269
+ /*.storeOp=*/{} WGPU_COMMA \
3270
+ /*.clearValue=*/WGPU_COLOR_INIT WGPU_COMMA \
3271
+ })
3272
+
3273
+ typedef struct WGPURequiredLimits {
3274
+ WGPUChainedStruct const * nextInChain;
3275
+ WGPULimits limits;
3276
+ } WGPURequiredLimits WGPU_STRUCTURE_ATTRIBUTE;
3277
+
3278
+ #define WGPU_REQUIRED_LIMITS_INIT WGPU_MAKE_INIT_STRUCT(WGPURequiredLimits, { \
3279
+ /*.nextInChain=*/nullptr WGPU_COMMA \
3280
+ /*.limits=*/WGPU_LIMITS_INIT WGPU_COMMA \
3281
+ })
3282
+
3283
+ // Can be chained in WGPUSharedTextureMemoryProperties
3284
+ typedef struct WGPUSharedTextureMemoryAHardwareBufferProperties {
3285
+ WGPUChainedStructOut chain;
3286
+ WGPUYCbCrVkDescriptor yCbCrInfo;
3287
+ } WGPUSharedTextureMemoryAHardwareBufferProperties WGPU_STRUCTURE_ATTRIBUTE;
3288
+
3289
+ #define WGPU_SHARED_TEXTURE_MEMORY_A_HARDWARE_BUFFER_PROPERTIES_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryAHardwareBufferProperties, { \
3290
+ /*.chain=*/{} WGPU_COMMA \
3291
+ /*.yCbCrInfo=*/WGPU_Y_CB_CR_VK_DESCRIPTOR_INIT WGPU_COMMA \
3292
+ })
3293
+
3294
+ // Can be chained in WGPUSharedTextureMemoryDescriptor
3295
+ typedef struct WGPUSharedTextureMemoryDmaBufDescriptor {
3296
+ WGPUChainedStruct chain;
3297
+ WGPUExtent3D size;
3298
+ uint32_t drmFormat;
3299
+ uint64_t drmModifier;
3300
+ size_t planeCount;
3301
+ WGPUSharedTextureMemoryDmaBufPlane const * planes;
3302
+ } WGPUSharedTextureMemoryDmaBufDescriptor WGPU_STRUCTURE_ATTRIBUTE;
3303
+
3304
+ #define WGPU_SHARED_TEXTURE_MEMORY_DMA_BUF_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryDmaBufDescriptor, { \
3305
+ /*.chain=*/{} WGPU_COMMA \
3306
+ /*.size=*/WGPU_EXTENT_3D_INIT WGPU_COMMA \
3307
+ /*.drmFormat=*/{} WGPU_COMMA \
3308
+ /*.drmModifier=*/{} WGPU_COMMA \
3309
+ /*.planeCount=*/{} WGPU_COMMA \
3310
+ /*.planes=*/{} WGPU_COMMA \
3311
+ })
3312
+
3313
+ typedef struct WGPUSharedTextureMemoryProperties {
3314
+ WGPUChainedStructOut * nextInChain;
3315
+ WGPUTextureUsage usage;
3316
+ WGPUExtent3D size;
3317
+ WGPUTextureFormat format;
3318
+ } WGPUSharedTextureMemoryProperties WGPU_STRUCTURE_ATTRIBUTE;
3319
+
3320
+ #define WGPU_SHARED_TEXTURE_MEMORY_PROPERTIES_INIT WGPU_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryProperties, { \
3321
+ /*.nextInChain=*/nullptr WGPU_COMMA \
3322
+ /*.usage=*/{} WGPU_COMMA \
3323
+ /*.size=*/WGPU_EXTENT_3D_INIT WGPU_COMMA \
3324
+ /*.format=*/{} WGPU_COMMA \
3325
+ })
3326
+
3327
+ typedef struct WGPUSupportedLimits {
3328
+ WGPUChainedStructOut * nextInChain;
3329
+ WGPULimits limits;
3330
+ } WGPUSupportedLimits WGPU_STRUCTURE_ATTRIBUTE;
3331
+
3332
+ #define WGPU_SUPPORTED_LIMITS_INIT WGPU_MAKE_INIT_STRUCT(WGPUSupportedLimits, { \
3333
+ /*.nextInChain=*/nullptr WGPU_COMMA \
3334
+ /*.limits=*/WGPU_LIMITS_INIT WGPU_COMMA \
3335
+ })
3336
+
3337
+ typedef struct WGPUTextureDescriptor {
3338
+ WGPUChainedStruct const * nextInChain;
3339
+ WGPU_NULLABLE char const * label;
3340
+ WGPUTextureUsage usage;
3341
+ WGPUTextureDimension dimension;
3342
+ WGPUExtent3D size;
3343
+ WGPUTextureFormat format;
3344
+ uint32_t mipLevelCount;
3345
+ uint32_t sampleCount;
3346
+ size_t viewFormatCount;
3347
+ WGPUTextureFormat const * viewFormats;
3348
+ } WGPUTextureDescriptor WGPU_STRUCTURE_ATTRIBUTE;
3349
+
3350
+ #define WGPU_TEXTURE_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUTextureDescriptor, { \
3351
+ /*.nextInChain=*/nullptr WGPU_COMMA \
3352
+ /*.label=*/nullptr WGPU_COMMA \
3353
+ /*.usage=*/{} WGPU_COMMA \
3354
+ /*.dimension=*/WGPUTextureDimension_2D WGPU_COMMA \
3355
+ /*.size=*/WGPU_EXTENT_3D_INIT WGPU_COMMA \
3356
+ /*.format=*/{} WGPU_COMMA \
3357
+ /*.mipLevelCount=*/1 WGPU_COMMA \
3358
+ /*.sampleCount=*/1 WGPU_COMMA \
3359
+ /*.viewFormatCount=*/0 WGPU_COMMA \
3360
+ /*.viewFormats=*/{} WGPU_COMMA \
3361
+ })
3362
+
3363
+ typedef struct WGPUVertexBufferLayout {
3364
+ uint64_t arrayStride;
3365
+ WGPUVertexStepMode stepMode;
3366
+ size_t attributeCount;
3367
+ WGPUVertexAttribute const * attributes;
3368
+ } WGPUVertexBufferLayout WGPU_STRUCTURE_ATTRIBUTE;
3369
+
3370
+ #define WGPU_VERTEX_BUFFER_LAYOUT_INIT WGPU_MAKE_INIT_STRUCT(WGPUVertexBufferLayout, { \
3371
+ /*.arrayStride=*/{} WGPU_COMMA \
3372
+ /*.stepMode=*/WGPUVertexStepMode_Vertex WGPU_COMMA \
3373
+ /*.attributeCount=*/{} WGPU_COMMA \
3374
+ /*.attributes=*/{} WGPU_COMMA \
3375
+ })
3376
+
3377
+ typedef struct WGPUBindGroupLayoutDescriptor {
3378
+ WGPUChainedStruct const * nextInChain;
3379
+ WGPU_NULLABLE char const * label;
3380
+ size_t entryCount;
3381
+ WGPUBindGroupLayoutEntry const * entries;
3382
+ } WGPUBindGroupLayoutDescriptor WGPU_STRUCTURE_ATTRIBUTE;
3383
+
3384
+ #define WGPU_BIND_GROUP_LAYOUT_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUBindGroupLayoutDescriptor, { \
3385
+ /*.nextInChain=*/nullptr WGPU_COMMA \
3386
+ /*.label=*/nullptr WGPU_COMMA \
3387
+ /*.entryCount=*/{} WGPU_COMMA \
3388
+ /*.entries=*/{} WGPU_COMMA \
3389
+ })
3390
+
3391
+ typedef struct WGPUColorTargetState {
3392
+ WGPUChainedStruct const * nextInChain;
3393
+ WGPUTextureFormat format;
3394
+ WGPU_NULLABLE WGPUBlendState const * blend;
3395
+ WGPUColorWriteMask writeMask;
3396
+ } WGPUColorTargetState WGPU_STRUCTURE_ATTRIBUTE;
3397
+
3398
+ #define WGPU_COLOR_TARGET_STATE_INIT WGPU_MAKE_INIT_STRUCT(WGPUColorTargetState, { \
3399
+ /*.nextInChain=*/nullptr WGPU_COMMA \
3400
+ /*.format=*/{} WGPU_COMMA \
3401
+ /*.blend=*/nullptr WGPU_COMMA \
3402
+ /*.writeMask=*/WGPUColorWriteMask_All WGPU_COMMA \
3403
+ })
3404
+
3405
+ typedef struct WGPUComputePipelineDescriptor {
3406
+ WGPUChainedStruct const * nextInChain;
3407
+ WGPU_NULLABLE char const * label;
3408
+ WGPU_NULLABLE WGPUPipelineLayout layout;
3409
+ WGPUProgrammableStageDescriptor compute;
3410
+ } WGPUComputePipelineDescriptor WGPU_STRUCTURE_ATTRIBUTE;
3411
+
3412
+ #define WGPU_COMPUTE_PIPELINE_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUComputePipelineDescriptor, { \
3413
+ /*.nextInChain=*/nullptr WGPU_COMMA \
3414
+ /*.label=*/nullptr WGPU_COMMA \
3415
+ /*.layout=*/nullptr WGPU_COMMA \
3416
+ /*.compute=*/WGPU_PROGRAMMABLE_STAGE_DESCRIPTOR_INIT WGPU_COMMA \
3417
+ })
3418
+
3419
+ typedef struct WGPUDeviceDescriptor {
3420
+ WGPUChainedStruct const * nextInChain;
3421
+ WGPU_NULLABLE char const * label;
3422
+ size_t requiredFeatureCount;
3423
+ WGPUFeatureName const * requiredFeatures;
3424
+ WGPU_NULLABLE WGPURequiredLimits const * requiredLimits;
3425
+ WGPUQueueDescriptor defaultQueue;
3426
+ WGPUDeviceLostCallback deviceLostCallback;
3427
+ void * deviceLostUserdata;
3428
+ WGPUDeviceLostCallbackInfo deviceLostCallbackInfo;
3429
+ WGPUUncapturedErrorCallbackInfo uncapturedErrorCallbackInfo;
3430
+ WGPUDeviceLostCallbackInfo2 deviceLostCallbackInfo2;
3431
+ WGPUUncapturedErrorCallbackInfo2 uncapturedErrorCallbackInfo2;
3432
+ } WGPUDeviceDescriptor WGPU_STRUCTURE_ATTRIBUTE;
3433
+
3434
+ #define WGPU_DEVICE_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPUDeviceDescriptor, { \
3435
+ /*.nextInChain=*/nullptr WGPU_COMMA \
3436
+ /*.label=*/nullptr WGPU_COMMA \
3437
+ /*.requiredFeatureCount=*/0 WGPU_COMMA \
3438
+ /*.requiredFeatures=*/nullptr WGPU_COMMA \
3439
+ /*.requiredLimits=*/nullptr WGPU_COMMA \
3440
+ /*.defaultQueue=*/WGPU_QUEUE_DESCRIPTOR_INIT WGPU_COMMA \
3441
+ /*.deviceLostCallback=*/nullptr WGPU_COMMA \
3442
+ /*.deviceLostUserdata=*/nullptr WGPU_COMMA \
3443
+ /*.deviceLostCallbackInfo=*/WGPU_DEVICE_LOST_CALLBACK_INFO_INIT WGPU_COMMA \
3444
+ /*.uncapturedErrorCallbackInfo=*/WGPU_UNCAPTURED_ERROR_CALLBACK_INFO_INIT WGPU_COMMA \
3445
+ /*.deviceLostCallbackInfo2=*/{} WGPU_COMMA \
3446
+ /*.uncapturedErrorCallbackInfo2=*/{} WGPU_COMMA \
3447
+ })
3448
+
3449
+ typedef struct WGPURenderPassDescriptor {
3450
+ WGPUChainedStruct const * nextInChain;
3451
+ WGPU_NULLABLE char const * label;
3452
+ size_t colorAttachmentCount;
3453
+ WGPURenderPassColorAttachment const * colorAttachments;
3454
+ WGPU_NULLABLE WGPURenderPassDepthStencilAttachment const * depthStencilAttachment;
3455
+ WGPU_NULLABLE WGPUQuerySet occlusionQuerySet;
3456
+ WGPU_NULLABLE WGPURenderPassTimestampWrites const * timestampWrites;
3457
+ } WGPURenderPassDescriptor WGPU_STRUCTURE_ATTRIBUTE;
3458
+
3459
+ #define WGPU_RENDER_PASS_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPURenderPassDescriptor, { \
3460
+ /*.nextInChain=*/nullptr WGPU_COMMA \
3461
+ /*.label=*/nullptr WGPU_COMMA \
3462
+ /*.colorAttachmentCount=*/{} WGPU_COMMA \
3463
+ /*.colorAttachments=*/{} WGPU_COMMA \
3464
+ /*.depthStencilAttachment=*/nullptr WGPU_COMMA \
3465
+ /*.occlusionQuerySet=*/nullptr WGPU_COMMA \
3466
+ /*.timestampWrites=*/nullptr WGPU_COMMA \
3467
+ })
3468
+
3469
+ // Can be chained in WGPURenderPassDescriptor
3470
+ typedef struct WGPURenderPassPixelLocalStorage {
3471
+ WGPUChainedStruct chain;
3472
+ uint64_t totalPixelLocalStorageSize;
3473
+ size_t storageAttachmentCount;
3474
+ WGPURenderPassStorageAttachment const * storageAttachments;
3475
+ } WGPURenderPassPixelLocalStorage WGPU_STRUCTURE_ATTRIBUTE;
3476
+
3477
+ #define WGPU_RENDER_PASS_PIXEL_LOCAL_STORAGE_INIT WGPU_MAKE_INIT_STRUCT(WGPURenderPassPixelLocalStorage, { \
3478
+ /*.chain=*/{} WGPU_COMMA \
3479
+ /*.totalPixelLocalStorageSize=*/{} WGPU_COMMA \
3480
+ /*.storageAttachmentCount=*/0 WGPU_COMMA \
3481
+ /*.storageAttachments=*/{} WGPU_COMMA \
3482
+ })
3483
+
3484
+ typedef struct WGPUVertexState {
3485
+ WGPUChainedStruct const * nextInChain;
3486
+ WGPUShaderModule module;
3487
+ WGPU_NULLABLE char const * entryPoint;
3488
+ size_t constantCount;
3489
+ WGPUConstantEntry const * constants;
3490
+ size_t bufferCount;
3491
+ WGPUVertexBufferLayout const * buffers;
3492
+ } WGPUVertexState WGPU_STRUCTURE_ATTRIBUTE;
3493
+
3494
+ #define WGPU_VERTEX_STATE_INIT WGPU_MAKE_INIT_STRUCT(WGPUVertexState, { \
3495
+ /*.nextInChain=*/nullptr WGPU_COMMA \
3496
+ /*.module=*/{} WGPU_COMMA \
3497
+ /*.entryPoint=*/nullptr WGPU_COMMA \
3498
+ /*.constantCount=*/0 WGPU_COMMA \
3499
+ /*.constants=*/{} WGPU_COMMA \
3500
+ /*.bufferCount=*/0 WGPU_COMMA \
3501
+ /*.buffers=*/{} WGPU_COMMA \
3502
+ })
3503
+
3504
+ typedef struct WGPUFragmentState {
3505
+ WGPUChainedStruct const * nextInChain;
3506
+ WGPUShaderModule module;
3507
+ WGPU_NULLABLE char const * entryPoint;
3508
+ size_t constantCount;
3509
+ WGPUConstantEntry const * constants;
3510
+ size_t targetCount;
3511
+ WGPUColorTargetState const * targets;
3512
+ } WGPUFragmentState WGPU_STRUCTURE_ATTRIBUTE;
3513
+
3514
+ #define WGPU_FRAGMENT_STATE_INIT WGPU_MAKE_INIT_STRUCT(WGPUFragmentState, { \
3515
+ /*.nextInChain=*/nullptr WGPU_COMMA \
3516
+ /*.module=*/{} WGPU_COMMA \
3517
+ /*.entryPoint=*/nullptr WGPU_COMMA \
3518
+ /*.constantCount=*/0 WGPU_COMMA \
3519
+ /*.constants=*/{} WGPU_COMMA \
3520
+ /*.targetCount=*/{} WGPU_COMMA \
3521
+ /*.targets=*/{} WGPU_COMMA \
3522
+ })
3523
+
3524
+ typedef struct WGPURenderPipelineDescriptor {
3525
+ WGPUChainedStruct const * nextInChain;
3526
+ WGPU_NULLABLE char const * label;
3527
+ WGPU_NULLABLE WGPUPipelineLayout layout;
3528
+ WGPUVertexState vertex;
3529
+ WGPUPrimitiveState primitive;
3530
+ WGPU_NULLABLE WGPUDepthStencilState const * depthStencil;
3531
+ WGPUMultisampleState multisample;
3532
+ WGPU_NULLABLE WGPUFragmentState const * fragment;
3533
+ } WGPURenderPipelineDescriptor WGPU_STRUCTURE_ATTRIBUTE;
3534
+
3535
+ #define WGPU_RENDER_PIPELINE_DESCRIPTOR_INIT WGPU_MAKE_INIT_STRUCT(WGPURenderPipelineDescriptor, { \
3536
+ /*.nextInChain=*/nullptr WGPU_COMMA \
3537
+ /*.label=*/nullptr WGPU_COMMA \
3538
+ /*.layout=*/nullptr WGPU_COMMA \
3539
+ /*.vertex=*/WGPU_VERTEX_STATE_INIT WGPU_COMMA \
3540
+ /*.primitive=*/WGPU_PRIMITIVE_STATE_INIT WGPU_COMMA \
3541
+ /*.depthStencil=*/nullptr WGPU_COMMA \
3542
+ /*.multisample=*/WGPU_MULTISAMPLE_STATE_INIT WGPU_COMMA \
3543
+ /*.fragment=*/nullptr WGPU_COMMA \
3544
+ })
3545
+
3546
+ #ifdef __cplusplus
3547
+ extern "C" {
3548
+ #endif
3549
+
3550
+ #if !defined(WGPU_SKIP_PROCS)
3551
+
3552
+ typedef void (*WGPUProcAdapterInfoFreeMembers)(WGPUAdapterInfo value) WGPU_FUNCTION_ATTRIBUTE;
3553
+ typedef void (*WGPUProcAdapterPropertiesFreeMembers)(WGPUAdapterProperties value) WGPU_FUNCTION_ATTRIBUTE;
3554
+ typedef void (*WGPUProcAdapterPropertiesMemoryHeapsFreeMembers)(WGPUAdapterPropertiesMemoryHeaps value) WGPU_FUNCTION_ATTRIBUTE;
3555
+ typedef WGPUInstance (*WGPUProcCreateInstance)(WGPUInstanceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3556
+ typedef void (*WGPUProcDrmFormatCapabilitiesFreeMembers)(WGPUDrmFormatCapabilities value) WGPU_FUNCTION_ATTRIBUTE;
3557
+ typedef WGPUStatus (*WGPUProcGetInstanceFeatures)(WGPUInstanceFeatures * features) WGPU_FUNCTION_ATTRIBUTE;
3558
+ typedef WGPUProc (*WGPUProcGetProcAddress)(WGPUDevice device, char const * procName) WGPU_FUNCTION_ATTRIBUTE;
3559
+ typedef void (*WGPUProcSharedBufferMemoryEndAccessStateFreeMembers)(WGPUSharedBufferMemoryEndAccessState value) WGPU_FUNCTION_ATTRIBUTE;
3560
+ typedef void (*WGPUProcSharedTextureMemoryEndAccessStateFreeMembers)(WGPUSharedTextureMemoryEndAccessState value) WGPU_FUNCTION_ATTRIBUTE;
3561
+ typedef void (*WGPUProcSurfaceCapabilitiesFreeMembers)(WGPUSurfaceCapabilities value) WGPU_FUNCTION_ATTRIBUTE;
3562
+
3563
+ // Procs of Adapter
3564
+ typedef WGPUDevice (*WGPUProcAdapterCreateDevice)(WGPUAdapter adapter, WGPU_NULLABLE WGPUDeviceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3565
+ typedef size_t (*WGPUProcAdapterEnumerateFeatures)(WGPUAdapter adapter, WGPUFeatureName * features) WGPU_FUNCTION_ATTRIBUTE;
3566
+ typedef WGPUStatus (*WGPUProcAdapterGetFormatCapabilities)(WGPUAdapter adapter, WGPUTextureFormat format, WGPUFormatCapabilities * capabilities) WGPU_FUNCTION_ATTRIBUTE;
3567
+ typedef WGPUStatus (*WGPUProcAdapterGetInfo)(WGPUAdapter adapter, WGPUAdapterInfo * info) WGPU_FUNCTION_ATTRIBUTE;
3568
+ typedef WGPUInstance (*WGPUProcAdapterGetInstance)(WGPUAdapter adapter) WGPU_FUNCTION_ATTRIBUTE;
3569
+ typedef WGPUStatus (*WGPUProcAdapterGetLimits)(WGPUAdapter adapter, WGPUSupportedLimits * limits) WGPU_FUNCTION_ATTRIBUTE;
3570
+ typedef WGPUStatus (*WGPUProcAdapterGetProperties)(WGPUAdapter adapter, WGPUAdapterProperties * properties) WGPU_FUNCTION_ATTRIBUTE;
3571
+ typedef WGPUBool (*WGPUProcAdapterHasFeature)(WGPUAdapter adapter, WGPUFeatureName feature) WGPU_FUNCTION_ATTRIBUTE;
3572
+ typedef void (*WGPUProcAdapterRequestDevice)(WGPUAdapter adapter, WGPU_NULLABLE WGPUDeviceDescriptor const * descriptor, WGPURequestDeviceCallback callback, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
3573
+ typedef WGPUFuture (*WGPUProcAdapterRequestDevice2)(WGPUAdapter adapter, WGPU_NULLABLE WGPUDeviceDescriptor const * options, WGPURequestDeviceCallbackInfo2 callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3574
+ typedef WGPUFuture (*WGPUProcAdapterRequestDeviceF)(WGPUAdapter adapter, WGPU_NULLABLE WGPUDeviceDescriptor const * options, WGPURequestDeviceCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3575
+ typedef void (*WGPUProcAdapterAddRef)(WGPUAdapter adapter) WGPU_FUNCTION_ATTRIBUTE;
3576
+ typedef void (*WGPUProcAdapterRelease)(WGPUAdapter adapter) WGPU_FUNCTION_ATTRIBUTE;
3577
+
3578
+ // Procs of BindGroup
3579
+ typedef void (*WGPUProcBindGroupSetLabel)(WGPUBindGroup bindGroup, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3580
+ typedef void (*WGPUProcBindGroupAddRef)(WGPUBindGroup bindGroup) WGPU_FUNCTION_ATTRIBUTE;
3581
+ typedef void (*WGPUProcBindGroupRelease)(WGPUBindGroup bindGroup) WGPU_FUNCTION_ATTRIBUTE;
3582
+
3583
+ // Procs of BindGroupLayout
3584
+ typedef void (*WGPUProcBindGroupLayoutSetLabel)(WGPUBindGroupLayout bindGroupLayout, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3585
+ typedef void (*WGPUProcBindGroupLayoutAddRef)(WGPUBindGroupLayout bindGroupLayout) WGPU_FUNCTION_ATTRIBUTE;
3586
+ typedef void (*WGPUProcBindGroupLayoutRelease)(WGPUBindGroupLayout bindGroupLayout) WGPU_FUNCTION_ATTRIBUTE;
3587
+
3588
+ // Procs of Buffer
3589
+ typedef void (*WGPUProcBufferDestroy)(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
3590
+ typedef void const * (*WGPUProcBufferGetConstMappedRange)(WGPUBuffer buffer, size_t offset, size_t size) WGPU_FUNCTION_ATTRIBUTE;
3591
+ typedef WGPUBufferMapState (*WGPUProcBufferGetMapState)(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
3592
+ typedef void * (*WGPUProcBufferGetMappedRange)(WGPUBuffer buffer, size_t offset, size_t size) WGPU_FUNCTION_ATTRIBUTE;
3593
+ typedef uint64_t (*WGPUProcBufferGetSize)(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
3594
+ typedef WGPUBufferUsage (*WGPUProcBufferGetUsage)(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
3595
+ typedef void (*WGPUProcBufferMapAsync)(WGPUBuffer buffer, WGPUMapMode mode, size_t offset, size_t size, WGPUBufferMapCallback callback, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
3596
+ typedef WGPUFuture (*WGPUProcBufferMapAsync2)(WGPUBuffer buffer, WGPUMapMode mode, size_t offset, size_t size, WGPUBufferMapCallbackInfo2 callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3597
+ typedef WGPUFuture (*WGPUProcBufferMapAsyncF)(WGPUBuffer buffer, WGPUMapMode mode, size_t offset, size_t size, WGPUBufferMapCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3598
+ typedef void (*WGPUProcBufferSetLabel)(WGPUBuffer buffer, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3599
+ typedef void (*WGPUProcBufferUnmap)(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
3600
+ typedef void (*WGPUProcBufferAddRef)(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
3601
+ typedef void (*WGPUProcBufferRelease)(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
3602
+
3603
+ // Procs of CommandBuffer
3604
+ typedef void (*WGPUProcCommandBufferSetLabel)(WGPUCommandBuffer commandBuffer, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3605
+ typedef void (*WGPUProcCommandBufferAddRef)(WGPUCommandBuffer commandBuffer) WGPU_FUNCTION_ATTRIBUTE;
3606
+ typedef void (*WGPUProcCommandBufferRelease)(WGPUCommandBuffer commandBuffer) WGPU_FUNCTION_ATTRIBUTE;
3607
+
3608
+ // Procs of CommandEncoder
3609
+ typedef WGPUComputePassEncoder (*WGPUProcCommandEncoderBeginComputePass)(WGPUCommandEncoder commandEncoder, WGPU_NULLABLE WGPUComputePassDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3610
+ typedef WGPURenderPassEncoder (*WGPUProcCommandEncoderBeginRenderPass)(WGPUCommandEncoder commandEncoder, WGPURenderPassDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3611
+ typedef void (*WGPUProcCommandEncoderClearBuffer)(WGPUCommandEncoder commandEncoder, WGPUBuffer buffer, uint64_t offset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
3612
+ typedef void (*WGPUProcCommandEncoderCopyBufferToBuffer)(WGPUCommandEncoder commandEncoder, WGPUBuffer source, uint64_t sourceOffset, WGPUBuffer destination, uint64_t destinationOffset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
3613
+ typedef void (*WGPUProcCommandEncoderCopyBufferToTexture)(WGPUCommandEncoder commandEncoder, WGPUImageCopyBuffer const * source, WGPUImageCopyTexture const * destination, WGPUExtent3D const * copySize) WGPU_FUNCTION_ATTRIBUTE;
3614
+ typedef void (*WGPUProcCommandEncoderCopyTextureToBuffer)(WGPUCommandEncoder commandEncoder, WGPUImageCopyTexture const * source, WGPUImageCopyBuffer const * destination, WGPUExtent3D const * copySize) WGPU_FUNCTION_ATTRIBUTE;
3615
+ typedef void (*WGPUProcCommandEncoderCopyTextureToTexture)(WGPUCommandEncoder commandEncoder, WGPUImageCopyTexture const * source, WGPUImageCopyTexture const * destination, WGPUExtent3D const * copySize) WGPU_FUNCTION_ATTRIBUTE;
3616
+ typedef WGPUCommandBuffer (*WGPUProcCommandEncoderFinish)(WGPUCommandEncoder commandEncoder, WGPU_NULLABLE WGPUCommandBufferDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3617
+ typedef void (*WGPUProcCommandEncoderInjectValidationError)(WGPUCommandEncoder commandEncoder, char const * message) WGPU_FUNCTION_ATTRIBUTE;
3618
+ typedef void (*WGPUProcCommandEncoderInsertDebugMarker)(WGPUCommandEncoder commandEncoder, char const * markerLabel) WGPU_FUNCTION_ATTRIBUTE;
3619
+ typedef void (*WGPUProcCommandEncoderPopDebugGroup)(WGPUCommandEncoder commandEncoder) WGPU_FUNCTION_ATTRIBUTE;
3620
+ typedef void (*WGPUProcCommandEncoderPushDebugGroup)(WGPUCommandEncoder commandEncoder, char const * groupLabel) WGPU_FUNCTION_ATTRIBUTE;
3621
+ typedef void (*WGPUProcCommandEncoderResolveQuerySet)(WGPUCommandEncoder commandEncoder, WGPUQuerySet querySet, uint32_t firstQuery, uint32_t queryCount, WGPUBuffer destination, uint64_t destinationOffset) WGPU_FUNCTION_ATTRIBUTE;
3622
+ typedef void (*WGPUProcCommandEncoderSetLabel)(WGPUCommandEncoder commandEncoder, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3623
+ typedef void (*WGPUProcCommandEncoderWriteBuffer)(WGPUCommandEncoder commandEncoder, WGPUBuffer buffer, uint64_t bufferOffset, uint8_t const * data, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
3624
+ typedef void (*WGPUProcCommandEncoderWriteTimestamp)(WGPUCommandEncoder commandEncoder, WGPUQuerySet querySet, uint32_t queryIndex) WGPU_FUNCTION_ATTRIBUTE;
3625
+ typedef void (*WGPUProcCommandEncoderAddRef)(WGPUCommandEncoder commandEncoder) WGPU_FUNCTION_ATTRIBUTE;
3626
+ typedef void (*WGPUProcCommandEncoderRelease)(WGPUCommandEncoder commandEncoder) WGPU_FUNCTION_ATTRIBUTE;
3627
+
3628
+ // Procs of ComputePassEncoder
3629
+ typedef void (*WGPUProcComputePassEncoderDispatchWorkgroups)(WGPUComputePassEncoder computePassEncoder, uint32_t workgroupCountX, uint32_t workgroupCountY, uint32_t workgroupCountZ) WGPU_FUNCTION_ATTRIBUTE;
3630
+ typedef void (*WGPUProcComputePassEncoderDispatchWorkgroupsIndirect)(WGPUComputePassEncoder computePassEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset) WGPU_FUNCTION_ATTRIBUTE;
3631
+ typedef void (*WGPUProcComputePassEncoderEnd)(WGPUComputePassEncoder computePassEncoder) WGPU_FUNCTION_ATTRIBUTE;
3632
+ typedef void (*WGPUProcComputePassEncoderInsertDebugMarker)(WGPUComputePassEncoder computePassEncoder, char const * markerLabel) WGPU_FUNCTION_ATTRIBUTE;
3633
+ typedef void (*WGPUProcComputePassEncoderPopDebugGroup)(WGPUComputePassEncoder computePassEncoder) WGPU_FUNCTION_ATTRIBUTE;
3634
+ typedef void (*WGPUProcComputePassEncoderPushDebugGroup)(WGPUComputePassEncoder computePassEncoder, char const * groupLabel) WGPU_FUNCTION_ATTRIBUTE;
3635
+ typedef void (*WGPUProcComputePassEncoderSetBindGroup)(WGPUComputePassEncoder computePassEncoder, uint32_t groupIndex, WGPU_NULLABLE WGPUBindGroup group, size_t dynamicOffsetCount, uint32_t const * dynamicOffsets) WGPU_FUNCTION_ATTRIBUTE;
3636
+ typedef void (*WGPUProcComputePassEncoderSetLabel)(WGPUComputePassEncoder computePassEncoder, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3637
+ typedef void (*WGPUProcComputePassEncoderSetPipeline)(WGPUComputePassEncoder computePassEncoder, WGPUComputePipeline pipeline) WGPU_FUNCTION_ATTRIBUTE;
3638
+ typedef void (*WGPUProcComputePassEncoderWriteTimestamp)(WGPUComputePassEncoder computePassEncoder, WGPUQuerySet querySet, uint32_t queryIndex) WGPU_FUNCTION_ATTRIBUTE;
3639
+ typedef void (*WGPUProcComputePassEncoderAddRef)(WGPUComputePassEncoder computePassEncoder) WGPU_FUNCTION_ATTRIBUTE;
3640
+ typedef void (*WGPUProcComputePassEncoderRelease)(WGPUComputePassEncoder computePassEncoder) WGPU_FUNCTION_ATTRIBUTE;
3641
+
3642
+ // Procs of ComputePipeline
3643
+ typedef WGPUBindGroupLayout (*WGPUProcComputePipelineGetBindGroupLayout)(WGPUComputePipeline computePipeline, uint32_t groupIndex) WGPU_FUNCTION_ATTRIBUTE;
3644
+ typedef void (*WGPUProcComputePipelineSetLabel)(WGPUComputePipeline computePipeline, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3645
+ typedef void (*WGPUProcComputePipelineAddRef)(WGPUComputePipeline computePipeline) WGPU_FUNCTION_ATTRIBUTE;
3646
+ typedef void (*WGPUProcComputePipelineRelease)(WGPUComputePipeline computePipeline) WGPU_FUNCTION_ATTRIBUTE;
3647
+
3648
+ // Procs of Device
3649
+ typedef WGPUBindGroup (*WGPUProcDeviceCreateBindGroup)(WGPUDevice device, WGPUBindGroupDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3650
+ typedef WGPUBindGroupLayout (*WGPUProcDeviceCreateBindGroupLayout)(WGPUDevice device, WGPUBindGroupLayoutDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3651
+ typedef WGPUBuffer (*WGPUProcDeviceCreateBuffer)(WGPUDevice device, WGPUBufferDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3652
+ typedef WGPUCommandEncoder (*WGPUProcDeviceCreateCommandEncoder)(WGPUDevice device, WGPU_NULLABLE WGPUCommandEncoderDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3653
+ typedef WGPUComputePipeline (*WGPUProcDeviceCreateComputePipeline)(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3654
+ typedef void (*WGPUProcDeviceCreateComputePipelineAsync)(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor, WGPUCreateComputePipelineAsyncCallback callback, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
3655
+ typedef WGPUFuture (*WGPUProcDeviceCreateComputePipelineAsync2)(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor, WGPUCreateComputePipelineAsyncCallbackInfo2 callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3656
+ typedef WGPUFuture (*WGPUProcDeviceCreateComputePipelineAsyncF)(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor, WGPUCreateComputePipelineAsyncCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3657
+ typedef WGPUBuffer (*WGPUProcDeviceCreateErrorBuffer)(WGPUDevice device, WGPUBufferDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3658
+ typedef WGPUExternalTexture (*WGPUProcDeviceCreateErrorExternalTexture)(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
3659
+ typedef WGPUShaderModule (*WGPUProcDeviceCreateErrorShaderModule)(WGPUDevice device, WGPUShaderModuleDescriptor const * descriptor, char const * errorMessage) WGPU_FUNCTION_ATTRIBUTE;
3660
+ typedef WGPUTexture (*WGPUProcDeviceCreateErrorTexture)(WGPUDevice device, WGPUTextureDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3661
+ typedef WGPUExternalTexture (*WGPUProcDeviceCreateExternalTexture)(WGPUDevice device, WGPUExternalTextureDescriptor const * externalTextureDescriptor) WGPU_FUNCTION_ATTRIBUTE;
3662
+ typedef WGPUPipelineLayout (*WGPUProcDeviceCreatePipelineLayout)(WGPUDevice device, WGPUPipelineLayoutDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3663
+ typedef WGPUQuerySet (*WGPUProcDeviceCreateQuerySet)(WGPUDevice device, WGPUQuerySetDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3664
+ typedef WGPURenderBundleEncoder (*WGPUProcDeviceCreateRenderBundleEncoder)(WGPUDevice device, WGPURenderBundleEncoderDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3665
+ typedef WGPURenderPipeline (*WGPUProcDeviceCreateRenderPipeline)(WGPUDevice device, WGPURenderPipelineDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3666
+ typedef void (*WGPUProcDeviceCreateRenderPipelineAsync)(WGPUDevice device, WGPURenderPipelineDescriptor const * descriptor, WGPUCreateRenderPipelineAsyncCallback callback, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
3667
+ typedef WGPUFuture (*WGPUProcDeviceCreateRenderPipelineAsync2)(WGPUDevice device, WGPURenderPipelineDescriptor const * descriptor, WGPUCreateRenderPipelineAsyncCallbackInfo2 callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3668
+ typedef WGPUFuture (*WGPUProcDeviceCreateRenderPipelineAsyncF)(WGPUDevice device, WGPURenderPipelineDescriptor const * descriptor, WGPUCreateRenderPipelineAsyncCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3669
+ typedef WGPUSampler (*WGPUProcDeviceCreateSampler)(WGPUDevice device, WGPU_NULLABLE WGPUSamplerDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3670
+ typedef WGPUShaderModule (*WGPUProcDeviceCreateShaderModule)(WGPUDevice device, WGPUShaderModuleDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3671
+ typedef WGPUSwapChain (*WGPUProcDeviceCreateSwapChain)(WGPUDevice device, WGPUSurface surface, WGPUSwapChainDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3672
+ typedef WGPUTexture (*WGPUProcDeviceCreateTexture)(WGPUDevice device, WGPUTextureDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3673
+ typedef void (*WGPUProcDeviceDestroy)(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
3674
+ typedef size_t (*WGPUProcDeviceEnumerateFeatures)(WGPUDevice device, WGPUFeatureName * features) WGPU_FUNCTION_ATTRIBUTE;
3675
+ typedef void (*WGPUProcDeviceForceLoss)(WGPUDevice device, WGPUDeviceLostReason type, char const * message) WGPU_FUNCTION_ATTRIBUTE;
3676
+ typedef WGPUStatus (*WGPUProcDeviceGetAHardwareBufferProperties)(WGPUDevice device, void * handle, WGPUAHardwareBufferProperties * properties) WGPU_FUNCTION_ATTRIBUTE;
3677
+ typedef WGPUAdapter (*WGPUProcDeviceGetAdapter)(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
3678
+ typedef WGPUStatus (*WGPUProcDeviceGetLimits)(WGPUDevice device, WGPUSupportedLimits * limits) WGPU_FUNCTION_ATTRIBUTE;
3679
+ typedef WGPUQueue (*WGPUProcDeviceGetQueue)(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
3680
+ typedef WGPUTextureUsage (*WGPUProcDeviceGetSupportedSurfaceUsage)(WGPUDevice device, WGPUSurface surface) WGPU_FUNCTION_ATTRIBUTE;
3681
+ typedef WGPUBool (*WGPUProcDeviceHasFeature)(WGPUDevice device, WGPUFeatureName feature) WGPU_FUNCTION_ATTRIBUTE;
3682
+ typedef WGPUSharedBufferMemory (*WGPUProcDeviceImportSharedBufferMemory)(WGPUDevice device, WGPUSharedBufferMemoryDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3683
+ typedef WGPUSharedFence (*WGPUProcDeviceImportSharedFence)(WGPUDevice device, WGPUSharedFenceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3684
+ typedef WGPUSharedTextureMemory (*WGPUProcDeviceImportSharedTextureMemory)(WGPUDevice device, WGPUSharedTextureMemoryDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3685
+ typedef void (*WGPUProcDeviceInjectError)(WGPUDevice device, WGPUErrorType type, char const * message) WGPU_FUNCTION_ATTRIBUTE;
3686
+ typedef void (*WGPUProcDevicePopErrorScope)(WGPUDevice device, WGPUErrorCallback oldCallback, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
3687
+ typedef WGPUFuture (*WGPUProcDevicePopErrorScope2)(WGPUDevice device, WGPUPopErrorScopeCallbackInfo2 callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3688
+ typedef WGPUFuture (*WGPUProcDevicePopErrorScopeF)(WGPUDevice device, WGPUPopErrorScopeCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3689
+ typedef void (*WGPUProcDevicePushErrorScope)(WGPUDevice device, WGPUErrorFilter filter) WGPU_FUNCTION_ATTRIBUTE;
3690
+ typedef void (*WGPUProcDeviceSetDeviceLostCallback)(WGPUDevice device, WGPUDeviceLostCallback callback, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
3691
+ typedef void (*WGPUProcDeviceSetLabel)(WGPUDevice device, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3692
+ typedef void (*WGPUProcDeviceSetLoggingCallback)(WGPUDevice device, WGPULoggingCallback callback, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
3693
+ typedef void (*WGPUProcDeviceSetUncapturedErrorCallback)(WGPUDevice device, WGPUErrorCallback callback, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
3694
+ typedef void (*WGPUProcDeviceTick)(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
3695
+ typedef void (*WGPUProcDeviceValidateTextureDescriptor)(WGPUDevice device, WGPUTextureDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3696
+ typedef void (*WGPUProcDeviceAddRef)(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
3697
+ typedef void (*WGPUProcDeviceRelease)(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
3698
+
3699
+ // Procs of ExternalTexture
3700
+ typedef void (*WGPUProcExternalTextureDestroy)(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
3701
+ typedef void (*WGPUProcExternalTextureExpire)(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
3702
+ typedef void (*WGPUProcExternalTextureRefresh)(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
3703
+ typedef void (*WGPUProcExternalTextureSetLabel)(WGPUExternalTexture externalTexture, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3704
+ typedef void (*WGPUProcExternalTextureAddRef)(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
3705
+ typedef void (*WGPUProcExternalTextureRelease)(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
3706
+
3707
+ // Procs of Instance
3708
+ typedef WGPUSurface (*WGPUProcInstanceCreateSurface)(WGPUInstance instance, WGPUSurfaceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3709
+ typedef size_t (*WGPUProcInstanceEnumerateWGSLLanguageFeatures)(WGPUInstance instance, WGPUWGSLFeatureName * features) WGPU_FUNCTION_ATTRIBUTE;
3710
+ typedef WGPUBool (*WGPUProcInstanceHasWGSLLanguageFeature)(WGPUInstance instance, WGPUWGSLFeatureName feature) WGPU_FUNCTION_ATTRIBUTE;
3711
+ typedef void (*WGPUProcInstanceProcessEvents)(WGPUInstance instance) WGPU_FUNCTION_ATTRIBUTE;
3712
+ typedef void (*WGPUProcInstanceRequestAdapter)(WGPUInstance instance, WGPU_NULLABLE WGPURequestAdapterOptions const * options, WGPURequestAdapterCallback callback, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
3713
+ typedef WGPUFuture (*WGPUProcInstanceRequestAdapter2)(WGPUInstance instance, WGPU_NULLABLE WGPURequestAdapterOptions const * options, WGPURequestAdapterCallbackInfo2 callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3714
+ typedef WGPUFuture (*WGPUProcInstanceRequestAdapterF)(WGPUInstance instance, WGPU_NULLABLE WGPURequestAdapterOptions const * options, WGPURequestAdapterCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3715
+ typedef WGPUWaitStatus (*WGPUProcInstanceWaitAny)(WGPUInstance instance, size_t futureCount, WGPUFutureWaitInfo * futures, uint64_t timeoutNS) WGPU_FUNCTION_ATTRIBUTE;
3716
+ typedef void (*WGPUProcInstanceAddRef)(WGPUInstance instance) WGPU_FUNCTION_ATTRIBUTE;
3717
+ typedef void (*WGPUProcInstanceRelease)(WGPUInstance instance) WGPU_FUNCTION_ATTRIBUTE;
3718
+
3719
+ // Procs of PipelineLayout
3720
+ typedef void (*WGPUProcPipelineLayoutSetLabel)(WGPUPipelineLayout pipelineLayout, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3721
+ typedef void (*WGPUProcPipelineLayoutAddRef)(WGPUPipelineLayout pipelineLayout) WGPU_FUNCTION_ATTRIBUTE;
3722
+ typedef void (*WGPUProcPipelineLayoutRelease)(WGPUPipelineLayout pipelineLayout) WGPU_FUNCTION_ATTRIBUTE;
3723
+
3724
+ // Procs of QuerySet
3725
+ typedef void (*WGPUProcQuerySetDestroy)(WGPUQuerySet querySet) WGPU_FUNCTION_ATTRIBUTE;
3726
+ typedef uint32_t (*WGPUProcQuerySetGetCount)(WGPUQuerySet querySet) WGPU_FUNCTION_ATTRIBUTE;
3727
+ typedef WGPUQueryType (*WGPUProcQuerySetGetType)(WGPUQuerySet querySet) WGPU_FUNCTION_ATTRIBUTE;
3728
+ typedef void (*WGPUProcQuerySetSetLabel)(WGPUQuerySet querySet, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3729
+ typedef void (*WGPUProcQuerySetAddRef)(WGPUQuerySet querySet) WGPU_FUNCTION_ATTRIBUTE;
3730
+ typedef void (*WGPUProcQuerySetRelease)(WGPUQuerySet querySet) WGPU_FUNCTION_ATTRIBUTE;
3731
+
3732
+ // Procs of Queue
3733
+ typedef void (*WGPUProcQueueCopyExternalTextureForBrowser)(WGPUQueue queue, WGPUImageCopyExternalTexture const * source, WGPUImageCopyTexture const * destination, WGPUExtent3D const * copySize, WGPUCopyTextureForBrowserOptions const * options) WGPU_FUNCTION_ATTRIBUTE;
3734
+ typedef void (*WGPUProcQueueCopyTextureForBrowser)(WGPUQueue queue, WGPUImageCopyTexture const * source, WGPUImageCopyTexture const * destination, WGPUExtent3D const * copySize, WGPUCopyTextureForBrowserOptions const * options) WGPU_FUNCTION_ATTRIBUTE;
3735
+ typedef void (*WGPUProcQueueOnSubmittedWorkDone)(WGPUQueue queue, WGPUQueueWorkDoneCallback callback, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
3736
+ typedef WGPUFuture (*WGPUProcQueueOnSubmittedWorkDone2)(WGPUQueue queue, WGPUQueueWorkDoneCallbackInfo2 callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3737
+ typedef WGPUFuture (*WGPUProcQueueOnSubmittedWorkDoneF)(WGPUQueue queue, WGPUQueueWorkDoneCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3738
+ typedef void (*WGPUProcQueueSetLabel)(WGPUQueue queue, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3739
+ typedef void (*WGPUProcQueueSubmit)(WGPUQueue queue, size_t commandCount, WGPUCommandBuffer const * commands) WGPU_FUNCTION_ATTRIBUTE;
3740
+ typedef void (*WGPUProcQueueWriteBuffer)(WGPUQueue queue, WGPUBuffer buffer, uint64_t bufferOffset, void const * data, size_t size) WGPU_FUNCTION_ATTRIBUTE;
3741
+ typedef void (*WGPUProcQueueWriteTexture)(WGPUQueue queue, WGPUImageCopyTexture const * destination, void const * data, size_t dataSize, WGPUTextureDataLayout const * dataLayout, WGPUExtent3D const * writeSize) WGPU_FUNCTION_ATTRIBUTE;
3742
+ typedef void (*WGPUProcQueueAddRef)(WGPUQueue queue) WGPU_FUNCTION_ATTRIBUTE;
3743
+ typedef void (*WGPUProcQueueRelease)(WGPUQueue queue) WGPU_FUNCTION_ATTRIBUTE;
3744
+
3745
+ // Procs of RenderBundle
3746
+ typedef void (*WGPUProcRenderBundleSetLabel)(WGPURenderBundle renderBundle, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3747
+ typedef void (*WGPUProcRenderBundleAddRef)(WGPURenderBundle renderBundle) WGPU_FUNCTION_ATTRIBUTE;
3748
+ typedef void (*WGPUProcRenderBundleRelease)(WGPURenderBundle renderBundle) WGPU_FUNCTION_ATTRIBUTE;
3749
+
3750
+ // Procs of RenderBundleEncoder
3751
+ typedef void (*WGPUProcRenderBundleEncoderDraw)(WGPURenderBundleEncoder renderBundleEncoder, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) WGPU_FUNCTION_ATTRIBUTE;
3752
+ typedef void (*WGPUProcRenderBundleEncoderDrawIndexed)(WGPURenderBundleEncoder renderBundleEncoder, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t baseVertex, uint32_t firstInstance) WGPU_FUNCTION_ATTRIBUTE;
3753
+ typedef void (*WGPUProcRenderBundleEncoderDrawIndexedIndirect)(WGPURenderBundleEncoder renderBundleEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset) WGPU_FUNCTION_ATTRIBUTE;
3754
+ typedef void (*WGPUProcRenderBundleEncoderDrawIndirect)(WGPURenderBundleEncoder renderBundleEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset) WGPU_FUNCTION_ATTRIBUTE;
3755
+ typedef WGPURenderBundle (*WGPUProcRenderBundleEncoderFinish)(WGPURenderBundleEncoder renderBundleEncoder, WGPU_NULLABLE WGPURenderBundleDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3756
+ typedef void (*WGPUProcRenderBundleEncoderInsertDebugMarker)(WGPURenderBundleEncoder renderBundleEncoder, char const * markerLabel) WGPU_FUNCTION_ATTRIBUTE;
3757
+ typedef void (*WGPUProcRenderBundleEncoderPopDebugGroup)(WGPURenderBundleEncoder renderBundleEncoder) WGPU_FUNCTION_ATTRIBUTE;
3758
+ typedef void (*WGPUProcRenderBundleEncoderPushDebugGroup)(WGPURenderBundleEncoder renderBundleEncoder, char const * groupLabel) WGPU_FUNCTION_ATTRIBUTE;
3759
+ typedef void (*WGPUProcRenderBundleEncoderSetBindGroup)(WGPURenderBundleEncoder renderBundleEncoder, uint32_t groupIndex, WGPU_NULLABLE WGPUBindGroup group, size_t dynamicOffsetCount, uint32_t const * dynamicOffsets) WGPU_FUNCTION_ATTRIBUTE;
3760
+ typedef void (*WGPUProcRenderBundleEncoderSetIndexBuffer)(WGPURenderBundleEncoder renderBundleEncoder, WGPUBuffer buffer, WGPUIndexFormat format, uint64_t offset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
3761
+ typedef void (*WGPUProcRenderBundleEncoderSetLabel)(WGPURenderBundleEncoder renderBundleEncoder, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3762
+ typedef void (*WGPUProcRenderBundleEncoderSetPipeline)(WGPURenderBundleEncoder renderBundleEncoder, WGPURenderPipeline pipeline) WGPU_FUNCTION_ATTRIBUTE;
3763
+ typedef void (*WGPUProcRenderBundleEncoderSetVertexBuffer)(WGPURenderBundleEncoder renderBundleEncoder, uint32_t slot, WGPU_NULLABLE WGPUBuffer buffer, uint64_t offset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
3764
+ typedef void (*WGPUProcRenderBundleEncoderAddRef)(WGPURenderBundleEncoder renderBundleEncoder) WGPU_FUNCTION_ATTRIBUTE;
3765
+ typedef void (*WGPUProcRenderBundleEncoderRelease)(WGPURenderBundleEncoder renderBundleEncoder) WGPU_FUNCTION_ATTRIBUTE;
3766
+
3767
+ // Procs of RenderPassEncoder
3768
+ typedef void (*WGPUProcRenderPassEncoderBeginOcclusionQuery)(WGPURenderPassEncoder renderPassEncoder, uint32_t queryIndex) WGPU_FUNCTION_ATTRIBUTE;
3769
+ typedef void (*WGPUProcRenderPassEncoderDraw)(WGPURenderPassEncoder renderPassEncoder, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) WGPU_FUNCTION_ATTRIBUTE;
3770
+ typedef void (*WGPUProcRenderPassEncoderDrawIndexed)(WGPURenderPassEncoder renderPassEncoder, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t baseVertex, uint32_t firstInstance) WGPU_FUNCTION_ATTRIBUTE;
3771
+ typedef void (*WGPUProcRenderPassEncoderDrawIndexedIndirect)(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset) WGPU_FUNCTION_ATTRIBUTE;
3772
+ typedef void (*WGPUProcRenderPassEncoderDrawIndirect)(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset) WGPU_FUNCTION_ATTRIBUTE;
3773
+ typedef void (*WGPUProcRenderPassEncoderEnd)(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
3774
+ typedef void (*WGPUProcRenderPassEncoderEndOcclusionQuery)(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
3775
+ typedef void (*WGPUProcRenderPassEncoderExecuteBundles)(WGPURenderPassEncoder renderPassEncoder, size_t bundleCount, WGPURenderBundle const * bundles) WGPU_FUNCTION_ATTRIBUTE;
3776
+ typedef void (*WGPUProcRenderPassEncoderInsertDebugMarker)(WGPURenderPassEncoder renderPassEncoder, char const * markerLabel) WGPU_FUNCTION_ATTRIBUTE;
3777
+ typedef void (*WGPUProcRenderPassEncoderPixelLocalStorageBarrier)(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
3778
+ typedef void (*WGPUProcRenderPassEncoderPopDebugGroup)(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
3779
+ typedef void (*WGPUProcRenderPassEncoderPushDebugGroup)(WGPURenderPassEncoder renderPassEncoder, char const * groupLabel) WGPU_FUNCTION_ATTRIBUTE;
3780
+ typedef void (*WGPUProcRenderPassEncoderSetBindGroup)(WGPURenderPassEncoder renderPassEncoder, uint32_t groupIndex, WGPU_NULLABLE WGPUBindGroup group, size_t dynamicOffsetCount, uint32_t const * dynamicOffsets) WGPU_FUNCTION_ATTRIBUTE;
3781
+ typedef void (*WGPUProcRenderPassEncoderSetBlendConstant)(WGPURenderPassEncoder renderPassEncoder, WGPUColor const * color) WGPU_FUNCTION_ATTRIBUTE;
3782
+ typedef void (*WGPUProcRenderPassEncoderSetIndexBuffer)(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer buffer, WGPUIndexFormat format, uint64_t offset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
3783
+ typedef void (*WGPUProcRenderPassEncoderSetLabel)(WGPURenderPassEncoder renderPassEncoder, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3784
+ typedef void (*WGPUProcRenderPassEncoderSetPipeline)(WGPURenderPassEncoder renderPassEncoder, WGPURenderPipeline pipeline) WGPU_FUNCTION_ATTRIBUTE;
3785
+ typedef void (*WGPUProcRenderPassEncoderSetScissorRect)(WGPURenderPassEncoder renderPassEncoder, uint32_t x, uint32_t y, uint32_t width, uint32_t height) WGPU_FUNCTION_ATTRIBUTE;
3786
+ typedef void (*WGPUProcRenderPassEncoderSetStencilReference)(WGPURenderPassEncoder renderPassEncoder, uint32_t reference) WGPU_FUNCTION_ATTRIBUTE;
3787
+ typedef void (*WGPUProcRenderPassEncoderSetVertexBuffer)(WGPURenderPassEncoder renderPassEncoder, uint32_t slot, WGPU_NULLABLE WGPUBuffer buffer, uint64_t offset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
3788
+ typedef void (*WGPUProcRenderPassEncoderSetViewport)(WGPURenderPassEncoder renderPassEncoder, float x, float y, float width, float height, float minDepth, float maxDepth) WGPU_FUNCTION_ATTRIBUTE;
3789
+ typedef void (*WGPUProcRenderPassEncoderWriteTimestamp)(WGPURenderPassEncoder renderPassEncoder, WGPUQuerySet querySet, uint32_t queryIndex) WGPU_FUNCTION_ATTRIBUTE;
3790
+ typedef void (*WGPUProcRenderPassEncoderAddRef)(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
3791
+ typedef void (*WGPUProcRenderPassEncoderRelease)(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
3792
+
3793
+ // Procs of RenderPipeline
3794
+ typedef WGPUBindGroupLayout (*WGPUProcRenderPipelineGetBindGroupLayout)(WGPURenderPipeline renderPipeline, uint32_t groupIndex) WGPU_FUNCTION_ATTRIBUTE;
3795
+ typedef void (*WGPUProcRenderPipelineSetLabel)(WGPURenderPipeline renderPipeline, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3796
+ typedef void (*WGPUProcRenderPipelineAddRef)(WGPURenderPipeline renderPipeline) WGPU_FUNCTION_ATTRIBUTE;
3797
+ typedef void (*WGPUProcRenderPipelineRelease)(WGPURenderPipeline renderPipeline) WGPU_FUNCTION_ATTRIBUTE;
3798
+
3799
+ // Procs of Sampler
3800
+ typedef void (*WGPUProcSamplerSetLabel)(WGPUSampler sampler, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3801
+ typedef void (*WGPUProcSamplerAddRef)(WGPUSampler sampler) WGPU_FUNCTION_ATTRIBUTE;
3802
+ typedef void (*WGPUProcSamplerRelease)(WGPUSampler sampler) WGPU_FUNCTION_ATTRIBUTE;
3803
+
3804
+ // Procs of ShaderModule
3805
+ typedef void (*WGPUProcShaderModuleGetCompilationInfo)(WGPUShaderModule shaderModule, WGPUCompilationInfoCallback callback, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
3806
+ typedef WGPUFuture (*WGPUProcShaderModuleGetCompilationInfo2)(WGPUShaderModule shaderModule, WGPUCompilationInfoCallbackInfo2 callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3807
+ typedef WGPUFuture (*WGPUProcShaderModuleGetCompilationInfoF)(WGPUShaderModule shaderModule, WGPUCompilationInfoCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3808
+ typedef void (*WGPUProcShaderModuleSetLabel)(WGPUShaderModule shaderModule, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3809
+ typedef void (*WGPUProcShaderModuleAddRef)(WGPUShaderModule shaderModule) WGPU_FUNCTION_ATTRIBUTE;
3810
+ typedef void (*WGPUProcShaderModuleRelease)(WGPUShaderModule shaderModule) WGPU_FUNCTION_ATTRIBUTE;
3811
+
3812
+ // Procs of SharedBufferMemory
3813
+ typedef WGPUStatus (*WGPUProcSharedBufferMemoryBeginAccess)(WGPUSharedBufferMemory sharedBufferMemory, WGPUBuffer buffer, WGPUSharedBufferMemoryBeginAccessDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3814
+ typedef WGPUBuffer (*WGPUProcSharedBufferMemoryCreateBuffer)(WGPUSharedBufferMemory sharedBufferMemory, WGPU_NULLABLE WGPUBufferDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3815
+ typedef WGPUStatus (*WGPUProcSharedBufferMemoryEndAccess)(WGPUSharedBufferMemory sharedBufferMemory, WGPUBuffer buffer, WGPUSharedBufferMemoryEndAccessState * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3816
+ typedef WGPUStatus (*WGPUProcSharedBufferMemoryGetProperties)(WGPUSharedBufferMemory sharedBufferMemory, WGPUSharedBufferMemoryProperties * properties) WGPU_FUNCTION_ATTRIBUTE;
3817
+ typedef WGPUBool (*WGPUProcSharedBufferMemoryIsDeviceLost)(WGPUSharedBufferMemory sharedBufferMemory) WGPU_FUNCTION_ATTRIBUTE;
3818
+ typedef void (*WGPUProcSharedBufferMemorySetLabel)(WGPUSharedBufferMemory sharedBufferMemory, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3819
+ typedef void (*WGPUProcSharedBufferMemoryAddRef)(WGPUSharedBufferMemory sharedBufferMemory) WGPU_FUNCTION_ATTRIBUTE;
3820
+ typedef void (*WGPUProcSharedBufferMemoryRelease)(WGPUSharedBufferMemory sharedBufferMemory) WGPU_FUNCTION_ATTRIBUTE;
3821
+
3822
+ // Procs of SharedFence
3823
+ typedef void (*WGPUProcSharedFenceExportInfo)(WGPUSharedFence sharedFence, WGPUSharedFenceExportInfo * info) WGPU_FUNCTION_ATTRIBUTE;
3824
+ typedef void (*WGPUProcSharedFenceAddRef)(WGPUSharedFence sharedFence) WGPU_FUNCTION_ATTRIBUTE;
3825
+ typedef void (*WGPUProcSharedFenceRelease)(WGPUSharedFence sharedFence) WGPU_FUNCTION_ATTRIBUTE;
3826
+
3827
+ // Procs of SharedTextureMemory
3828
+ typedef WGPUStatus (*WGPUProcSharedTextureMemoryBeginAccess)(WGPUSharedTextureMemory sharedTextureMemory, WGPUTexture texture, WGPUSharedTextureMemoryBeginAccessDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3829
+ typedef WGPUTexture (*WGPUProcSharedTextureMemoryCreateTexture)(WGPUSharedTextureMemory sharedTextureMemory, WGPU_NULLABLE WGPUTextureDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3830
+ typedef WGPUStatus (*WGPUProcSharedTextureMemoryEndAccess)(WGPUSharedTextureMemory sharedTextureMemory, WGPUTexture texture, WGPUSharedTextureMemoryEndAccessState * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3831
+ typedef WGPUStatus (*WGPUProcSharedTextureMemoryGetProperties)(WGPUSharedTextureMemory sharedTextureMemory, WGPUSharedTextureMemoryProperties * properties) WGPU_FUNCTION_ATTRIBUTE;
3832
+ typedef WGPUBool (*WGPUProcSharedTextureMemoryIsDeviceLost)(WGPUSharedTextureMemory sharedTextureMemory) WGPU_FUNCTION_ATTRIBUTE;
3833
+ typedef void (*WGPUProcSharedTextureMemorySetLabel)(WGPUSharedTextureMemory sharedTextureMemory, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3834
+ typedef void (*WGPUProcSharedTextureMemoryAddRef)(WGPUSharedTextureMemory sharedTextureMemory) WGPU_FUNCTION_ATTRIBUTE;
3835
+ typedef void (*WGPUProcSharedTextureMemoryRelease)(WGPUSharedTextureMemory sharedTextureMemory) WGPU_FUNCTION_ATTRIBUTE;
3836
+
3837
+ // Procs of Surface
3838
+ typedef void (*WGPUProcSurfaceConfigure)(WGPUSurface surface, WGPUSurfaceConfiguration const * config) WGPU_FUNCTION_ATTRIBUTE;
3839
+ typedef WGPUStatus (*WGPUProcSurfaceGetCapabilities)(WGPUSurface surface, WGPUAdapter adapter, WGPUSurfaceCapabilities * capabilities) WGPU_FUNCTION_ATTRIBUTE;
3840
+ typedef void (*WGPUProcSurfaceGetCurrentTexture)(WGPUSurface surface, WGPUSurfaceTexture * surfaceTexture) WGPU_FUNCTION_ATTRIBUTE;
3841
+ typedef WGPUTextureFormat (*WGPUProcSurfaceGetPreferredFormat)(WGPUSurface surface, WGPUAdapter adapter) WGPU_FUNCTION_ATTRIBUTE;
3842
+ typedef void (*WGPUProcSurfacePresent)(WGPUSurface surface) WGPU_FUNCTION_ATTRIBUTE;
3843
+ typedef void (*WGPUProcSurfaceUnconfigure)(WGPUSurface surface) WGPU_FUNCTION_ATTRIBUTE;
3844
+ typedef void (*WGPUProcSurfaceAddRef)(WGPUSurface surface) WGPU_FUNCTION_ATTRIBUTE;
3845
+ typedef void (*WGPUProcSurfaceRelease)(WGPUSurface surface) WGPU_FUNCTION_ATTRIBUTE;
3846
+
3847
+ // Procs of SwapChain
3848
+ typedef WGPUTexture (*WGPUProcSwapChainGetCurrentTexture)(WGPUSwapChain swapChain) WGPU_FUNCTION_ATTRIBUTE;
3849
+ typedef WGPUTextureView (*WGPUProcSwapChainGetCurrentTextureView)(WGPUSwapChain swapChain) WGPU_FUNCTION_ATTRIBUTE;
3850
+ typedef void (*WGPUProcSwapChainPresent)(WGPUSwapChain swapChain) WGPU_FUNCTION_ATTRIBUTE;
3851
+ typedef void (*WGPUProcSwapChainAddRef)(WGPUSwapChain swapChain) WGPU_FUNCTION_ATTRIBUTE;
3852
+ typedef void (*WGPUProcSwapChainRelease)(WGPUSwapChain swapChain) WGPU_FUNCTION_ATTRIBUTE;
3853
+
3854
+ // Procs of Texture
3855
+ typedef WGPUTextureView (*WGPUProcTextureCreateErrorView)(WGPUTexture texture, WGPU_NULLABLE WGPUTextureViewDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3856
+ typedef WGPUTextureView (*WGPUProcTextureCreateView)(WGPUTexture texture, WGPU_NULLABLE WGPUTextureViewDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3857
+ typedef void (*WGPUProcTextureDestroy)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
3858
+ typedef uint32_t (*WGPUProcTextureGetDepthOrArrayLayers)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
3859
+ typedef WGPUTextureDimension (*WGPUProcTextureGetDimension)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
3860
+ typedef WGPUTextureFormat (*WGPUProcTextureGetFormat)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
3861
+ typedef uint32_t (*WGPUProcTextureGetHeight)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
3862
+ typedef uint32_t (*WGPUProcTextureGetMipLevelCount)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
3863
+ typedef uint32_t (*WGPUProcTextureGetSampleCount)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
3864
+ typedef WGPUTextureUsage (*WGPUProcTextureGetUsage)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
3865
+ typedef uint32_t (*WGPUProcTextureGetWidth)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
3866
+ typedef void (*WGPUProcTextureSetLabel)(WGPUTexture texture, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3867
+ typedef void (*WGPUProcTextureAddRef)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
3868
+ typedef void (*WGPUProcTextureRelease)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
3869
+
3870
+ // Procs of TextureView
3871
+ typedef void (*WGPUProcTextureViewSetLabel)(WGPUTextureView textureView, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3872
+ typedef void (*WGPUProcTextureViewAddRef)(WGPUTextureView textureView) WGPU_FUNCTION_ATTRIBUTE;
3873
+ typedef void (*WGPUProcTextureViewRelease)(WGPUTextureView textureView) WGPU_FUNCTION_ATTRIBUTE;
3874
+
3875
+
3876
+ #endif // !defined(WGPU_SKIP_PROCS)
3877
+
3878
+ #if !defined(WGPU_SKIP_DECLARATIONS)
3879
+
3880
+ WGPU_EXPORT void wgpuAdapterInfoFreeMembers(WGPUAdapterInfo value) WGPU_FUNCTION_ATTRIBUTE;
3881
+ WGPU_EXPORT void wgpuAdapterPropertiesFreeMembers(WGPUAdapterProperties value) WGPU_FUNCTION_ATTRIBUTE;
3882
+ WGPU_EXPORT void wgpuAdapterPropertiesMemoryHeapsFreeMembers(WGPUAdapterPropertiesMemoryHeaps value) WGPU_FUNCTION_ATTRIBUTE;
3883
+ WGPU_EXPORT WGPUInstance wgpuCreateInstance(WGPU_NULLABLE WGPUInstanceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3884
+ WGPU_EXPORT void wgpuDrmFormatCapabilitiesFreeMembers(WGPUDrmFormatCapabilities value) WGPU_FUNCTION_ATTRIBUTE;
3885
+ WGPU_EXPORT WGPUStatus wgpuGetInstanceFeatures(WGPUInstanceFeatures * features) WGPU_FUNCTION_ATTRIBUTE;
3886
+ WGPU_EXPORT WGPUProc wgpuGetProcAddress(WGPU_NULLABLE WGPUDevice device, char const * procName) WGPU_FUNCTION_ATTRIBUTE;
3887
+ WGPU_EXPORT void wgpuSharedBufferMemoryEndAccessStateFreeMembers(WGPUSharedBufferMemoryEndAccessState value) WGPU_FUNCTION_ATTRIBUTE;
3888
+ WGPU_EXPORT void wgpuSharedTextureMemoryEndAccessStateFreeMembers(WGPUSharedTextureMemoryEndAccessState value) WGPU_FUNCTION_ATTRIBUTE;
3889
+ WGPU_EXPORT void wgpuSurfaceCapabilitiesFreeMembers(WGPUSurfaceCapabilities value) WGPU_FUNCTION_ATTRIBUTE;
3890
+
3891
+ // Methods of Adapter
3892
+ WGPU_EXPORT WGPUDevice wgpuAdapterCreateDevice(WGPUAdapter adapter, WGPU_NULLABLE WGPUDeviceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3893
+ WGPU_EXPORT size_t wgpuAdapterEnumerateFeatures(WGPUAdapter adapter, WGPUFeatureName * features) WGPU_FUNCTION_ATTRIBUTE;
3894
+ WGPU_EXPORT WGPUStatus wgpuAdapterGetFormatCapabilities(WGPUAdapter adapter, WGPUTextureFormat format, WGPUFormatCapabilities * capabilities) WGPU_FUNCTION_ATTRIBUTE;
3895
+ WGPU_EXPORT WGPUStatus wgpuAdapterGetInfo(WGPUAdapter adapter, WGPUAdapterInfo * info) WGPU_FUNCTION_ATTRIBUTE;
3896
+ WGPU_EXPORT WGPUInstance wgpuAdapterGetInstance(WGPUAdapter adapter) WGPU_FUNCTION_ATTRIBUTE;
3897
+ WGPU_EXPORT WGPUStatus wgpuAdapterGetLimits(WGPUAdapter adapter, WGPUSupportedLimits * limits) WGPU_FUNCTION_ATTRIBUTE;
3898
+ WGPU_EXPORT WGPUStatus wgpuAdapterGetProperties(WGPUAdapter adapter, WGPUAdapterProperties * properties) WGPU_FUNCTION_ATTRIBUTE;
3899
+ WGPU_EXPORT WGPUBool wgpuAdapterHasFeature(WGPUAdapter adapter, WGPUFeatureName feature) WGPU_FUNCTION_ATTRIBUTE;
3900
+ WGPU_EXPORT void wgpuAdapterRequestDevice(WGPUAdapter adapter, WGPU_NULLABLE WGPUDeviceDescriptor const * descriptor, WGPURequestDeviceCallback callback, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
3901
+ WGPU_EXPORT WGPUFuture wgpuAdapterRequestDevice2(WGPUAdapter adapter, WGPU_NULLABLE WGPUDeviceDescriptor const * options, WGPURequestDeviceCallbackInfo2 callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3902
+ WGPU_EXPORT WGPUFuture wgpuAdapterRequestDeviceF(WGPUAdapter adapter, WGPU_NULLABLE WGPUDeviceDescriptor const * options, WGPURequestDeviceCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3903
+ WGPU_EXPORT void wgpuAdapterAddRef(WGPUAdapter adapter) WGPU_FUNCTION_ATTRIBUTE;
3904
+ WGPU_EXPORT void wgpuAdapterRelease(WGPUAdapter adapter) WGPU_FUNCTION_ATTRIBUTE;
3905
+
3906
+ // Methods of BindGroup
3907
+ WGPU_EXPORT void wgpuBindGroupSetLabel(WGPUBindGroup bindGroup, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3908
+ WGPU_EXPORT void wgpuBindGroupAddRef(WGPUBindGroup bindGroup) WGPU_FUNCTION_ATTRIBUTE;
3909
+ WGPU_EXPORT void wgpuBindGroupRelease(WGPUBindGroup bindGroup) WGPU_FUNCTION_ATTRIBUTE;
3910
+
3911
+ // Methods of BindGroupLayout
3912
+ WGPU_EXPORT void wgpuBindGroupLayoutSetLabel(WGPUBindGroupLayout bindGroupLayout, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3913
+ WGPU_EXPORT void wgpuBindGroupLayoutAddRef(WGPUBindGroupLayout bindGroupLayout) WGPU_FUNCTION_ATTRIBUTE;
3914
+ WGPU_EXPORT void wgpuBindGroupLayoutRelease(WGPUBindGroupLayout bindGroupLayout) WGPU_FUNCTION_ATTRIBUTE;
3915
+
3916
+ // Methods of Buffer
3917
+ WGPU_EXPORT void wgpuBufferDestroy(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
3918
+ WGPU_EXPORT void const * wgpuBufferGetConstMappedRange(WGPUBuffer buffer, size_t offset, size_t size) WGPU_FUNCTION_ATTRIBUTE;
3919
+ WGPU_EXPORT WGPUBufferMapState wgpuBufferGetMapState(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
3920
+ WGPU_EXPORT void * wgpuBufferGetMappedRange(WGPUBuffer buffer, size_t offset, size_t size) WGPU_FUNCTION_ATTRIBUTE;
3921
+ WGPU_EXPORT uint64_t wgpuBufferGetSize(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
3922
+ WGPU_EXPORT WGPUBufferUsage wgpuBufferGetUsage(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
3923
+ WGPU_EXPORT void wgpuBufferMapAsync(WGPUBuffer buffer, WGPUMapMode mode, size_t offset, size_t size, WGPUBufferMapCallback callback, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
3924
+ WGPU_EXPORT WGPUFuture wgpuBufferMapAsync2(WGPUBuffer buffer, WGPUMapMode mode, size_t offset, size_t size, WGPUBufferMapCallbackInfo2 callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3925
+ WGPU_EXPORT WGPUFuture wgpuBufferMapAsyncF(WGPUBuffer buffer, WGPUMapMode mode, size_t offset, size_t size, WGPUBufferMapCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3926
+ WGPU_EXPORT void wgpuBufferSetLabel(WGPUBuffer buffer, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3927
+ WGPU_EXPORT void wgpuBufferUnmap(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
3928
+ WGPU_EXPORT void wgpuBufferAddRef(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
3929
+ WGPU_EXPORT void wgpuBufferRelease(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
3930
+
3931
+ // Methods of CommandBuffer
3932
+ WGPU_EXPORT void wgpuCommandBufferSetLabel(WGPUCommandBuffer commandBuffer, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3933
+ WGPU_EXPORT void wgpuCommandBufferAddRef(WGPUCommandBuffer commandBuffer) WGPU_FUNCTION_ATTRIBUTE;
3934
+ WGPU_EXPORT void wgpuCommandBufferRelease(WGPUCommandBuffer commandBuffer) WGPU_FUNCTION_ATTRIBUTE;
3935
+
3936
+ // Methods of CommandEncoder
3937
+ WGPU_EXPORT WGPUComputePassEncoder wgpuCommandEncoderBeginComputePass(WGPUCommandEncoder commandEncoder, WGPU_NULLABLE WGPUComputePassDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3938
+ WGPU_EXPORT WGPURenderPassEncoder wgpuCommandEncoderBeginRenderPass(WGPUCommandEncoder commandEncoder, WGPURenderPassDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3939
+ WGPU_EXPORT void wgpuCommandEncoderClearBuffer(WGPUCommandEncoder commandEncoder, WGPUBuffer buffer, uint64_t offset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
3940
+ WGPU_EXPORT void wgpuCommandEncoderCopyBufferToBuffer(WGPUCommandEncoder commandEncoder, WGPUBuffer source, uint64_t sourceOffset, WGPUBuffer destination, uint64_t destinationOffset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
3941
+ WGPU_EXPORT void wgpuCommandEncoderCopyBufferToTexture(WGPUCommandEncoder commandEncoder, WGPUImageCopyBuffer const * source, WGPUImageCopyTexture const * destination, WGPUExtent3D const * copySize) WGPU_FUNCTION_ATTRIBUTE;
3942
+ WGPU_EXPORT void wgpuCommandEncoderCopyTextureToBuffer(WGPUCommandEncoder commandEncoder, WGPUImageCopyTexture const * source, WGPUImageCopyBuffer const * destination, WGPUExtent3D const * copySize) WGPU_FUNCTION_ATTRIBUTE;
3943
+ WGPU_EXPORT void wgpuCommandEncoderCopyTextureToTexture(WGPUCommandEncoder commandEncoder, WGPUImageCopyTexture const * source, WGPUImageCopyTexture const * destination, WGPUExtent3D const * copySize) WGPU_FUNCTION_ATTRIBUTE;
3944
+ WGPU_EXPORT WGPUCommandBuffer wgpuCommandEncoderFinish(WGPUCommandEncoder commandEncoder, WGPU_NULLABLE WGPUCommandBufferDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3945
+ WGPU_EXPORT void wgpuCommandEncoderInjectValidationError(WGPUCommandEncoder commandEncoder, char const * message) WGPU_FUNCTION_ATTRIBUTE;
3946
+ WGPU_EXPORT void wgpuCommandEncoderInsertDebugMarker(WGPUCommandEncoder commandEncoder, char const * markerLabel) WGPU_FUNCTION_ATTRIBUTE;
3947
+ WGPU_EXPORT void wgpuCommandEncoderPopDebugGroup(WGPUCommandEncoder commandEncoder) WGPU_FUNCTION_ATTRIBUTE;
3948
+ WGPU_EXPORT void wgpuCommandEncoderPushDebugGroup(WGPUCommandEncoder commandEncoder, char const * groupLabel) WGPU_FUNCTION_ATTRIBUTE;
3949
+ WGPU_EXPORT void wgpuCommandEncoderResolveQuerySet(WGPUCommandEncoder commandEncoder, WGPUQuerySet querySet, uint32_t firstQuery, uint32_t queryCount, WGPUBuffer destination, uint64_t destinationOffset) WGPU_FUNCTION_ATTRIBUTE;
3950
+ WGPU_EXPORT void wgpuCommandEncoderSetLabel(WGPUCommandEncoder commandEncoder, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3951
+ WGPU_EXPORT void wgpuCommandEncoderWriteBuffer(WGPUCommandEncoder commandEncoder, WGPUBuffer buffer, uint64_t bufferOffset, uint8_t const * data, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
3952
+ WGPU_EXPORT void wgpuCommandEncoderWriteTimestamp(WGPUCommandEncoder commandEncoder, WGPUQuerySet querySet, uint32_t queryIndex) WGPU_FUNCTION_ATTRIBUTE;
3953
+ WGPU_EXPORT void wgpuCommandEncoderAddRef(WGPUCommandEncoder commandEncoder) WGPU_FUNCTION_ATTRIBUTE;
3954
+ WGPU_EXPORT void wgpuCommandEncoderRelease(WGPUCommandEncoder commandEncoder) WGPU_FUNCTION_ATTRIBUTE;
3955
+
3956
+ // Methods of ComputePassEncoder
3957
+ WGPU_EXPORT void wgpuComputePassEncoderDispatchWorkgroups(WGPUComputePassEncoder computePassEncoder, uint32_t workgroupCountX, uint32_t workgroupCountY, uint32_t workgroupCountZ) WGPU_FUNCTION_ATTRIBUTE;
3958
+ WGPU_EXPORT void wgpuComputePassEncoderDispatchWorkgroupsIndirect(WGPUComputePassEncoder computePassEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset) WGPU_FUNCTION_ATTRIBUTE;
3959
+ WGPU_EXPORT void wgpuComputePassEncoderEnd(WGPUComputePassEncoder computePassEncoder) WGPU_FUNCTION_ATTRIBUTE;
3960
+ WGPU_EXPORT void wgpuComputePassEncoderInsertDebugMarker(WGPUComputePassEncoder computePassEncoder, char const * markerLabel) WGPU_FUNCTION_ATTRIBUTE;
3961
+ WGPU_EXPORT void wgpuComputePassEncoderPopDebugGroup(WGPUComputePassEncoder computePassEncoder) WGPU_FUNCTION_ATTRIBUTE;
3962
+ WGPU_EXPORT void wgpuComputePassEncoderPushDebugGroup(WGPUComputePassEncoder computePassEncoder, char const * groupLabel) WGPU_FUNCTION_ATTRIBUTE;
3963
+ WGPU_EXPORT void wgpuComputePassEncoderSetBindGroup(WGPUComputePassEncoder computePassEncoder, uint32_t groupIndex, WGPU_NULLABLE WGPUBindGroup group, size_t dynamicOffsetCount, uint32_t const * dynamicOffsets) WGPU_FUNCTION_ATTRIBUTE;
3964
+ WGPU_EXPORT void wgpuComputePassEncoderSetLabel(WGPUComputePassEncoder computePassEncoder, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3965
+ WGPU_EXPORT void wgpuComputePassEncoderSetPipeline(WGPUComputePassEncoder computePassEncoder, WGPUComputePipeline pipeline) WGPU_FUNCTION_ATTRIBUTE;
3966
+ WGPU_EXPORT void wgpuComputePassEncoderWriteTimestamp(WGPUComputePassEncoder computePassEncoder, WGPUQuerySet querySet, uint32_t queryIndex) WGPU_FUNCTION_ATTRIBUTE;
3967
+ WGPU_EXPORT void wgpuComputePassEncoderAddRef(WGPUComputePassEncoder computePassEncoder) WGPU_FUNCTION_ATTRIBUTE;
3968
+ WGPU_EXPORT void wgpuComputePassEncoderRelease(WGPUComputePassEncoder computePassEncoder) WGPU_FUNCTION_ATTRIBUTE;
3969
+
3970
+ // Methods of ComputePipeline
3971
+ WGPU_EXPORT WGPUBindGroupLayout wgpuComputePipelineGetBindGroupLayout(WGPUComputePipeline computePipeline, uint32_t groupIndex) WGPU_FUNCTION_ATTRIBUTE;
3972
+ WGPU_EXPORT void wgpuComputePipelineSetLabel(WGPUComputePipeline computePipeline, char const * label) WGPU_FUNCTION_ATTRIBUTE;
3973
+ WGPU_EXPORT void wgpuComputePipelineAddRef(WGPUComputePipeline computePipeline) WGPU_FUNCTION_ATTRIBUTE;
3974
+ WGPU_EXPORT void wgpuComputePipelineRelease(WGPUComputePipeline computePipeline) WGPU_FUNCTION_ATTRIBUTE;
3975
+
3976
+ // Methods of Device
3977
+ WGPU_EXPORT WGPUBindGroup wgpuDeviceCreateBindGroup(WGPUDevice device, WGPUBindGroupDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3978
+ WGPU_EXPORT WGPUBindGroupLayout wgpuDeviceCreateBindGroupLayout(WGPUDevice device, WGPUBindGroupLayoutDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3979
+ WGPU_EXPORT WGPUBuffer wgpuDeviceCreateBuffer(WGPUDevice device, WGPUBufferDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3980
+ WGPU_EXPORT WGPUCommandEncoder wgpuDeviceCreateCommandEncoder(WGPUDevice device, WGPU_NULLABLE WGPUCommandEncoderDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3981
+ WGPU_EXPORT WGPUComputePipeline wgpuDeviceCreateComputePipeline(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3982
+ WGPU_EXPORT void wgpuDeviceCreateComputePipelineAsync(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor, WGPUCreateComputePipelineAsyncCallback callback, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
3983
+ WGPU_EXPORT WGPUFuture wgpuDeviceCreateComputePipelineAsync2(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor, WGPUCreateComputePipelineAsyncCallbackInfo2 callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3984
+ WGPU_EXPORT WGPUFuture wgpuDeviceCreateComputePipelineAsyncF(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor, WGPUCreateComputePipelineAsyncCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3985
+ WGPU_EXPORT WGPUBuffer wgpuDeviceCreateErrorBuffer(WGPUDevice device, WGPUBufferDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3986
+ WGPU_EXPORT WGPUExternalTexture wgpuDeviceCreateErrorExternalTexture(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
3987
+ WGPU_EXPORT WGPUShaderModule wgpuDeviceCreateErrorShaderModule(WGPUDevice device, WGPUShaderModuleDescriptor const * descriptor, char const * errorMessage) WGPU_FUNCTION_ATTRIBUTE;
3988
+ WGPU_EXPORT WGPUTexture wgpuDeviceCreateErrorTexture(WGPUDevice device, WGPUTextureDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3989
+ WGPU_EXPORT WGPUExternalTexture wgpuDeviceCreateExternalTexture(WGPUDevice device, WGPUExternalTextureDescriptor const * externalTextureDescriptor) WGPU_FUNCTION_ATTRIBUTE;
3990
+ WGPU_EXPORT WGPUPipelineLayout wgpuDeviceCreatePipelineLayout(WGPUDevice device, WGPUPipelineLayoutDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3991
+ WGPU_EXPORT WGPUQuerySet wgpuDeviceCreateQuerySet(WGPUDevice device, WGPUQuerySetDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3992
+ WGPU_EXPORT WGPURenderBundleEncoder wgpuDeviceCreateRenderBundleEncoder(WGPUDevice device, WGPURenderBundleEncoderDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3993
+ WGPU_EXPORT WGPURenderPipeline wgpuDeviceCreateRenderPipeline(WGPUDevice device, WGPURenderPipelineDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3994
+ WGPU_EXPORT void wgpuDeviceCreateRenderPipelineAsync(WGPUDevice device, WGPURenderPipelineDescriptor const * descriptor, WGPUCreateRenderPipelineAsyncCallback callback, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
3995
+ WGPU_EXPORT WGPUFuture wgpuDeviceCreateRenderPipelineAsync2(WGPUDevice device, WGPURenderPipelineDescriptor const * descriptor, WGPUCreateRenderPipelineAsyncCallbackInfo2 callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3996
+ WGPU_EXPORT WGPUFuture wgpuDeviceCreateRenderPipelineAsyncF(WGPUDevice device, WGPURenderPipelineDescriptor const * descriptor, WGPUCreateRenderPipelineAsyncCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
3997
+ WGPU_EXPORT WGPUSampler wgpuDeviceCreateSampler(WGPUDevice device, WGPU_NULLABLE WGPUSamplerDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3998
+ WGPU_EXPORT WGPUShaderModule wgpuDeviceCreateShaderModule(WGPUDevice device, WGPUShaderModuleDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
3999
+ WGPU_EXPORT WGPUSwapChain wgpuDeviceCreateSwapChain(WGPUDevice device, WGPUSurface surface, WGPUSwapChainDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
4000
+ WGPU_EXPORT WGPUTexture wgpuDeviceCreateTexture(WGPUDevice device, WGPUTextureDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
4001
+ WGPU_EXPORT void wgpuDeviceDestroy(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
4002
+ WGPU_EXPORT size_t wgpuDeviceEnumerateFeatures(WGPUDevice device, WGPUFeatureName * features) WGPU_FUNCTION_ATTRIBUTE;
4003
+ WGPU_EXPORT void wgpuDeviceForceLoss(WGPUDevice device, WGPUDeviceLostReason type, char const * message) WGPU_FUNCTION_ATTRIBUTE;
4004
+ WGPU_EXPORT WGPUStatus wgpuDeviceGetAHardwareBufferProperties(WGPUDevice device, void * handle, WGPUAHardwareBufferProperties * properties) WGPU_FUNCTION_ATTRIBUTE;
4005
+ WGPU_EXPORT WGPUAdapter wgpuDeviceGetAdapter(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
4006
+ WGPU_EXPORT WGPUStatus wgpuDeviceGetLimits(WGPUDevice device, WGPUSupportedLimits * limits) WGPU_FUNCTION_ATTRIBUTE;
4007
+ WGPU_EXPORT WGPUQueue wgpuDeviceGetQueue(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
4008
+ WGPU_EXPORT WGPUTextureUsage wgpuDeviceGetSupportedSurfaceUsage(WGPUDevice device, WGPUSurface surface) WGPU_FUNCTION_ATTRIBUTE;
4009
+ WGPU_EXPORT WGPUBool wgpuDeviceHasFeature(WGPUDevice device, WGPUFeatureName feature) WGPU_FUNCTION_ATTRIBUTE;
4010
+ WGPU_EXPORT WGPUSharedBufferMemory wgpuDeviceImportSharedBufferMemory(WGPUDevice device, WGPUSharedBufferMemoryDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
4011
+ WGPU_EXPORT WGPUSharedFence wgpuDeviceImportSharedFence(WGPUDevice device, WGPUSharedFenceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
4012
+ WGPU_EXPORT WGPUSharedTextureMemory wgpuDeviceImportSharedTextureMemory(WGPUDevice device, WGPUSharedTextureMemoryDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
4013
+ WGPU_EXPORT void wgpuDeviceInjectError(WGPUDevice device, WGPUErrorType type, char const * message) WGPU_FUNCTION_ATTRIBUTE;
4014
+ WGPU_EXPORT void wgpuDevicePopErrorScope(WGPUDevice device, WGPUErrorCallback oldCallback, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
4015
+ WGPU_EXPORT WGPUFuture wgpuDevicePopErrorScope2(WGPUDevice device, WGPUPopErrorScopeCallbackInfo2 callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
4016
+ WGPU_EXPORT WGPUFuture wgpuDevicePopErrorScopeF(WGPUDevice device, WGPUPopErrorScopeCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
4017
+ WGPU_EXPORT void wgpuDevicePushErrorScope(WGPUDevice device, WGPUErrorFilter filter) WGPU_FUNCTION_ATTRIBUTE;
4018
+ WGPU_EXPORT void wgpuDeviceSetDeviceLostCallback(WGPUDevice device, WGPUDeviceLostCallback callback, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
4019
+ WGPU_EXPORT void wgpuDeviceSetLabel(WGPUDevice device, char const * label) WGPU_FUNCTION_ATTRIBUTE;
4020
+ WGPU_EXPORT void wgpuDeviceSetLoggingCallback(WGPUDevice device, WGPULoggingCallback callback, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
4021
+ WGPU_EXPORT void wgpuDeviceSetUncapturedErrorCallback(WGPUDevice device, WGPUErrorCallback callback, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
4022
+ WGPU_EXPORT void wgpuDeviceTick(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
4023
+ WGPU_EXPORT void wgpuDeviceValidateTextureDescriptor(WGPUDevice device, WGPUTextureDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
4024
+ WGPU_EXPORT void wgpuDeviceAddRef(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
4025
+ WGPU_EXPORT void wgpuDeviceRelease(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
4026
+
4027
+ // Methods of ExternalTexture
4028
+ WGPU_EXPORT void wgpuExternalTextureDestroy(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
4029
+ WGPU_EXPORT void wgpuExternalTextureExpire(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
4030
+ WGPU_EXPORT void wgpuExternalTextureRefresh(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
4031
+ WGPU_EXPORT void wgpuExternalTextureSetLabel(WGPUExternalTexture externalTexture, char const * label) WGPU_FUNCTION_ATTRIBUTE;
4032
+ WGPU_EXPORT void wgpuExternalTextureAddRef(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
4033
+ WGPU_EXPORT void wgpuExternalTextureRelease(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
4034
+
4035
+ // Methods of Instance
4036
+ WGPU_EXPORT WGPUSurface wgpuInstanceCreateSurface(WGPUInstance instance, WGPUSurfaceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
4037
+ WGPU_EXPORT size_t wgpuInstanceEnumerateWGSLLanguageFeatures(WGPUInstance instance, WGPUWGSLFeatureName * features) WGPU_FUNCTION_ATTRIBUTE;
4038
+ WGPU_EXPORT WGPUBool wgpuInstanceHasWGSLLanguageFeature(WGPUInstance instance, WGPUWGSLFeatureName feature) WGPU_FUNCTION_ATTRIBUTE;
4039
+ WGPU_EXPORT void wgpuInstanceProcessEvents(WGPUInstance instance) WGPU_FUNCTION_ATTRIBUTE;
4040
+ WGPU_EXPORT void wgpuInstanceRequestAdapter(WGPUInstance instance, WGPU_NULLABLE WGPURequestAdapterOptions const * options, WGPURequestAdapterCallback callback, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
4041
+ WGPU_EXPORT WGPUFuture wgpuInstanceRequestAdapter2(WGPUInstance instance, WGPU_NULLABLE WGPURequestAdapterOptions const * options, WGPURequestAdapterCallbackInfo2 callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
4042
+ WGPU_EXPORT WGPUFuture wgpuInstanceRequestAdapterF(WGPUInstance instance, WGPU_NULLABLE WGPURequestAdapterOptions const * options, WGPURequestAdapterCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
4043
+ WGPU_EXPORT WGPUWaitStatus wgpuInstanceWaitAny(WGPUInstance instance, size_t futureCount, WGPUFutureWaitInfo * futures, uint64_t timeoutNS) WGPU_FUNCTION_ATTRIBUTE;
4044
+ WGPU_EXPORT void wgpuInstanceAddRef(WGPUInstance instance) WGPU_FUNCTION_ATTRIBUTE;
4045
+ WGPU_EXPORT void wgpuInstanceRelease(WGPUInstance instance) WGPU_FUNCTION_ATTRIBUTE;
4046
+
4047
+ // Methods of PipelineLayout
4048
+ WGPU_EXPORT void wgpuPipelineLayoutSetLabel(WGPUPipelineLayout pipelineLayout, char const * label) WGPU_FUNCTION_ATTRIBUTE;
4049
+ WGPU_EXPORT void wgpuPipelineLayoutAddRef(WGPUPipelineLayout pipelineLayout) WGPU_FUNCTION_ATTRIBUTE;
4050
+ WGPU_EXPORT void wgpuPipelineLayoutRelease(WGPUPipelineLayout pipelineLayout) WGPU_FUNCTION_ATTRIBUTE;
4051
+
4052
+ // Methods of QuerySet
4053
+ WGPU_EXPORT void wgpuQuerySetDestroy(WGPUQuerySet querySet) WGPU_FUNCTION_ATTRIBUTE;
4054
+ WGPU_EXPORT uint32_t wgpuQuerySetGetCount(WGPUQuerySet querySet) WGPU_FUNCTION_ATTRIBUTE;
4055
+ WGPU_EXPORT WGPUQueryType wgpuQuerySetGetType(WGPUQuerySet querySet) WGPU_FUNCTION_ATTRIBUTE;
4056
+ WGPU_EXPORT void wgpuQuerySetSetLabel(WGPUQuerySet querySet, char const * label) WGPU_FUNCTION_ATTRIBUTE;
4057
+ WGPU_EXPORT void wgpuQuerySetAddRef(WGPUQuerySet querySet) WGPU_FUNCTION_ATTRIBUTE;
4058
+ WGPU_EXPORT void wgpuQuerySetRelease(WGPUQuerySet querySet) WGPU_FUNCTION_ATTRIBUTE;
4059
+
4060
+ // Methods of Queue
4061
+ WGPU_EXPORT void wgpuQueueCopyExternalTextureForBrowser(WGPUQueue queue, WGPUImageCopyExternalTexture const * source, WGPUImageCopyTexture const * destination, WGPUExtent3D const * copySize, WGPUCopyTextureForBrowserOptions const * options) WGPU_FUNCTION_ATTRIBUTE;
4062
+ WGPU_EXPORT void wgpuQueueCopyTextureForBrowser(WGPUQueue queue, WGPUImageCopyTexture const * source, WGPUImageCopyTexture const * destination, WGPUExtent3D const * copySize, WGPUCopyTextureForBrowserOptions const * options) WGPU_FUNCTION_ATTRIBUTE;
4063
+ WGPU_EXPORT void wgpuQueueOnSubmittedWorkDone(WGPUQueue queue, WGPUQueueWorkDoneCallback callback, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
4064
+ WGPU_EXPORT WGPUFuture wgpuQueueOnSubmittedWorkDone2(WGPUQueue queue, WGPUQueueWorkDoneCallbackInfo2 callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
4065
+ WGPU_EXPORT WGPUFuture wgpuQueueOnSubmittedWorkDoneF(WGPUQueue queue, WGPUQueueWorkDoneCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
4066
+ WGPU_EXPORT void wgpuQueueSetLabel(WGPUQueue queue, char const * label) WGPU_FUNCTION_ATTRIBUTE;
4067
+ WGPU_EXPORT void wgpuQueueSubmit(WGPUQueue queue, size_t commandCount, WGPUCommandBuffer const * commands) WGPU_FUNCTION_ATTRIBUTE;
4068
+ WGPU_EXPORT void wgpuQueueWriteBuffer(WGPUQueue queue, WGPUBuffer buffer, uint64_t bufferOffset, void const * data, size_t size) WGPU_FUNCTION_ATTRIBUTE;
4069
+ WGPU_EXPORT void wgpuQueueWriteTexture(WGPUQueue queue, WGPUImageCopyTexture const * destination, void const * data, size_t dataSize, WGPUTextureDataLayout const * dataLayout, WGPUExtent3D const * writeSize) WGPU_FUNCTION_ATTRIBUTE;
4070
+ WGPU_EXPORT void wgpuQueueAddRef(WGPUQueue queue) WGPU_FUNCTION_ATTRIBUTE;
4071
+ WGPU_EXPORT void wgpuQueueRelease(WGPUQueue queue) WGPU_FUNCTION_ATTRIBUTE;
4072
+
4073
+ // Methods of RenderBundle
4074
+ WGPU_EXPORT void wgpuRenderBundleSetLabel(WGPURenderBundle renderBundle, char const * label) WGPU_FUNCTION_ATTRIBUTE;
4075
+ WGPU_EXPORT void wgpuRenderBundleAddRef(WGPURenderBundle renderBundle) WGPU_FUNCTION_ATTRIBUTE;
4076
+ WGPU_EXPORT void wgpuRenderBundleRelease(WGPURenderBundle renderBundle) WGPU_FUNCTION_ATTRIBUTE;
4077
+
4078
+ // Methods of RenderBundleEncoder
4079
+ WGPU_EXPORT void wgpuRenderBundleEncoderDraw(WGPURenderBundleEncoder renderBundleEncoder, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) WGPU_FUNCTION_ATTRIBUTE;
4080
+ WGPU_EXPORT void wgpuRenderBundleEncoderDrawIndexed(WGPURenderBundleEncoder renderBundleEncoder, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t baseVertex, uint32_t firstInstance) WGPU_FUNCTION_ATTRIBUTE;
4081
+ WGPU_EXPORT void wgpuRenderBundleEncoderDrawIndexedIndirect(WGPURenderBundleEncoder renderBundleEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset) WGPU_FUNCTION_ATTRIBUTE;
4082
+ WGPU_EXPORT void wgpuRenderBundleEncoderDrawIndirect(WGPURenderBundleEncoder renderBundleEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset) WGPU_FUNCTION_ATTRIBUTE;
4083
+ WGPU_EXPORT WGPURenderBundle wgpuRenderBundleEncoderFinish(WGPURenderBundleEncoder renderBundleEncoder, WGPU_NULLABLE WGPURenderBundleDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
4084
+ WGPU_EXPORT void wgpuRenderBundleEncoderInsertDebugMarker(WGPURenderBundleEncoder renderBundleEncoder, char const * markerLabel) WGPU_FUNCTION_ATTRIBUTE;
4085
+ WGPU_EXPORT void wgpuRenderBundleEncoderPopDebugGroup(WGPURenderBundleEncoder renderBundleEncoder) WGPU_FUNCTION_ATTRIBUTE;
4086
+ WGPU_EXPORT void wgpuRenderBundleEncoderPushDebugGroup(WGPURenderBundleEncoder renderBundleEncoder, char const * groupLabel) WGPU_FUNCTION_ATTRIBUTE;
4087
+ WGPU_EXPORT void wgpuRenderBundleEncoderSetBindGroup(WGPURenderBundleEncoder renderBundleEncoder, uint32_t groupIndex, WGPU_NULLABLE WGPUBindGroup group, size_t dynamicOffsetCount, uint32_t const * dynamicOffsets) WGPU_FUNCTION_ATTRIBUTE;
4088
+ WGPU_EXPORT void wgpuRenderBundleEncoderSetIndexBuffer(WGPURenderBundleEncoder renderBundleEncoder, WGPUBuffer buffer, WGPUIndexFormat format, uint64_t offset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
4089
+ WGPU_EXPORT void wgpuRenderBundleEncoderSetLabel(WGPURenderBundleEncoder renderBundleEncoder, char const * label) WGPU_FUNCTION_ATTRIBUTE;
4090
+ WGPU_EXPORT void wgpuRenderBundleEncoderSetPipeline(WGPURenderBundleEncoder renderBundleEncoder, WGPURenderPipeline pipeline) WGPU_FUNCTION_ATTRIBUTE;
4091
+ WGPU_EXPORT void wgpuRenderBundleEncoderSetVertexBuffer(WGPURenderBundleEncoder renderBundleEncoder, uint32_t slot, WGPU_NULLABLE WGPUBuffer buffer, uint64_t offset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
4092
+ WGPU_EXPORT void wgpuRenderBundleEncoderAddRef(WGPURenderBundleEncoder renderBundleEncoder) WGPU_FUNCTION_ATTRIBUTE;
4093
+ WGPU_EXPORT void wgpuRenderBundleEncoderRelease(WGPURenderBundleEncoder renderBundleEncoder) WGPU_FUNCTION_ATTRIBUTE;
4094
+
4095
+ // Methods of RenderPassEncoder
4096
+ WGPU_EXPORT void wgpuRenderPassEncoderBeginOcclusionQuery(WGPURenderPassEncoder renderPassEncoder, uint32_t queryIndex) WGPU_FUNCTION_ATTRIBUTE;
4097
+ WGPU_EXPORT void wgpuRenderPassEncoderDraw(WGPURenderPassEncoder renderPassEncoder, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) WGPU_FUNCTION_ATTRIBUTE;
4098
+ WGPU_EXPORT void wgpuRenderPassEncoderDrawIndexed(WGPURenderPassEncoder renderPassEncoder, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t baseVertex, uint32_t firstInstance) WGPU_FUNCTION_ATTRIBUTE;
4099
+ WGPU_EXPORT void wgpuRenderPassEncoderDrawIndexedIndirect(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset) WGPU_FUNCTION_ATTRIBUTE;
4100
+ WGPU_EXPORT void wgpuRenderPassEncoderDrawIndirect(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset) WGPU_FUNCTION_ATTRIBUTE;
4101
+ WGPU_EXPORT void wgpuRenderPassEncoderEnd(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
4102
+ WGPU_EXPORT void wgpuRenderPassEncoderEndOcclusionQuery(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
4103
+ WGPU_EXPORT void wgpuRenderPassEncoderExecuteBundles(WGPURenderPassEncoder renderPassEncoder, size_t bundleCount, WGPURenderBundle const * bundles) WGPU_FUNCTION_ATTRIBUTE;
4104
+ WGPU_EXPORT void wgpuRenderPassEncoderInsertDebugMarker(WGPURenderPassEncoder renderPassEncoder, char const * markerLabel) WGPU_FUNCTION_ATTRIBUTE;
4105
+ WGPU_EXPORT void wgpuRenderPassEncoderPixelLocalStorageBarrier(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
4106
+ WGPU_EXPORT void wgpuRenderPassEncoderPopDebugGroup(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
4107
+ WGPU_EXPORT void wgpuRenderPassEncoderPushDebugGroup(WGPURenderPassEncoder renderPassEncoder, char const * groupLabel) WGPU_FUNCTION_ATTRIBUTE;
4108
+ WGPU_EXPORT void wgpuRenderPassEncoderSetBindGroup(WGPURenderPassEncoder renderPassEncoder, uint32_t groupIndex, WGPU_NULLABLE WGPUBindGroup group, size_t dynamicOffsetCount, uint32_t const * dynamicOffsets) WGPU_FUNCTION_ATTRIBUTE;
4109
+ WGPU_EXPORT void wgpuRenderPassEncoderSetBlendConstant(WGPURenderPassEncoder renderPassEncoder, WGPUColor const * color) WGPU_FUNCTION_ATTRIBUTE;
4110
+ WGPU_EXPORT void wgpuRenderPassEncoderSetIndexBuffer(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer buffer, WGPUIndexFormat format, uint64_t offset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
4111
+ WGPU_EXPORT void wgpuRenderPassEncoderSetLabel(WGPURenderPassEncoder renderPassEncoder, char const * label) WGPU_FUNCTION_ATTRIBUTE;
4112
+ WGPU_EXPORT void wgpuRenderPassEncoderSetPipeline(WGPURenderPassEncoder renderPassEncoder, WGPURenderPipeline pipeline) WGPU_FUNCTION_ATTRIBUTE;
4113
+ WGPU_EXPORT void wgpuRenderPassEncoderSetScissorRect(WGPURenderPassEncoder renderPassEncoder, uint32_t x, uint32_t y, uint32_t width, uint32_t height) WGPU_FUNCTION_ATTRIBUTE;
4114
+ WGPU_EXPORT void wgpuRenderPassEncoderSetStencilReference(WGPURenderPassEncoder renderPassEncoder, uint32_t reference) WGPU_FUNCTION_ATTRIBUTE;
4115
+ WGPU_EXPORT void wgpuRenderPassEncoderSetVertexBuffer(WGPURenderPassEncoder renderPassEncoder, uint32_t slot, WGPU_NULLABLE WGPUBuffer buffer, uint64_t offset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
4116
+ WGPU_EXPORT void wgpuRenderPassEncoderSetViewport(WGPURenderPassEncoder renderPassEncoder, float x, float y, float width, float height, float minDepth, float maxDepth) WGPU_FUNCTION_ATTRIBUTE;
4117
+ WGPU_EXPORT void wgpuRenderPassEncoderWriteTimestamp(WGPURenderPassEncoder renderPassEncoder, WGPUQuerySet querySet, uint32_t queryIndex) WGPU_FUNCTION_ATTRIBUTE;
4118
+ WGPU_EXPORT void wgpuRenderPassEncoderAddRef(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
4119
+ WGPU_EXPORT void wgpuRenderPassEncoderRelease(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
4120
+
4121
+ // Methods of RenderPipeline
4122
+ WGPU_EXPORT WGPUBindGroupLayout wgpuRenderPipelineGetBindGroupLayout(WGPURenderPipeline renderPipeline, uint32_t groupIndex) WGPU_FUNCTION_ATTRIBUTE;
4123
+ WGPU_EXPORT void wgpuRenderPipelineSetLabel(WGPURenderPipeline renderPipeline, char const * label) WGPU_FUNCTION_ATTRIBUTE;
4124
+ WGPU_EXPORT void wgpuRenderPipelineAddRef(WGPURenderPipeline renderPipeline) WGPU_FUNCTION_ATTRIBUTE;
4125
+ WGPU_EXPORT void wgpuRenderPipelineRelease(WGPURenderPipeline renderPipeline) WGPU_FUNCTION_ATTRIBUTE;
4126
+
4127
+ // Methods of Sampler
4128
+ WGPU_EXPORT void wgpuSamplerSetLabel(WGPUSampler sampler, char const * label) WGPU_FUNCTION_ATTRIBUTE;
4129
+ WGPU_EXPORT void wgpuSamplerAddRef(WGPUSampler sampler) WGPU_FUNCTION_ATTRIBUTE;
4130
+ WGPU_EXPORT void wgpuSamplerRelease(WGPUSampler sampler) WGPU_FUNCTION_ATTRIBUTE;
4131
+
4132
+ // Methods of ShaderModule
4133
+ WGPU_EXPORT void wgpuShaderModuleGetCompilationInfo(WGPUShaderModule shaderModule, WGPUCompilationInfoCallback callback, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
4134
+ WGPU_EXPORT WGPUFuture wgpuShaderModuleGetCompilationInfo2(WGPUShaderModule shaderModule, WGPUCompilationInfoCallbackInfo2 callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
4135
+ WGPU_EXPORT WGPUFuture wgpuShaderModuleGetCompilationInfoF(WGPUShaderModule shaderModule, WGPUCompilationInfoCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
4136
+ WGPU_EXPORT void wgpuShaderModuleSetLabel(WGPUShaderModule shaderModule, char const * label) WGPU_FUNCTION_ATTRIBUTE;
4137
+ WGPU_EXPORT void wgpuShaderModuleAddRef(WGPUShaderModule shaderModule) WGPU_FUNCTION_ATTRIBUTE;
4138
+ WGPU_EXPORT void wgpuShaderModuleRelease(WGPUShaderModule shaderModule) WGPU_FUNCTION_ATTRIBUTE;
4139
+
4140
+ // Methods of SharedBufferMemory
4141
+ WGPU_EXPORT WGPUStatus wgpuSharedBufferMemoryBeginAccess(WGPUSharedBufferMemory sharedBufferMemory, WGPUBuffer buffer, WGPUSharedBufferMemoryBeginAccessDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
4142
+ WGPU_EXPORT WGPUBuffer wgpuSharedBufferMemoryCreateBuffer(WGPUSharedBufferMemory sharedBufferMemory, WGPU_NULLABLE WGPUBufferDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
4143
+ WGPU_EXPORT WGPUStatus wgpuSharedBufferMemoryEndAccess(WGPUSharedBufferMemory sharedBufferMemory, WGPUBuffer buffer, WGPUSharedBufferMemoryEndAccessState * descriptor) WGPU_FUNCTION_ATTRIBUTE;
4144
+ WGPU_EXPORT WGPUStatus wgpuSharedBufferMemoryGetProperties(WGPUSharedBufferMemory sharedBufferMemory, WGPUSharedBufferMemoryProperties * properties) WGPU_FUNCTION_ATTRIBUTE;
4145
+ WGPU_EXPORT WGPUBool wgpuSharedBufferMemoryIsDeviceLost(WGPUSharedBufferMemory sharedBufferMemory) WGPU_FUNCTION_ATTRIBUTE;
4146
+ WGPU_EXPORT void wgpuSharedBufferMemorySetLabel(WGPUSharedBufferMemory sharedBufferMemory, char const * label) WGPU_FUNCTION_ATTRIBUTE;
4147
+ WGPU_EXPORT void wgpuSharedBufferMemoryAddRef(WGPUSharedBufferMemory sharedBufferMemory) WGPU_FUNCTION_ATTRIBUTE;
4148
+ WGPU_EXPORT void wgpuSharedBufferMemoryRelease(WGPUSharedBufferMemory sharedBufferMemory) WGPU_FUNCTION_ATTRIBUTE;
4149
+
4150
+ // Methods of SharedFence
4151
+ WGPU_EXPORT void wgpuSharedFenceExportInfo(WGPUSharedFence sharedFence, WGPUSharedFenceExportInfo * info) WGPU_FUNCTION_ATTRIBUTE;
4152
+ WGPU_EXPORT void wgpuSharedFenceAddRef(WGPUSharedFence sharedFence) WGPU_FUNCTION_ATTRIBUTE;
4153
+ WGPU_EXPORT void wgpuSharedFenceRelease(WGPUSharedFence sharedFence) WGPU_FUNCTION_ATTRIBUTE;
4154
+
4155
+ // Methods of SharedTextureMemory
4156
+ WGPU_EXPORT WGPUStatus wgpuSharedTextureMemoryBeginAccess(WGPUSharedTextureMemory sharedTextureMemory, WGPUTexture texture, WGPUSharedTextureMemoryBeginAccessDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
4157
+ WGPU_EXPORT WGPUTexture wgpuSharedTextureMemoryCreateTexture(WGPUSharedTextureMemory sharedTextureMemory, WGPU_NULLABLE WGPUTextureDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
4158
+ WGPU_EXPORT WGPUStatus wgpuSharedTextureMemoryEndAccess(WGPUSharedTextureMemory sharedTextureMemory, WGPUTexture texture, WGPUSharedTextureMemoryEndAccessState * descriptor) WGPU_FUNCTION_ATTRIBUTE;
4159
+ WGPU_EXPORT WGPUStatus wgpuSharedTextureMemoryGetProperties(WGPUSharedTextureMemory sharedTextureMemory, WGPUSharedTextureMemoryProperties * properties) WGPU_FUNCTION_ATTRIBUTE;
4160
+ WGPU_EXPORT WGPUBool wgpuSharedTextureMemoryIsDeviceLost(WGPUSharedTextureMemory sharedTextureMemory) WGPU_FUNCTION_ATTRIBUTE;
4161
+ WGPU_EXPORT void wgpuSharedTextureMemorySetLabel(WGPUSharedTextureMemory sharedTextureMemory, char const * label) WGPU_FUNCTION_ATTRIBUTE;
4162
+ WGPU_EXPORT void wgpuSharedTextureMemoryAddRef(WGPUSharedTextureMemory sharedTextureMemory) WGPU_FUNCTION_ATTRIBUTE;
4163
+ WGPU_EXPORT void wgpuSharedTextureMemoryRelease(WGPUSharedTextureMemory sharedTextureMemory) WGPU_FUNCTION_ATTRIBUTE;
4164
+
4165
+ // Methods of Surface
4166
+ WGPU_EXPORT void wgpuSurfaceConfigure(WGPUSurface surface, WGPUSurfaceConfiguration const * config) WGPU_FUNCTION_ATTRIBUTE;
4167
+ WGPU_EXPORT WGPUStatus wgpuSurfaceGetCapabilities(WGPUSurface surface, WGPUAdapter adapter, WGPUSurfaceCapabilities * capabilities) WGPU_FUNCTION_ATTRIBUTE;
4168
+ WGPU_EXPORT void wgpuSurfaceGetCurrentTexture(WGPUSurface surface, WGPUSurfaceTexture * surfaceTexture) WGPU_FUNCTION_ATTRIBUTE;
4169
+ WGPU_EXPORT WGPUTextureFormat wgpuSurfaceGetPreferredFormat(WGPUSurface surface, WGPUAdapter adapter) WGPU_FUNCTION_ATTRIBUTE;
4170
+ WGPU_EXPORT void wgpuSurfacePresent(WGPUSurface surface) WGPU_FUNCTION_ATTRIBUTE;
4171
+ WGPU_EXPORT void wgpuSurfaceUnconfigure(WGPUSurface surface) WGPU_FUNCTION_ATTRIBUTE;
4172
+ WGPU_EXPORT void wgpuSurfaceAddRef(WGPUSurface surface) WGPU_FUNCTION_ATTRIBUTE;
4173
+ WGPU_EXPORT void wgpuSurfaceRelease(WGPUSurface surface) WGPU_FUNCTION_ATTRIBUTE;
4174
+
4175
+ // Methods of SwapChain
4176
+ WGPU_EXPORT WGPUTexture wgpuSwapChainGetCurrentTexture(WGPUSwapChain swapChain) WGPU_FUNCTION_ATTRIBUTE;
4177
+ WGPU_EXPORT WGPUTextureView wgpuSwapChainGetCurrentTextureView(WGPUSwapChain swapChain) WGPU_FUNCTION_ATTRIBUTE;
4178
+ WGPU_EXPORT void wgpuSwapChainPresent(WGPUSwapChain swapChain) WGPU_FUNCTION_ATTRIBUTE;
4179
+ WGPU_EXPORT void wgpuSwapChainAddRef(WGPUSwapChain swapChain) WGPU_FUNCTION_ATTRIBUTE;
4180
+ WGPU_EXPORT void wgpuSwapChainRelease(WGPUSwapChain swapChain) WGPU_FUNCTION_ATTRIBUTE;
4181
+
4182
+ // Methods of Texture
4183
+ WGPU_EXPORT WGPUTextureView wgpuTextureCreateErrorView(WGPUTexture texture, WGPU_NULLABLE WGPUTextureViewDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
4184
+ WGPU_EXPORT WGPUTextureView wgpuTextureCreateView(WGPUTexture texture, WGPU_NULLABLE WGPUTextureViewDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
4185
+ WGPU_EXPORT void wgpuTextureDestroy(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
4186
+ WGPU_EXPORT uint32_t wgpuTextureGetDepthOrArrayLayers(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
4187
+ WGPU_EXPORT WGPUTextureDimension wgpuTextureGetDimension(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
4188
+ WGPU_EXPORT WGPUTextureFormat wgpuTextureGetFormat(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
4189
+ WGPU_EXPORT uint32_t wgpuTextureGetHeight(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
4190
+ WGPU_EXPORT uint32_t wgpuTextureGetMipLevelCount(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
4191
+ WGPU_EXPORT uint32_t wgpuTextureGetSampleCount(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
4192
+ WGPU_EXPORT WGPUTextureUsage wgpuTextureGetUsage(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
4193
+ WGPU_EXPORT uint32_t wgpuTextureGetWidth(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
4194
+ WGPU_EXPORT void wgpuTextureSetLabel(WGPUTexture texture, char const * label) WGPU_FUNCTION_ATTRIBUTE;
4195
+ WGPU_EXPORT void wgpuTextureAddRef(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
4196
+ WGPU_EXPORT void wgpuTextureRelease(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
4197
+
4198
+ // Methods of TextureView
4199
+ WGPU_EXPORT void wgpuTextureViewSetLabel(WGPUTextureView textureView, char const * label) WGPU_FUNCTION_ATTRIBUTE;
4200
+ WGPU_EXPORT void wgpuTextureViewAddRef(WGPUTextureView textureView) WGPU_FUNCTION_ATTRIBUTE;
4201
+ WGPU_EXPORT void wgpuTextureViewRelease(WGPUTextureView textureView) WGPU_FUNCTION_ATTRIBUTE;
4202
+
27
4203
 
28
- #ifndef INCLUDE_WEBGPU_WEBGPU_H_
29
- #define INCLUDE_WEBGPU_WEBGPU_H_
4204
+ #endif // !defined(WGPU_SKIP_DECLARATIONS)
30
4205
 
31
- #include "dawn/webgpu.h"
4206
+ #ifdef __cplusplus
4207
+ } // extern "C"
4208
+ #endif
32
4209
 
33
- #endif // INCLUDE_WEBGPU_WEBGPU_H_
4210
+ #endif // WEBGPU_H_