Skip to content

Commit 60f0601

Browse files
committed
update api header
1 parent 67b3500 commit 60f0601

File tree

2 files changed

+12
-68
lines changed

2 files changed

+12
-68
lines changed

src/wgpu/wgpu-api.h

+9-68
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,31 @@
1313
x(AdapterInfoFreeMembers) \
1414
x(AdapterPropertiesMemoryHeapsFreeMembers) \
1515
x(CreateInstance) \
16-
x(DrmFormatCapabilitiesFreeMembers) \
17-
x(GetInstanceFeatures) \
16+
x(DawnDrmFormatCapabilitiesFreeMembers) \
17+
x(GetInstanceCapabilities) \
1818
x(GetProcAddress) \
19-
x(GetProcAddress2) \
2019
x(SharedBufferMemoryEndAccessStateFreeMembers) \
2120
x(SharedTextureMemoryEndAccessStateFreeMembers) \
21+
x(SupportedWGSLLanguageFeaturesFreeMembers) \
22+
x(SupportedFeaturesFreeMembers) \
2223
x(SurfaceCapabilitiesFreeMembers) \
2324
/* Procs of Adapter */ \
2425
x(AdapterCreateDevice) \
25-
x(AdapterEnumerateFeatures) \
26+
x(AdapterGetFeatures) \
2627
x(AdapterGetFormatCapabilities) \
2728
x(AdapterGetInfo) \
2829
x(AdapterGetInstance) \
2930
x(AdapterGetLimits) \
3031
x(AdapterHasFeature) \
3132
x(AdapterRequestDevice) \
32-
x(AdapterRequestDevice2) \
33-
x(AdapterRequestDeviceF) \
3433
x(AdapterAddRef) \
3534
x(AdapterRelease) \
3635
/* Procs of BindGroup */ \
3736
x(BindGroupSetLabel) \
38-
x(BindGroupSetLabel2) \
3937
x(BindGroupAddRef) \
4038
x(BindGroupRelease) \
4139
/* Procs of BindGroupLayout */ \
4240
x(BindGroupLayoutSetLabel) \
43-
x(BindGroupLayoutSetLabel2) \
4441
x(BindGroupLayoutAddRef) \
4542
x(BindGroupLayoutRelease) \
4643
/* Procs of Buffer */ \
@@ -51,16 +48,12 @@
5148
x(BufferGetSize) \
5249
x(BufferGetUsage) \
5350
x(BufferMapAsync) \
54-
x(BufferMapAsync2) \
55-
x(BufferMapAsyncF) \
5651
x(BufferSetLabel) \
57-
x(BufferSetLabel2) \
5852
x(BufferUnmap) \
5953
x(BufferAddRef) \
6054
x(BufferRelease) \
6155
/* Procs of CommandBuffer */ \
6256
x(CommandBufferSetLabel) \
63-
x(CommandBufferSetLabel2) \
6457
x(CommandBufferAddRef) \
6558
x(CommandBufferRelease) \
6659
/* Procs of CommandEncoder */ \
@@ -73,15 +66,11 @@
7366
x(CommandEncoderCopyTextureToTexture) \
7467
x(CommandEncoderFinish) \
7568
x(CommandEncoderInjectValidationError) \
76-
x(CommandEncoderInjectValidationError2) \
7769
x(CommandEncoderInsertDebugMarker) \
78-
x(CommandEncoderInsertDebugMarker2) \
7970
x(CommandEncoderPopDebugGroup) \
8071
x(CommandEncoderPushDebugGroup) \
81-
x(CommandEncoderPushDebugGroup2) \
8272
x(CommandEncoderResolveQuerySet) \
8373
x(CommandEncoderSetLabel) \
84-
x(CommandEncoderSetLabel2) \
8574
x(CommandEncoderWriteBuffer) \
8675
x(CommandEncoderWriteTimestamp) \
8776
x(CommandEncoderAddRef) \
@@ -91,21 +80,17 @@
9180
x(ComputePassEncoderDispatchWorkgroupsIndirect) \
9281
x(ComputePassEncoderEnd) \
9382
x(ComputePassEncoderInsertDebugMarker) \
94-
x(ComputePassEncoderInsertDebugMarker2) \
9583
x(ComputePassEncoderPopDebugGroup) \
9684
x(ComputePassEncoderPushDebugGroup) \
97-
x(ComputePassEncoderPushDebugGroup2) \
9885
x(ComputePassEncoderSetBindGroup) \
9986
x(ComputePassEncoderSetLabel) \
100-
x(ComputePassEncoderSetLabel2) \
10187
x(ComputePassEncoderSetPipeline) \
10288
x(ComputePassEncoderWriteTimestamp) \
10389
x(ComputePassEncoderAddRef) \
10490
x(ComputePassEncoderRelease) \
10591
/* Procs of ComputePipeline */ \
10692
x(ComputePipelineGetBindGroupLayout) \
10793
x(ComputePipelineSetLabel) \
108-
x(ComputePipelineSetLabel2) \
10994
x(ComputePipelineAddRef) \
11095
x(ComputePipelineRelease) \
11196
/* Procs of Device */ \
@@ -115,49 +100,37 @@
115100
x(DeviceCreateCommandEncoder) \
116101
x(DeviceCreateComputePipeline) \
117102
x(DeviceCreateComputePipelineAsync) \
118-
x(DeviceCreateComputePipelineAsync2) \
119-
x(DeviceCreateComputePipelineAsyncF) \
120103
x(DeviceCreateErrorBuffer) \
121104
x(DeviceCreateErrorExternalTexture) \
122105
x(DeviceCreateErrorShaderModule) \
123-
x(DeviceCreateErrorShaderModule2) \
124106
x(DeviceCreateErrorTexture) \
125107
x(DeviceCreateExternalTexture) \
126108
x(DeviceCreatePipelineLayout) \
127109
x(DeviceCreateQuerySet) \
128110
x(DeviceCreateRenderBundleEncoder) \
129111
x(DeviceCreateRenderPipeline) \
130112
x(DeviceCreateRenderPipelineAsync) \
131-
x(DeviceCreateRenderPipelineAsync2) \
132-
x(DeviceCreateRenderPipelineAsyncF) \
133113
x(DeviceCreateSampler) \
134114
x(DeviceCreateShaderModule) \
135-
x(DeviceCreateSwapChain) \
136115
x(DeviceCreateTexture) \
137116
x(DeviceDestroy) \
138-
x(DeviceEnumerateFeatures) \
139117
x(DeviceForceLoss) \
140-
x(DeviceForceLoss2) \
141118
x(DeviceGetAHardwareBufferProperties) \
142119
x(DeviceGetAdapter) \
120+
x(DeviceGetAdapterInfo) \
121+
x(DeviceGetFeatures) \
143122
x(DeviceGetLimits) \
123+
x(DeviceGetLostFuture) \
144124
x(DeviceGetQueue) \
145-
x(DeviceGetSupportedSurfaceUsage) \
146125
x(DeviceHasFeature) \
147126
x(DeviceImportSharedBufferMemory) \
148127
x(DeviceImportSharedFence) \
149128
x(DeviceImportSharedTextureMemory) \
150129
x(DeviceInjectError) \
151-
x(DeviceInjectError2) \
152130
x(DevicePopErrorScope) \
153-
x(DevicePopErrorScope2) \
154-
x(DevicePopErrorScopeF) \
155131
x(DevicePushErrorScope) \
156-
x(DeviceSetDeviceLostCallback) \
157132
x(DeviceSetLabel) \
158-
x(DeviceSetLabel2) \
159133
x(DeviceSetLoggingCallback) \
160-
x(DeviceSetUncapturedErrorCallback) \
161134
x(DeviceTick) \
162135
x(DeviceValidateTextureDescriptor) \
163136
x(DeviceAddRef) \
@@ -167,49 +140,40 @@
167140
x(ExternalTextureExpire) \
168141
x(ExternalTextureRefresh) \
169142
x(ExternalTextureSetLabel) \
170-
x(ExternalTextureSetLabel2) \
171143
x(ExternalTextureAddRef) \
172144
x(ExternalTextureRelease) \
173145
/* Procs of Instance */ \
174146
x(InstanceCreateSurface) \
175-
x(InstanceEnumerateWGSLLanguageFeatures) \
147+
x(InstanceGetWGSLLanguageFeatures) \
176148
x(InstanceHasWGSLLanguageFeature) \
177149
x(InstanceProcessEvents) \
178150
x(InstanceRequestAdapter) \
179-
x(InstanceRequestAdapter2) \
180-
x(InstanceRequestAdapterF) \
181151
x(InstanceWaitAny) \
182152
x(InstanceAddRef) \
183153
x(InstanceRelease) \
184154
/* Procs of PipelineLayout */ \
185155
x(PipelineLayoutSetLabel) \
186-
x(PipelineLayoutSetLabel2) \
187156
x(PipelineLayoutAddRef) \
188157
x(PipelineLayoutRelease) \
189158
/* Procs of QuerySet */ \
190159
x(QuerySetDestroy) \
191160
x(QuerySetGetCount) \
192161
x(QuerySetGetType) \
193162
x(QuerySetSetLabel) \
194-
x(QuerySetSetLabel2) \
195163
x(QuerySetAddRef) \
196164
x(QuerySetRelease) \
197165
/* Procs of Queue */ \
198166
x(QueueCopyExternalTextureForBrowser) \
199167
x(QueueCopyTextureForBrowser) \
200168
x(QueueOnSubmittedWorkDone) \
201-
x(QueueOnSubmittedWorkDone2) \
202-
x(QueueOnSubmittedWorkDoneF) \
203169
x(QueueSetLabel) \
204-
x(QueueSetLabel2) \
205170
x(QueueSubmit) \
206171
x(QueueWriteBuffer) \
207172
x(QueueWriteTexture) \
208173
x(QueueAddRef) \
209174
x(QueueRelease) \
210175
/* Procs of RenderBundle */ \
211176
x(RenderBundleSetLabel) \
212-
x(RenderBundleSetLabel2) \
213177
x(RenderBundleAddRef) \
214178
x(RenderBundleRelease) \
215179
/* Procs of RenderBundleEncoder */ \
@@ -219,14 +183,11 @@
219183
x(RenderBundleEncoderDrawIndirect) \
220184
x(RenderBundleEncoderFinish) \
221185
x(RenderBundleEncoderInsertDebugMarker) \
222-
x(RenderBundleEncoderInsertDebugMarker2) \
223186
x(RenderBundleEncoderPopDebugGroup) \
224187
x(RenderBundleEncoderPushDebugGroup) \
225-
x(RenderBundleEncoderPushDebugGroup2) \
226188
x(RenderBundleEncoderSetBindGroup) \
227189
x(RenderBundleEncoderSetIndexBuffer) \
228190
x(RenderBundleEncoderSetLabel) \
229-
x(RenderBundleEncoderSetLabel2) \
230191
x(RenderBundleEncoderSetPipeline) \
231192
x(RenderBundleEncoderSetVertexBuffer) \
232193
x(RenderBundleEncoderAddRef) \
@@ -241,18 +202,15 @@
241202
x(RenderPassEncoderEndOcclusionQuery) \
242203
x(RenderPassEncoderExecuteBundles) \
243204
x(RenderPassEncoderInsertDebugMarker) \
244-
x(RenderPassEncoderInsertDebugMarker2) \
245205
x(RenderPassEncoderMultiDrawIndexedIndirect) \
246206
x(RenderPassEncoderMultiDrawIndirect) \
247207
x(RenderPassEncoderPixelLocalStorageBarrier) \
248208
x(RenderPassEncoderPopDebugGroup) \
249209
x(RenderPassEncoderPushDebugGroup) \
250-
x(RenderPassEncoderPushDebugGroup2) \
251210
x(RenderPassEncoderSetBindGroup) \
252211
x(RenderPassEncoderSetBlendConstant) \
253212
x(RenderPassEncoderSetIndexBuffer) \
254213
x(RenderPassEncoderSetLabel) \
255-
x(RenderPassEncoderSetLabel2) \
256214
x(RenderPassEncoderSetPipeline) \
257215
x(RenderPassEncoderSetScissorRect) \
258216
x(RenderPassEncoderSetStencilReference) \
@@ -264,20 +222,15 @@
264222
/* Procs of RenderPipeline */ \
265223
x(RenderPipelineGetBindGroupLayout) \
266224
x(RenderPipelineSetLabel) \
267-
x(RenderPipelineSetLabel2) \
268225
x(RenderPipelineAddRef) \
269226
x(RenderPipelineRelease) \
270227
/* Procs of Sampler */ \
271228
x(SamplerSetLabel) \
272-
x(SamplerSetLabel2) \
273229
x(SamplerAddRef) \
274230
x(SamplerRelease) \
275231
/* Procs of ShaderModule */ \
276232
x(ShaderModuleGetCompilationInfo) \
277-
x(ShaderModuleGetCompilationInfo2) \
278-
x(ShaderModuleGetCompilationInfoF) \
279233
x(ShaderModuleSetLabel) \
280-
x(ShaderModuleSetLabel2) \
281234
x(ShaderModuleAddRef) \
282235
x(ShaderModuleRelease) \
283236
/* Procs of SharedBufferMemory */ \
@@ -287,7 +240,6 @@
287240
x(SharedBufferMemoryGetProperties) \
288241
x(SharedBufferMemoryIsDeviceLost) \
289242
x(SharedBufferMemorySetLabel) \
290-
x(SharedBufferMemorySetLabel2) \
291243
x(SharedBufferMemoryAddRef) \
292244
x(SharedBufferMemoryRelease) \
293245
/* Procs of SharedFence */ \
@@ -301,26 +253,17 @@
301253
x(SharedTextureMemoryGetProperties) \
302254
x(SharedTextureMemoryIsDeviceLost) \
303255
x(SharedTextureMemorySetLabel) \
304-
x(SharedTextureMemorySetLabel2) \
305256
x(SharedTextureMemoryAddRef) \
306257
x(SharedTextureMemoryRelease) \
307258
/* Procs of Surface */ \
308259
x(SurfaceConfigure) \
309260
x(SurfaceGetCapabilities) \
310261
x(SurfaceGetCurrentTexture) \
311-
x(SurfaceGetPreferredFormat) \
312262
x(SurfacePresent) \
313263
x(SurfaceSetLabel) \
314-
x(SurfaceSetLabel2) \
315264
x(SurfaceUnconfigure) \
316265
x(SurfaceAddRef) \
317266
x(SurfaceRelease) \
318-
/* Procs of SwapChain */ \
319-
x(SwapChainGetCurrentTexture) \
320-
x(SwapChainGetCurrentTextureView) \
321-
x(SwapChainPresent) \
322-
x(SwapChainAddRef) \
323-
x(SwapChainRelease) \
324267
/* Procs of Texture */ \
325268
x(TextureCreateErrorView) \
326269
x(TextureCreateView) \
@@ -334,12 +277,10 @@
334277
x(TextureGetUsage) \
335278
x(TextureGetWidth) \
336279
x(TextureSetLabel) \
337-
x(TextureSetLabel2) \
338280
x(TextureAddRef) \
339281
x(TextureRelease) \
340282
/* Procs of TextureView */ \
341283
x(TextureViewSetLabel) \
342-
x(TextureViewSetLabel2) \
343284
x(TextureViewAddRef) \
344285
x(TextureViewRelease)
345286

tools/extract-webgpu-procs.py

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
if line.startswith("//"):
2121
output += " /* " + line[3:] + " */ \\\n"
2222
else:
23+
match = RE_PROC.search(line)
24+
if match is None:
25+
continue
2326
name = RE_PROC.search(line).group(1)
2427
output += " x(" + name + ") \\\n"
2528

0 commit comments

Comments
 (0)