|
1 | 1 | --- webgpu_header |
2 | 2 | +++ dawn_header |
3 | | -@@ |
4 | | - typedef struct WGPUComputePassEncoderImpl* WGPUComputePassEncoder WGPU_OBJECT_ATTRIBUTE; |
5 | | - typedef struct WGPUComputePipelineImpl* WGPUComputePipeline WGPU_OBJECT_ATTRIBUTE; |
6 | | - typedef struct WGPUDeviceImpl* WGPUDevice WGPU_OBJECT_ATTRIBUTE; |
7 | | --typedef struct WGPUExternalTextureImpl* WGPUExternalTexture WGPU_OBJECT_ATTRIBUTE; |
8 | | - typedef struct WGPUInstanceImpl* WGPUInstance WGPU_OBJECT_ATTRIBUTE; |
9 | | - typedef struct WGPUPipelineLayoutImpl* WGPUPipelineLayout WGPU_OBJECT_ATTRIBUTE; |
10 | | - typedef struct WGPUQuerySetImpl* WGPUQuerySet WGPU_OBJECT_ATTRIBUTE; |
11 | | -@@ |
12 | | - typedef struct WGPUTextureViewImpl* WGPUTextureView WGPU_OBJECT_ATTRIBUTE; |
13 | | - |
14 | | - struct WGPUAdapterInfo; |
15 | | -+struct WGPUBindGroupEntry; |
16 | | - struct WGPUBlendComponent; |
17 | | - struct WGPUBufferBindingLayout; |
18 | | - struct WGPUBufferDescriptor; |
19 | | -@@ |
20 | | - struct WGPUCompilationMessage; |
21 | | - struct WGPUConstantEntry; |
22 | | - struct WGPUExtent3D; |
23 | | --struct WGPUExternalTextureBindingEntry; |
24 | | --struct WGPUExternalTextureBindingLayout; |
25 | | - struct WGPUFuture; |
26 | | - struct WGPUInstanceLimits; |
27 | | - struct WGPULimits; |
28 | 3 | @@ |
29 | 4 | struct WGPUTexelCopyBufferLayout; |
30 | 5 | struct WGPUTextureBindingLayout; |
31 | 6 | struct WGPUTextureComponentSwizzle; |
32 | 7 | -struct WGPUTextureViewDescriptor; |
33 | 8 | struct WGPUVertexAttribute; |
34 | | --struct WGPUBindGroupEntry; |
35 | | -+struct WGPUBindGroupDescriptor; |
| 9 | + struct WGPUBindGroupEntry; |
36 | 10 | struct WGPUBindGroupLayoutEntry; |
37 | | - struct WGPUBlendState; |
38 | | - struct WGPUCompilationInfo; |
39 | 11 | @@ |
40 | | - struct WGPUTextureComponentSwizzleDescriptor; |
41 | | - struct WGPUTextureDescriptor; |
42 | | - struct WGPUVertexBufferLayout; |
43 | | --struct WGPUBindGroupDescriptor; |
44 | | - struct WGPUBindGroupLayoutDescriptor; |
45 | 12 | struct WGPUColorTargetState; |
46 | 13 | struct WGPUComputePipelineDescriptor; |
47 | 14 | struct WGPURenderPassDescriptor; |
48 | 15 | +struct WGPUTextureViewDescriptor; |
49 | 16 | struct WGPUVertexState; |
50 | 17 | struct WGPUFragmentState; |
51 | 18 | struct WGPURenderPipelineDescriptor; |
52 | | -@@ |
53 | | - WGPUSType_SurfaceColorManagement = 0x0000000A, |
54 | | - WGPUSType_RequestAdapterWebXROptions = 0x0000000B, |
55 | | - WGPUSType_TextureComponentSwizzleDescriptor = 0x0000000C, |
56 | | -- WGPUSType_ExternalTextureBindingLayout = 0x0000000D, |
57 | | -- WGPUSType_ExternalTextureBindingEntry = 0x0000000E, |
58 | | - WGPUSType_Force32 = 0x7FFFFFFF |
59 | | - } WGPUSType WGPU_ENUM_ATTRIBUTE; |
60 | | - |
61 | | -@@ |
62 | | - /*.subgroupMaxSize=*/0 _wgpu_COMMA \ |
63 | | - }) |
64 | | - |
65 | | -+typedef struct WGPUBindGroupEntry { |
66 | | -+ WGPUChainedStruct * nextInChain; |
67 | | -+ uint32_t binding; |
68 | | -+ WGPU_NULLABLE WGPUBuffer buffer; |
69 | | -+ uint64_t offset; |
70 | | -+ uint64_t size; |
71 | | -+ WGPU_NULLABLE WGPUSampler sampler; |
72 | | -+ WGPU_NULLABLE WGPUTextureView textureView; |
73 | | -+} WGPUBindGroupEntry WGPU_STRUCTURE_ATTRIBUTE; |
74 | | -+ |
75 | | -+#define WGPU_BIND_GROUP_ENTRY_INIT _wgpu_MAKE_INIT_STRUCT(WGPUBindGroupEntry, { \ |
76 | | -+ /*.nextInChain=*/NULL _wgpu_COMMA \ |
77 | | -+ /*.binding=*/0 _wgpu_COMMA \ |
78 | | -+ /*.buffer=*/NULL _wgpu_COMMA \ |
79 | | -+ /*.offset=*/0 _wgpu_COMMA \ |
80 | | -+ /*.size=*/WGPU_WHOLE_SIZE _wgpu_COMMA \ |
81 | | -+ /*.sampler=*/NULL _wgpu_COMMA \ |
82 | | -+ /*.textureView=*/NULL _wgpu_COMMA \ |
83 | | -+}) |
84 | | -+ |
85 | | - typedef struct WGPUBlendComponent { |
86 | | - WGPUBlendOperation operation; |
87 | | - WGPUBlendFactor srcFactor; |
88 | | -@@ |
89 | | - /*.width=*/0 _wgpu_COMMA \ |
90 | | - /*.height=*/1 _wgpu_COMMA \ |
91 | | - /*.depthOrArrayLayers=*/1 _wgpu_COMMA \ |
92 | | --}) |
93 | | -- |
94 | | --typedef struct WGPUExternalTextureBindingEntry { |
95 | | -- WGPUChainedStruct chain; |
96 | | -- WGPUExternalTexture externalTexture; |
97 | | --} WGPUExternalTextureBindingEntry WGPU_STRUCTURE_ATTRIBUTE; |
98 | | -- |
99 | | --#define WGPU_EXTERNAL_TEXTURE_BINDING_ENTRY_INIT _wgpu_MAKE_INIT_STRUCT(WGPUExternalTextureBindingEntry, { \ |
100 | | -- /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \ |
101 | | -- /*.next=*/NULL _wgpu_COMMA \ |
102 | | -- /*.sType=*/WGPUSType_ExternalTextureBindingEntry _wgpu_COMMA \ |
103 | | -- }) _wgpu_COMMA \ |
104 | | -- /*.externalTexture=*/NULL _wgpu_COMMA \ |
105 | | --}) |
106 | | -- |
107 | | --typedef struct WGPUExternalTextureBindingLayout { |
108 | | -- WGPUChainedStruct chain; |
109 | | --} WGPUExternalTextureBindingLayout WGPU_STRUCTURE_ATTRIBUTE; |
110 | | -- |
111 | | --#define WGPU_EXTERNAL_TEXTURE_BINDING_LAYOUT_INIT _wgpu_MAKE_INIT_STRUCT(WGPUExternalTextureBindingLayout, { \ |
112 | | -- /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \ |
113 | | -- /*.next=*/NULL _wgpu_COMMA \ |
114 | | -- /*.sType=*/WGPUSType_ExternalTextureBindingLayout _wgpu_COMMA \ |
115 | | -- }) _wgpu_COMMA \ |
116 | | - }) |
117 | | - |
118 | | - typedef struct WGPUFuture { |
119 | 19 | @@ |
120 | 20 | /*.a=*/WGPUComponentSwizzle_Undefined _wgpu_COMMA \ |
121 | 21 | }) |
|
149 | 49 | typedef struct WGPUVertexAttribute { |
150 | 50 | WGPUChainedStruct * nextInChain; |
151 | 51 | WGPUVertexFormat format; |
152 | | -@@ |
153 | | - /*.shaderLocation=*/0 _wgpu_COMMA \ |
154 | | - }) |
155 | | - |
156 | | --typedef struct WGPUBindGroupEntry { |
157 | | -- WGPUChainedStruct * nextInChain; |
158 | | -- uint32_t binding; |
159 | | -- WGPU_NULLABLE WGPUBuffer buffer; |
160 | | -- uint64_t offset; |
161 | | -- uint64_t size; |
162 | | -- WGPU_NULLABLE WGPUSampler sampler; |
163 | | -- WGPU_NULLABLE WGPUTextureView textureView; |
164 | | --} WGPUBindGroupEntry WGPU_STRUCTURE_ATTRIBUTE; |
165 | | -- |
166 | | --#define WGPU_BIND_GROUP_ENTRY_INIT _wgpu_MAKE_INIT_STRUCT(WGPUBindGroupEntry, { \ |
167 | | -- /*.nextInChain=*/NULL _wgpu_COMMA \ |
168 | | -- /*.binding=*/0 _wgpu_COMMA \ |
169 | | -- /*.buffer=*/NULL _wgpu_COMMA \ |
170 | | -- /*.offset=*/0 _wgpu_COMMA \ |
171 | | -- /*.size=*/WGPU_WHOLE_SIZE _wgpu_COMMA \ |
172 | | -- /*.sampler=*/NULL _wgpu_COMMA \ |
173 | | -- /*.textureView=*/NULL _wgpu_COMMA \ |
174 | | -+typedef struct WGPUBindGroupDescriptor { |
175 | | -+ WGPUChainedStruct * nextInChain; |
176 | | -+ WGPUStringView label; |
177 | | -+ WGPUBindGroupLayout layout; |
178 | | -+ size_t entryCount; |
179 | | -+ WGPUBindGroupEntry const * entries; |
180 | | -+} WGPUBindGroupDescriptor WGPU_STRUCTURE_ATTRIBUTE; |
181 | | -+ |
182 | | -+#define WGPU_BIND_GROUP_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUBindGroupDescriptor, { \ |
183 | | -+ /*.nextInChain=*/NULL _wgpu_COMMA \ |
184 | | -+ /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \ |
185 | | -+ /*.layout=*/NULL _wgpu_COMMA \ |
186 | | -+ /*.entryCount=*/0 _wgpu_COMMA \ |
187 | | -+ /*.entries=*/NULL _wgpu_COMMA \ |
188 | | - }) |
189 | | - |
190 | | - typedef struct WGPUBindGroupLayoutEntry { |
191 | | -@@ |
192 | | - /*.attributes=*/NULL _wgpu_COMMA \ |
193 | | - }) |
194 | | - |
195 | | --typedef struct WGPUBindGroupDescriptor { |
196 | | -- WGPUChainedStruct * nextInChain; |
197 | | -- WGPUStringView label; |
198 | | -- WGPUBindGroupLayout layout; |
199 | | -- size_t entryCount; |
200 | | -- WGPUBindGroupEntry const * entries; |
201 | | --} WGPUBindGroupDescriptor WGPU_STRUCTURE_ATTRIBUTE; |
202 | | -- |
203 | | --#define WGPU_BIND_GROUP_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUBindGroupDescriptor, { \ |
204 | | -- /*.nextInChain=*/NULL _wgpu_COMMA \ |
205 | | -- /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \ |
206 | | -- /*.layout=*/NULL _wgpu_COMMA \ |
207 | | -- /*.entryCount=*/0 _wgpu_COMMA \ |
208 | | -- /*.entries=*/NULL _wgpu_COMMA \ |
209 | | --}) |
210 | | -- |
211 | | - typedef struct WGPUBindGroupLayoutDescriptor { |
212 | | - WGPUChainedStruct * nextInChain; |
213 | | - WGPUStringView label; |
214 | 52 | @@ |
215 | 53 | /*.depthStencilAttachment=*/NULL _wgpu_COMMA \ |
216 | 54 | /*.occlusionQuerySet=*/NULL _wgpu_COMMA \ |
|
244 | 82 | }) |
245 | 83 |
|
246 | 84 | typedef struct WGPUVertexState { |
247 | | -@@ |
248 | | - typedef void (*WGPUProcDeviceAddRef)(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE; |
249 | | - typedef void (*WGPUProcDeviceRelease)(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE; |
250 | | - |
251 | | --typedef void (*WGPUProcExternalTextureSetLabel)(WGPUExternalTexture externalTexture, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE; |
252 | | --typedef void (*WGPUProcExternalTextureAddRef)(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE; |
253 | | --typedef void (*WGPUProcExternalTextureRelease)(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE; |
254 | | -- |
255 | | - typedef WGPUSurface (*WGPUProcInstanceCreateSurface)(WGPUInstance instance, WGPUSurfaceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE; |
256 | | - typedef void (*WGPUProcInstanceGetWGSLLanguageFeatures)(WGPUInstance instance, WGPUSupportedWGSLLanguageFeatures * features) WGPU_FUNCTION_ATTRIBUTE; |
257 | | - typedef WGPUBool (*WGPUProcInstanceHasWGSLLanguageFeature)(WGPUInstance instance, WGPUWGSLLanguageFeatureName feature) WGPU_FUNCTION_ATTRIBUTE; |
258 | | -@@ |
259 | | - WGPU_EXPORT void wgpuDeviceAddRef(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE; |
260 | | - WGPU_EXPORT void wgpuDeviceRelease(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE; |
261 | | - |
262 | | --WGPU_EXPORT void wgpuExternalTextureSetLabel(WGPUExternalTexture externalTexture, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE; |
263 | | --WGPU_EXPORT void wgpuExternalTextureAddRef(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE; |
264 | | --WGPU_EXPORT void wgpuExternalTextureRelease(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE; |
265 | | -- |
266 | | - WGPU_EXPORT WGPUSurface wgpuInstanceCreateSurface(WGPUInstance instance, WGPUSurfaceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE; |
267 | | - WGPU_EXPORT void wgpuInstanceGetWGSLLanguageFeatures(WGPUInstance instance, WGPUSupportedWGSLLanguageFeatures * features) WGPU_FUNCTION_ATTRIBUTE; |
268 | | - WGPU_EXPORT WGPUBool wgpuInstanceHasWGSLLanguageFeature(WGPUInstance instance, WGPUWGSLLanguageFeatureName feature) WGPU_FUNCTION_ATTRIBUTE; |
0 commit comments