@shopify/react-native-skia 2.10.1 → 2.11.0-next.1

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 (30) hide show
  1. package/cpp/dawn/include/dawn/dawn_proc.h +53 -0
  2. package/cpp/dawn/include/dawn/dawn_proc_table.h +330 -0
  3. package/cpp/dawn/include/dawn/dawn_thread_dispatch_proc.h +47 -0
  4. package/cpp/dawn/include/dawn/dawn_version.h +41 -0
  5. package/cpp/dawn/include/dawn/native/D3D11Backend.h +65 -0
  6. package/cpp/dawn/include/dawn/native/D3D12Backend.h +86 -0
  7. package/cpp/dawn/include/dawn/native/D3DBackend.h +56 -0
  8. package/cpp/dawn/include/dawn/native/DawnNative.h +369 -0
  9. package/cpp/dawn/include/dawn/native/MetalBackend.h +56 -0
  10. package/cpp/dawn/include/dawn/native/NullBackend.h +39 -0
  11. package/cpp/dawn/include/dawn/native/OpenGLBackend.h +89 -0
  12. package/cpp/dawn/include/dawn/native/VulkanBackend.h +183 -0
  13. package/cpp/dawn/include/dawn/native/WebGPUBackend.h +49 -0
  14. package/cpp/dawn/include/dawn/native/dawn_native_export.h +49 -0
  15. package/cpp/dawn/include/dawn/platform/DawnPlatform.h +210 -0
  16. package/cpp/dawn/include/dawn/platform/dawn_platform_export.h +49 -0
  17. package/cpp/dawn/include/dawn/replay/Replay.h +99 -0
  18. package/cpp/dawn/include/dawn/replay/dawn_replay_export.h +49 -0
  19. package/cpp/dawn/include/dawn/webgpu_cpp_print.h +2844 -0
  20. package/cpp/dawn/include/tint/tint.h +90 -0
  21. package/cpp/dawn/include/webgpu/webgpu.h +4987 -0
  22. package/cpp/dawn/include/webgpu/webgpu_cpp.h +10080 -0
  23. package/cpp/dawn/include/webgpu/webgpu_cpp_chained_struct.h +57 -0
  24. package/cpp/dawn/include/webgpu/webgpu_enum_class_bitmasks.h +161 -0
  25. package/cpp/dawn/include/webgpu/webgpu_glfw.h +88 -0
  26. package/cpp/skia/src/gpu/graphite/ContextOptionsPriv.h +45 -0
  27. package/cpp/skia/src/gpu/graphite/ResourceTypes.h +360 -0
  28. package/cpp/skia/src/gpu/graphite/TextureProxyView.h +105 -0
  29. package/libs/.graphite +1 -0
  30. package/package.json +6 -6
@@ -0,0 +1,53 @@
1
+ // Copyright 2019 The Dawn & Tint Authors
2
+ //
3
+ // Redistribution and use in source and binary forms, with or without
4
+ // modification, are permitted provided that the following conditions are met:
5
+ //
6
+ // 1. Redistributions of source code must retain the above copyright notice, this
7
+ // list of conditions and the following disclaimer.
8
+ //
9
+ // 2. Redistributions in binary form must reproduce the above copyright notice,
10
+ // this list of conditions and the following disclaimer in the documentation
11
+ // and/or other materials provided with the distribution.
12
+ //
13
+ // 3. Neither the name of the copyright holder nor the names of its
14
+ // contributors may be used to endorse or promote products derived from
15
+ // this software without specific prior written permission.
16
+ //
17
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18
+ // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
+ // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20
+ // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21
+ // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
+ // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23
+ // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24
+ // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25
+ // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+
28
+ #ifndef INCLUDE_DAWN_DAWN_PROC_H_
29
+ #define INCLUDE_DAWN_DAWN_PROC_H_
30
+
31
+ #include <webgpu/webgpu.h>
32
+
33
+ #include "dawn/dawn_proc_table.h"
34
+
35
+ #ifdef __cplusplus
36
+ extern "C" {
37
+ #endif
38
+
39
+ // Sets the static proctable used by libdawn_proc to implement the Dawn entrypoints. Passing NULL
40
+ // for `procs` sets up the null proctable that contains only null function pointers. It is the
41
+ // default value of the proctable. Setting the proctable back to null is good practice when you
42
+ // are done using libdawn_proc since further usage will cause a segfault instead of calling an
43
+ // unexpected function.
44
+ WGPU_EXPORT void dawnProcSetProcs(const DawnProcTable* procs);
45
+
46
+ // Returns the static array of uint8_t of size 20 representing the Dawn version.
47
+ WGPU_EXPORT const uint8_t* dawnProcGetVersion();
48
+
49
+ #ifdef __cplusplus
50
+ } // extern "C"
51
+ #endif
52
+
53
+ #endif // INCLUDE_DAWN_DAWN_PROC_H_
@@ -0,0 +1,330 @@
1
+
2
+ #ifndef DAWN_DAWN_PROC_TABLE_H_
3
+ #define DAWN_DAWN_PROC_TABLE_H_
4
+
5
+ #include "webgpu/webgpu.h"
6
+
7
+ // Note: Often allocated as a static global. Do not add a complex constructor.
8
+ typedef struct DawnProcTable {
9
+ uint8_t version[20];
10
+
11
+ WGPUProcCreateInstance createInstance;
12
+ WGPUProcGetInstanceFeatures getInstanceFeatures;
13
+ WGPUProcGetInstanceLimits getInstanceLimits;
14
+ WGPUProcHasInstanceFeature hasInstanceFeature;
15
+ WGPUProcGetProcAddress getProcAddress;
16
+
17
+ WGPUProcAdapterCreateDevice adapterCreateDevice;
18
+ WGPUProcAdapterGetFeatures adapterGetFeatures;
19
+ WGPUProcAdapterGetFormatCapabilities adapterGetFormatCapabilities;
20
+ WGPUProcAdapterGetInfo adapterGetInfo;
21
+ WGPUProcAdapterGetInstance adapterGetInstance;
22
+ WGPUProcAdapterGetLimits adapterGetLimits;
23
+ WGPUProcAdapterHasFeature adapterHasFeature;
24
+ WGPUProcAdapterRequestDevice adapterRequestDevice;
25
+ WGPUProcAdapterAddRef adapterAddRef;
26
+ WGPUProcAdapterRelease adapterRelease;
27
+
28
+ WGPUProcAdapterInfoFreeMembers adapterInfoFreeMembers;
29
+
30
+ WGPUProcAdapterPropertiesMemoryHeapsFreeMembers adapterPropertiesMemoryHeapsFreeMembers;
31
+
32
+ WGPUProcAdapterPropertiesSubgroupMatrixConfigsFreeMembers adapterPropertiesSubgroupMatrixConfigsFreeMembers;
33
+
34
+ WGPUProcBindGroupSetLabel bindGroupSetLabel;
35
+ WGPUProcBindGroupAddRef bindGroupAddRef;
36
+ WGPUProcBindGroupRelease bindGroupRelease;
37
+
38
+ WGPUProcBindGroupLayoutSetLabel bindGroupLayoutSetLabel;
39
+ WGPUProcBindGroupLayoutAddRef bindGroupLayoutAddRef;
40
+ WGPUProcBindGroupLayoutRelease bindGroupLayoutRelease;
41
+
42
+ WGPUProcBufferCreateTexelView bufferCreateTexelView;
43
+ WGPUProcBufferDestroy bufferDestroy;
44
+ WGPUProcBufferGetConstMappedRange bufferGetConstMappedRange;
45
+ WGPUProcBufferGetMappedRange bufferGetMappedRange;
46
+ WGPUProcBufferGetMapState bufferGetMapState;
47
+ WGPUProcBufferGetSize bufferGetSize;
48
+ WGPUProcBufferGetUsage bufferGetUsage;
49
+ WGPUProcBufferMapAsync bufferMapAsync;
50
+ WGPUProcBufferReadMappedRange bufferReadMappedRange;
51
+ WGPUProcBufferSetLabel bufferSetLabel;
52
+ WGPUProcBufferUnmap bufferUnmap;
53
+ WGPUProcBufferWriteMappedRange bufferWriteMappedRange;
54
+ WGPUProcBufferAddRef bufferAddRef;
55
+ WGPUProcBufferRelease bufferRelease;
56
+
57
+ WGPUProcCommandBufferSetLabel commandBufferSetLabel;
58
+ WGPUProcCommandBufferAddRef commandBufferAddRef;
59
+ WGPUProcCommandBufferRelease commandBufferRelease;
60
+
61
+ WGPUProcCommandEncoderBeginComputePass commandEncoderBeginComputePass;
62
+ WGPUProcCommandEncoderBeginRenderPass commandEncoderBeginRenderPass;
63
+ WGPUProcCommandEncoderClearBuffer commandEncoderClearBuffer;
64
+ WGPUProcCommandEncoderCopyBufferToBuffer commandEncoderCopyBufferToBuffer;
65
+ WGPUProcCommandEncoderCopyBufferToTexture commandEncoderCopyBufferToTexture;
66
+ WGPUProcCommandEncoderCopyTextureToBuffer commandEncoderCopyTextureToBuffer;
67
+ WGPUProcCommandEncoderCopyTextureToTexture commandEncoderCopyTextureToTexture;
68
+ WGPUProcCommandEncoderFinish commandEncoderFinish;
69
+ WGPUProcCommandEncoderInjectValidationError commandEncoderInjectValidationError;
70
+ WGPUProcCommandEncoderInsertDebugMarker commandEncoderInsertDebugMarker;
71
+ WGPUProcCommandEncoderPopDebugGroup commandEncoderPopDebugGroup;
72
+ WGPUProcCommandEncoderPushDebugGroup commandEncoderPushDebugGroup;
73
+ WGPUProcCommandEncoderResolveQuerySet commandEncoderResolveQuerySet;
74
+ WGPUProcCommandEncoderSetLabel commandEncoderSetLabel;
75
+ WGPUProcCommandEncoderWriteBuffer commandEncoderWriteBuffer;
76
+ WGPUProcCommandEncoderWriteTimestamp commandEncoderWriteTimestamp;
77
+ WGPUProcCommandEncoderAddRef commandEncoderAddRef;
78
+ WGPUProcCommandEncoderRelease commandEncoderRelease;
79
+
80
+ WGPUProcComputePassEncoderDispatchWorkgroups computePassEncoderDispatchWorkgroups;
81
+ WGPUProcComputePassEncoderDispatchWorkgroupsIndirect computePassEncoderDispatchWorkgroupsIndirect;
82
+ WGPUProcComputePassEncoderEnd computePassEncoderEnd;
83
+ WGPUProcComputePassEncoderInsertDebugMarker computePassEncoderInsertDebugMarker;
84
+ WGPUProcComputePassEncoderPopDebugGroup computePassEncoderPopDebugGroup;
85
+ WGPUProcComputePassEncoderPushDebugGroup computePassEncoderPushDebugGroup;
86
+ WGPUProcComputePassEncoderSetBindGroup computePassEncoderSetBindGroup;
87
+ WGPUProcComputePassEncoderSetImmediates computePassEncoderSetImmediates;
88
+ WGPUProcComputePassEncoderSetLabel computePassEncoderSetLabel;
89
+ WGPUProcComputePassEncoderSetPipeline computePassEncoderSetPipeline;
90
+ WGPUProcComputePassEncoderSetResourceTable computePassEncoderSetResourceTable;
91
+ WGPUProcComputePassEncoderWriteTimestamp computePassEncoderWriteTimestamp;
92
+ WGPUProcComputePassEncoderAddRef computePassEncoderAddRef;
93
+ WGPUProcComputePassEncoderRelease computePassEncoderRelease;
94
+
95
+ WGPUProcComputePipelineGetBindGroupLayout computePipelineGetBindGroupLayout;
96
+ WGPUProcComputePipelineSetLabel computePipelineSetLabel;
97
+ WGPUProcComputePipelineAddRef computePipelineAddRef;
98
+ WGPUProcComputePipelineRelease computePipelineRelease;
99
+
100
+ WGPUProcDawnDrmFormatCapabilitiesFreeMembers dawnDrmFormatCapabilitiesFreeMembers;
101
+
102
+ WGPUProcDeviceCreateBindGroup deviceCreateBindGroup;
103
+ WGPUProcDeviceCreateBindGroupLayout deviceCreateBindGroupLayout;
104
+ WGPUProcDeviceCreateBuffer deviceCreateBuffer;
105
+ WGPUProcDeviceCreateCommandEncoder deviceCreateCommandEncoder;
106
+ WGPUProcDeviceCreateComputePipeline deviceCreateComputePipeline;
107
+ WGPUProcDeviceCreateComputePipelineAsync deviceCreateComputePipelineAsync;
108
+ WGPUProcDeviceCreateErrorBuffer deviceCreateErrorBuffer;
109
+ WGPUProcDeviceCreateErrorExternalTexture deviceCreateErrorExternalTexture;
110
+ WGPUProcDeviceCreateErrorShaderModule deviceCreateErrorShaderModule;
111
+ WGPUProcDeviceCreateErrorTexture deviceCreateErrorTexture;
112
+ WGPUProcDeviceCreateExternalTexture deviceCreateExternalTexture;
113
+ WGPUProcDeviceCreatePipelineLayout deviceCreatePipelineLayout;
114
+ WGPUProcDeviceCreateQuerySet deviceCreateQuerySet;
115
+ WGPUProcDeviceCreateRenderBundleEncoder deviceCreateRenderBundleEncoder;
116
+ WGPUProcDeviceCreateRenderPipeline deviceCreateRenderPipeline;
117
+ WGPUProcDeviceCreateRenderPipelineAsync deviceCreateRenderPipelineAsync;
118
+ WGPUProcDeviceCreateResourceTable deviceCreateResourceTable;
119
+ WGPUProcDeviceCreateSampler deviceCreateSampler;
120
+ WGPUProcDeviceCreateShaderModule deviceCreateShaderModule;
121
+ WGPUProcDeviceCreateTexture deviceCreateTexture;
122
+ WGPUProcDeviceDestroy deviceDestroy;
123
+ WGPUProcDeviceForceLoss deviceForceLoss;
124
+ WGPUProcDeviceGetAdapter deviceGetAdapter;
125
+ WGPUProcDeviceGetAdapterInfo deviceGetAdapterInfo;
126
+ WGPUProcDeviceGetAHardwareBufferProperties deviceGetAHardwareBufferProperties;
127
+ WGPUProcDeviceGetFeatures deviceGetFeatures;
128
+ WGPUProcDeviceGetLimits deviceGetLimits;
129
+ WGPUProcDeviceGetLostFuture deviceGetLostFuture;
130
+ WGPUProcDeviceGetQueue deviceGetQueue;
131
+ WGPUProcDeviceHasFeature deviceHasFeature;
132
+ WGPUProcDeviceImportSharedBufferMemory deviceImportSharedBufferMemory;
133
+ WGPUProcDeviceImportSharedFence deviceImportSharedFence;
134
+ WGPUProcDeviceImportSharedTextureMemory deviceImportSharedTextureMemory;
135
+ WGPUProcDeviceInjectError deviceInjectError;
136
+ WGPUProcDevicePopErrorScope devicePopErrorScope;
137
+ WGPUProcDevicePushErrorScope devicePushErrorScope;
138
+ WGPUProcDeviceSetLabel deviceSetLabel;
139
+ WGPUProcDeviceSetLoggingCallback deviceSetLoggingCallback;
140
+ WGPUProcDeviceTick deviceTick;
141
+ WGPUProcDeviceValidateTextureDescriptor deviceValidateTextureDescriptor;
142
+ WGPUProcDeviceAddRef deviceAddRef;
143
+ WGPUProcDeviceRelease deviceRelease;
144
+
145
+ WGPUProcExternalTextureDestroy externalTextureDestroy;
146
+ WGPUProcExternalTextureExpire externalTextureExpire;
147
+ WGPUProcExternalTextureRefresh externalTextureRefresh;
148
+ WGPUProcExternalTextureSetLabel externalTextureSetLabel;
149
+ WGPUProcExternalTextureAddRef externalTextureAddRef;
150
+ WGPUProcExternalTextureRelease externalTextureRelease;
151
+
152
+ WGPUProcInstanceCreateSurface instanceCreateSurface;
153
+ WGPUProcInstanceGetWGSLLanguageFeatures instanceGetWGSLLanguageFeatures;
154
+ WGPUProcInstanceHasWGSLLanguageFeature instanceHasWGSLLanguageFeature;
155
+ WGPUProcInstanceProcessEvents instanceProcessEvents;
156
+ WGPUProcInstanceRequestAdapter instanceRequestAdapter;
157
+ WGPUProcInstanceWaitAny instanceWaitAny;
158
+ WGPUProcInstanceAddRef instanceAddRef;
159
+ WGPUProcInstanceRelease instanceRelease;
160
+
161
+ WGPUProcPipelineLayoutSetLabel pipelineLayoutSetLabel;
162
+ WGPUProcPipelineLayoutAddRef pipelineLayoutAddRef;
163
+ WGPUProcPipelineLayoutRelease pipelineLayoutRelease;
164
+
165
+ WGPUProcQuerySetDestroy querySetDestroy;
166
+ WGPUProcQuerySetGetCount querySetGetCount;
167
+ WGPUProcQuerySetGetType querySetGetType;
168
+ WGPUProcQuerySetSetLabel querySetSetLabel;
169
+ WGPUProcQuerySetAddRef querySetAddRef;
170
+ WGPUProcQuerySetRelease querySetRelease;
171
+
172
+ WGPUProcQueueCopyExternalTextureForBrowser queueCopyExternalTextureForBrowser;
173
+ WGPUProcQueueCopyTextureForBrowser queueCopyTextureForBrowser;
174
+ WGPUProcQueueOnSubmittedWorkDone queueOnSubmittedWorkDone;
175
+ WGPUProcQueueSetLabel queueSetLabel;
176
+ WGPUProcQueueSubmit queueSubmit;
177
+ WGPUProcQueueWriteBuffer queueWriteBuffer;
178
+ WGPUProcQueueWriteTexture queueWriteTexture;
179
+ WGPUProcQueueAddRef queueAddRef;
180
+ WGPUProcQueueRelease queueRelease;
181
+
182
+ WGPUProcRenderBundleSetLabel renderBundleSetLabel;
183
+ WGPUProcRenderBundleAddRef renderBundleAddRef;
184
+ WGPUProcRenderBundleRelease renderBundleRelease;
185
+
186
+ WGPUProcRenderBundleEncoderDraw renderBundleEncoderDraw;
187
+ WGPUProcRenderBundleEncoderDrawIndexed renderBundleEncoderDrawIndexed;
188
+ WGPUProcRenderBundleEncoderDrawIndexedIndirect renderBundleEncoderDrawIndexedIndirect;
189
+ WGPUProcRenderBundleEncoderDrawIndirect renderBundleEncoderDrawIndirect;
190
+ WGPUProcRenderBundleEncoderFinish renderBundleEncoderFinish;
191
+ WGPUProcRenderBundleEncoderInsertDebugMarker renderBundleEncoderInsertDebugMarker;
192
+ WGPUProcRenderBundleEncoderPopDebugGroup renderBundleEncoderPopDebugGroup;
193
+ WGPUProcRenderBundleEncoderPushDebugGroup renderBundleEncoderPushDebugGroup;
194
+ WGPUProcRenderBundleEncoderSetBindGroup renderBundleEncoderSetBindGroup;
195
+ WGPUProcRenderBundleEncoderSetImmediates renderBundleEncoderSetImmediates;
196
+ WGPUProcRenderBundleEncoderSetIndexBuffer renderBundleEncoderSetIndexBuffer;
197
+ WGPUProcRenderBundleEncoderSetLabel renderBundleEncoderSetLabel;
198
+ WGPUProcRenderBundleEncoderSetPipeline renderBundleEncoderSetPipeline;
199
+ WGPUProcRenderBundleEncoderSetResourceTable renderBundleEncoderSetResourceTable;
200
+ WGPUProcRenderBundleEncoderSetVertexBuffer renderBundleEncoderSetVertexBuffer;
201
+ WGPUProcRenderBundleEncoderAddRef renderBundleEncoderAddRef;
202
+ WGPUProcRenderBundleEncoderRelease renderBundleEncoderRelease;
203
+
204
+ WGPUProcRenderPassEncoderBeginOcclusionQuery renderPassEncoderBeginOcclusionQuery;
205
+ WGPUProcRenderPassEncoderDraw renderPassEncoderDraw;
206
+ WGPUProcRenderPassEncoderDrawIndexed renderPassEncoderDrawIndexed;
207
+ WGPUProcRenderPassEncoderDrawIndexedIndirect renderPassEncoderDrawIndexedIndirect;
208
+ WGPUProcRenderPassEncoderDrawIndirect renderPassEncoderDrawIndirect;
209
+ WGPUProcRenderPassEncoderEnd renderPassEncoderEnd;
210
+ WGPUProcRenderPassEncoderEndOcclusionQuery renderPassEncoderEndOcclusionQuery;
211
+ WGPUProcRenderPassEncoderExecuteBundles renderPassEncoderExecuteBundles;
212
+ WGPUProcRenderPassEncoderInsertDebugMarker renderPassEncoderInsertDebugMarker;
213
+ WGPUProcRenderPassEncoderMultiDrawIndexedIndirect renderPassEncoderMultiDrawIndexedIndirect;
214
+ WGPUProcRenderPassEncoderMultiDrawIndirect renderPassEncoderMultiDrawIndirect;
215
+ WGPUProcRenderPassEncoderPixelLocalStorageBarrier renderPassEncoderPixelLocalStorageBarrier;
216
+ WGPUProcRenderPassEncoderPopDebugGroup renderPassEncoderPopDebugGroup;
217
+ WGPUProcRenderPassEncoderPushDebugGroup renderPassEncoderPushDebugGroup;
218
+ WGPUProcRenderPassEncoderSetBindGroup renderPassEncoderSetBindGroup;
219
+ WGPUProcRenderPassEncoderSetBlendConstant renderPassEncoderSetBlendConstant;
220
+ WGPUProcRenderPassEncoderSetImmediates renderPassEncoderSetImmediates;
221
+ WGPUProcRenderPassEncoderSetIndexBuffer renderPassEncoderSetIndexBuffer;
222
+ WGPUProcRenderPassEncoderSetLabel renderPassEncoderSetLabel;
223
+ WGPUProcRenderPassEncoderSetPipeline renderPassEncoderSetPipeline;
224
+ WGPUProcRenderPassEncoderSetResourceTable renderPassEncoderSetResourceTable;
225
+ WGPUProcRenderPassEncoderSetScissorRect renderPassEncoderSetScissorRect;
226
+ WGPUProcRenderPassEncoderSetStencilReference renderPassEncoderSetStencilReference;
227
+ WGPUProcRenderPassEncoderSetVertexBuffer renderPassEncoderSetVertexBuffer;
228
+ WGPUProcRenderPassEncoderSetViewport renderPassEncoderSetViewport;
229
+ WGPUProcRenderPassEncoderWriteTimestamp renderPassEncoderWriteTimestamp;
230
+ WGPUProcRenderPassEncoderAddRef renderPassEncoderAddRef;
231
+ WGPUProcRenderPassEncoderRelease renderPassEncoderRelease;
232
+
233
+ WGPUProcRenderPipelineGetBindGroupLayout renderPipelineGetBindGroupLayout;
234
+ WGPUProcRenderPipelineSetLabel renderPipelineSetLabel;
235
+ WGPUProcRenderPipelineAddRef renderPipelineAddRef;
236
+ WGPUProcRenderPipelineRelease renderPipelineRelease;
237
+
238
+ WGPUProcResourceTableDestroy resourceTableDestroy;
239
+ WGPUProcResourceTableGetSize resourceTableGetSize;
240
+ WGPUProcResourceTableInsertBinding resourceTableInsertBinding;
241
+ WGPUProcResourceTableRemoveBinding resourceTableRemoveBinding;
242
+ WGPUProcResourceTableSetLabel resourceTableSetLabel;
243
+ WGPUProcResourceTableUpdate resourceTableUpdate;
244
+ WGPUProcResourceTableAddRef resourceTableAddRef;
245
+ WGPUProcResourceTableRelease resourceTableRelease;
246
+
247
+ WGPUProcSamplerSetLabel samplerSetLabel;
248
+ WGPUProcSamplerAddRef samplerAddRef;
249
+ WGPUProcSamplerRelease samplerRelease;
250
+
251
+ WGPUProcShaderModuleGetCompilationInfo shaderModuleGetCompilationInfo;
252
+ WGPUProcShaderModuleSetLabel shaderModuleSetLabel;
253
+ WGPUProcShaderModuleAddRef shaderModuleAddRef;
254
+ WGPUProcShaderModuleRelease shaderModuleRelease;
255
+
256
+ WGPUProcSharedBufferMemoryBeginAccess sharedBufferMemoryBeginAccess;
257
+ WGPUProcSharedBufferMemoryCreateBuffer sharedBufferMemoryCreateBuffer;
258
+ WGPUProcSharedBufferMemoryEndAccess sharedBufferMemoryEndAccess;
259
+ WGPUProcSharedBufferMemoryGetProperties sharedBufferMemoryGetProperties;
260
+ WGPUProcSharedBufferMemoryIsDeviceLost sharedBufferMemoryIsDeviceLost;
261
+ WGPUProcSharedBufferMemorySetLabel sharedBufferMemorySetLabel;
262
+ WGPUProcSharedBufferMemoryAddRef sharedBufferMemoryAddRef;
263
+ WGPUProcSharedBufferMemoryRelease sharedBufferMemoryRelease;
264
+
265
+ WGPUProcSharedBufferMemoryEndAccessStateFreeMembers sharedBufferMemoryEndAccessStateFreeMembers;
266
+
267
+ WGPUProcSharedFenceExportInfo sharedFenceExportInfo;
268
+ WGPUProcSharedFenceSetLabel sharedFenceSetLabel;
269
+ WGPUProcSharedFenceAddRef sharedFenceAddRef;
270
+ WGPUProcSharedFenceRelease sharedFenceRelease;
271
+
272
+ WGPUProcSharedTextureMemoryBeginAccess sharedTextureMemoryBeginAccess;
273
+ WGPUProcSharedTextureMemoryCreateTexture sharedTextureMemoryCreateTexture;
274
+ WGPUProcSharedTextureMemoryEndAccess sharedTextureMemoryEndAccess;
275
+ WGPUProcSharedTextureMemoryGetProperties sharedTextureMemoryGetProperties;
276
+ WGPUProcSharedTextureMemoryIsDeviceLost sharedTextureMemoryIsDeviceLost;
277
+ WGPUProcSharedTextureMemorySetLabel sharedTextureMemorySetLabel;
278
+ WGPUProcSharedTextureMemoryAddRef sharedTextureMemoryAddRef;
279
+ WGPUProcSharedTextureMemoryRelease sharedTextureMemoryRelease;
280
+
281
+ WGPUProcSharedTextureMemoryEndAccessStateFreeMembers sharedTextureMemoryEndAccessStateFreeMembers;
282
+
283
+ WGPUProcSupportedFeaturesFreeMembers supportedFeaturesFreeMembers;
284
+
285
+ WGPUProcSupportedInstanceFeaturesFreeMembers supportedInstanceFeaturesFreeMembers;
286
+
287
+ WGPUProcSupportedWGSLLanguageFeaturesFreeMembers supportedWGSLLanguageFeaturesFreeMembers;
288
+
289
+ WGPUProcSurfaceConfigure surfaceConfigure;
290
+ WGPUProcSurfaceGetCapabilities surfaceGetCapabilities;
291
+ WGPUProcSurfaceGetCurrentTexture surfaceGetCurrentTexture;
292
+ WGPUProcSurfacePresent surfacePresent;
293
+ WGPUProcSurfaceSetLabel surfaceSetLabel;
294
+ WGPUProcSurfaceUnconfigure surfaceUnconfigure;
295
+ WGPUProcSurfaceAddRef surfaceAddRef;
296
+ WGPUProcSurfaceRelease surfaceRelease;
297
+
298
+ WGPUProcSurfaceCapabilitiesFreeMembers surfaceCapabilitiesFreeMembers;
299
+
300
+ WGPUProcTexelBufferViewSetLabel texelBufferViewSetLabel;
301
+ WGPUProcTexelBufferViewAddRef texelBufferViewAddRef;
302
+ WGPUProcTexelBufferViewRelease texelBufferViewRelease;
303
+
304
+ WGPUProcTextureCreateErrorView textureCreateErrorView;
305
+ WGPUProcTextureCreateView textureCreateView;
306
+ WGPUProcTextureDestroy textureDestroy;
307
+ WGPUProcTextureGetDepthOrArrayLayers textureGetDepthOrArrayLayers;
308
+ WGPUProcTextureGetDimension textureGetDimension;
309
+ WGPUProcTextureGetFormat textureGetFormat;
310
+ WGPUProcTextureGetHeight textureGetHeight;
311
+ WGPUProcTextureGetMipLevelCount textureGetMipLevelCount;
312
+ WGPUProcTextureGetSampleCount textureGetSampleCount;
313
+ WGPUProcTextureGetTextureBindingViewDimension textureGetTextureBindingViewDimension;
314
+ WGPUProcTextureGetUsage textureGetUsage;
315
+ WGPUProcTextureGetWidth textureGetWidth;
316
+ WGPUProcTexturePin texturePin;
317
+ WGPUProcTextureSetLabel textureSetLabel;
318
+ WGPUProcTextureSetOwnershipForMemoryDump textureSetOwnershipForMemoryDump;
319
+ WGPUProcTextureUnpin textureUnpin;
320
+ WGPUProcTextureAddRef textureAddRef;
321
+ WGPUProcTextureRelease textureRelease;
322
+
323
+ WGPUProcTextureViewSetLabel textureViewSetLabel;
324
+ WGPUProcTextureViewAddRef textureViewAddRef;
325
+ WGPUProcTextureViewRelease textureViewRelease;
326
+
327
+
328
+ } DawnProcTable;
329
+
330
+ #endif // DAWN_DAWN_PROC_TABLE_H_
@@ -0,0 +1,47 @@
1
+ // Copyright 2020 The Dawn & Tint Authors
2
+ //
3
+ // Redistribution and use in source and binary forms, with or without
4
+ // modification, are permitted provided that the following conditions are met:
5
+ //
6
+ // 1. Redistributions of source code must retain the above copyright notice, this
7
+ // list of conditions and the following disclaimer.
8
+ //
9
+ // 2. Redistributions in binary form must reproduce the above copyright notice,
10
+ // this list of conditions and the following disclaimer in the documentation
11
+ // and/or other materials provided with the distribution.
12
+ //
13
+ // 3. Neither the name of the copyright holder nor the names of its
14
+ // contributors may be used to endorse or promote products derived from
15
+ // this software without specific prior written permission.
16
+ //
17
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18
+ // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
+ // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20
+ // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21
+ // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
+ // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23
+ // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24
+ // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25
+ // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+
28
+ #ifndef INCLUDE_DAWN_DAWN_THREAD_DISPATCH_PROC_H_
29
+ #define INCLUDE_DAWN_DAWN_THREAD_DISPATCH_PROC_H_
30
+
31
+ #include "dawn/dawn_proc.h"
32
+
33
+ #ifdef __cplusplus
34
+ extern "C" {
35
+ #endif
36
+
37
+ // Call dawnProcSetProcs(&dawnThreadDispatchProcTable) and then use dawnProcSetPerThreadProcs
38
+ // to set per-thread procs.
39
+ WGPU_EXPORT extern DawnProcTable dawnThreadDispatchProcTable;
40
+ WGPU_EXPORT void dawnProcSetDefaultThreadProcs(const DawnProcTable* procs);
41
+ WGPU_EXPORT void dawnProcSetPerThreadProcs(const DawnProcTable* procs);
42
+
43
+ #ifdef __cplusplus
44
+ } // extern "C"
45
+ #endif
46
+
47
+ #endif // INCLUDE_DAWN_DAWN_THREAD_DISPATCH_PROC_H_
@@ -0,0 +1,41 @@
1
+ // Copyright 2026 The Dawn & Tint Authors
2
+ //
3
+ // Redistribution and use in source and binary forms, with or without
4
+ // modification, are permitted provided that the following conditions are met:
5
+ //
6
+ // 1. Redistributions of source code must retain the above copyright notice, this
7
+ // list of conditions and the following disclaimer.
8
+ //
9
+ // 2. Redistributions in binary form must reproduce the above copyright notice,
10
+ // this list of conditions and the following disclaimer in the documentation
11
+ // and/or other materials provided with the distribution.
12
+ //
13
+ // 3. Neither the name of the copyright holder nor the names of its
14
+ // contributors may be used to endorse or promote products derived from
15
+ // this software without specific prior written permission.
16
+ //
17
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18
+ // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
+ // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20
+ // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21
+ // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
+ // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23
+ // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24
+ // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25
+ // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+
28
+ #ifndef INCLUDE_DAWN_DAWN_VERSION_H_
29
+ #define INCLUDE_DAWN_DAWN_VERSION_H_
30
+
31
+ #include <array>
32
+ #include <cstdint>
33
+
34
+ namespace dawn {
35
+
36
+ // The version is a 20-byte SHA1 hash. If the hash is not available, it is all zeros.
37
+ static constexpr std::array<uint8_t, 20> kDawnVersion = { 0x63, 0xf2, 0x5f, 0xee, 0xc5, 0x1e, 0x93, 0x51, 0xfb, 0x25, 0x22, 0x2b, 0x6d, 0x5d, 0xe1, 0xaf, 0x79, 0x1d, 0x7c, 0x4f };
38
+
39
+ } // namespace dawn
40
+
41
+ #endif // INCLUDE_DAWN_DAWN_VERSION_H_
@@ -0,0 +1,65 @@
1
+ // Copyright 2023 The Dawn & Tint Authors
2
+ //
3
+ // Redistribution and use in source and binary forms, with or without
4
+ // modification, are permitted provided that the following conditions are met:
5
+ //
6
+ // 1. Redistributions of source code must retain the above copyright notice, this
7
+ // list of conditions and the following disclaimer.
8
+ //
9
+ // 2. Redistributions in binary form must reproduce the above copyright notice,
10
+ // this list of conditions and the following disclaimer in the documentation
11
+ // and/or other materials provided with the distribution.
12
+ //
13
+ // 3. Neither the name of the copyright holder nor the names of its
14
+ // contributors may be used to endorse or promote products derived from
15
+ // this software without specific prior written permission.
16
+ //
17
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18
+ // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
+ // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20
+ // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21
+ // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
+ // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23
+ // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24
+ // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25
+ // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+
28
+ #ifndef INCLUDE_DAWN_NATIVE_D3D11BACKEND_H_
29
+ #define INCLUDE_DAWN_NATIVE_D3D11BACKEND_H_
30
+
31
+ #include <d3d11_1.h>
32
+ #include <wrl/client.h>
33
+
34
+ #include <memory>
35
+ #include <optional>
36
+
37
+ #include "dawn/native/D3DBackend.h"
38
+
39
+ namespace dawn::native::d3d11 {
40
+
41
+ DAWN_NATIVE_EXPORT Microsoft::WRL::ComPtr<ID3D11Device> GetD3D11Device(WGPUDevice device);
42
+
43
+ // May be chained on RequestAdapterOptions
44
+ struct DAWN_NATIVE_EXPORT RequestAdapterOptionsD3D11Device : wgpu::ChainedStruct {
45
+ RequestAdapterOptionsD3D11Device() {
46
+ sType = static_cast<wgpu::SType>(WGPUSType_RequestAdapterOptionsD3D11Device);
47
+ }
48
+
49
+ Microsoft::WRL::ComPtr<ID3D11Device> device;
50
+ };
51
+
52
+ // May be chained on SharedTextureMemoryDescriptor
53
+ struct DAWN_NATIVE_EXPORT SharedTextureMemoryD3D11Texture2DDescriptor : wgpu::ChainedStruct {
54
+ SharedTextureMemoryD3D11Texture2DDescriptor() {
55
+ sType = static_cast<wgpu::SType>(WGPUSType_SharedTextureMemoryD3D11Texture2DDescriptor);
56
+ }
57
+
58
+ // This ID3D11Texture2D object must be created from the same ID3D11Device used in the
59
+ // WGPUDevice.
60
+ Microsoft::WRL::ComPtr<ID3D11Texture2D> texture;
61
+ };
62
+
63
+ } // namespace dawn::native::d3d11
64
+
65
+ #endif // INCLUDE_DAWN_NATIVE_D3D11BACKEND_H_
@@ -0,0 +1,86 @@
1
+ // Copyright 2018 The Dawn & Tint Authors
2
+ //
3
+ // Redistribution and use in source and binary forms, with or without
4
+ // modification, are permitted provided that the following conditions are met:
5
+ //
6
+ // 1. Redistributions of source code must retain the above copyright notice, this
7
+ // list of conditions and the following disclaimer.
8
+ //
9
+ // 2. Redistributions in binary form must reproduce the above copyright notice,
10
+ // this list of conditions and the following disclaimer in the documentation
11
+ // and/or other materials provided with the distribution.
12
+ //
13
+ // 3. Neither the name of the copyright holder nor the names of its
14
+ // contributors may be used to endorse or promote products derived from
15
+ // this software without specific prior written permission.
16
+ //
17
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18
+ // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
+ // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20
+ // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21
+ // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
+ // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23
+ // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24
+ // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25
+ // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+
28
+ #ifndef INCLUDE_DAWN_NATIVE_D3D12BACKEND_H_
29
+ #define INCLUDE_DAWN_NATIVE_D3D12BACKEND_H_
30
+
31
+ #include <d3d11on12.h>
32
+ #include <d3d12.h>
33
+ #include <dxgi1_4.h>
34
+ #include <wrl/client.h>
35
+
36
+ #include "dawn/native/D3DBackend.h"
37
+
38
+ struct ID3D12Device;
39
+ struct ID3D12Resource;
40
+
41
+ namespace dawn::native::d3d12 {
42
+
43
+ class Device;
44
+
45
+ enum MemorySegment {
46
+ Local,
47
+ NonLocal,
48
+ };
49
+
50
+ DAWN_NATIVE_EXPORT Microsoft::WRL::ComPtr<ID3D12Device> GetD3D12Device(WGPUDevice device);
51
+
52
+ DAWN_NATIVE_EXPORT Microsoft::WRL::ComPtr<ID3D11On12Device> GetOrCreateD3D11On12Device(
53
+ WGPUDevice device);
54
+
55
+ DAWN_NATIVE_EXPORT Microsoft::WRL::ComPtr<ID3D12CommandQueue> GetD3D12CommandQueue(
56
+ WGPUDevice device);
57
+
58
+ DAWN_NATIVE_EXPORT uint64_t SetExternalMemoryReservation(WGPUDevice device,
59
+ uint64_t requestedReservationSize,
60
+ MemorySegment memorySegment);
61
+
62
+ // May be chained on SharedBufferMemoryDescriptor
63
+ struct DAWN_NATIVE_EXPORT SharedBufferMemoryD3D12ResourceDescriptor : wgpu::ChainedStruct {
64
+ SharedBufferMemoryD3D12ResourceDescriptor() {
65
+ sType = static_cast<wgpu::SType>(WGPUSType_SharedBufferMemoryD3D12ResourceDescriptor);
66
+ }
67
+
68
+ // This ID3D12Resource object must be created from the same ID3D12Device used in the
69
+ // WGPUDevice.
70
+ Microsoft::WRL::ComPtr<ID3D12Resource> resource;
71
+ };
72
+
73
+ // May be chained on SharedTextureMemoryDescriptor.
74
+ struct DAWN_NATIVE_EXPORT SharedTextureMemoryD3D12ResourceDescriptor : wgpu::ChainedStruct {
75
+ SharedTextureMemoryD3D12ResourceDescriptor() {
76
+ sType = static_cast<wgpu::SType>(WGPUSType_SharedTextureMemoryD3D12ResourceDescriptor);
77
+ }
78
+
79
+ // This ID3D12Resource object must be created from the same ID3D12Device used in the
80
+ // WGPUDevice.
81
+ Microsoft::WRL::ComPtr<ID3D12Resource> resource;
82
+ };
83
+
84
+ } // namespace dawn::native::d3d12
85
+
86
+ #endif // INCLUDE_DAWN_NATIVE_D3D12BACKEND_H_